1 2002-10-02 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3 * sysdeps/sh/pt-machine.h: Make C code ifndef'ed with __ASSEMBLER__.
4 * sysdeps/sh/tls.h: Likewise.
5 * sysdeps/unix/sysv/linux/sh/smp.h: New file.
7 2002-09-29 Jakub Jelinek <jakub@redhat.com>
9 * sysdeps/pthread/tst-timer.c (main): Clear
10 SIGEV2.sigev_notify_attributes.
12 2002-09-29 Ulrich Drepper <drepper@redhat.com>
14 * sysdeps/i386/useldt.h (DO_SET_THREAD_AREA): Don't use
15 INLINE_SYSCALL for set_thread_area syscall.
17 2002-09-28 Roland McGrath <roland@redhat.com>
19 * pthread.c (__pthread_reset_main_thread) [FLOATING_STACKS]:
20 Don't call setrlimit, since we did no prior bogon we need to undo.
22 2002-09-27 Roland McGrath <roland@redhat.com>
24 * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Don't include <pt-machine.h>.
26 2002-09-24 Roland McGrath <roland@redhat.com>
28 * sysdeps/x86_64/tls.h: New file.
30 2002-09-23 Roland McGrath <roland@redhat.com>
32 * Examples/ex13.c (dump_mut): int -> size_t for counter.
34 2002-09-18 Bruno Haible <bruno@clisp.org>
36 * Examples/ex10.c (thread): Fail if pthread_mutex_timedlock() returns
37 an unexpected error code.
39 * internals.h (__pthread_message): Add const to first parameter type.
40 * pthread.c (__pthread_message): Likewise.
42 * sysdeps/unix/sysv/linux/configure: Moved to ../sysdeps/pthread.
44 2002-09-17 Roland McGrath <roland@redhat.com>
46 * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT, TLS_DO_SET_THREAD_AREA):
47 Set the descriptor limit to the full 4GB, so %gs:OFFSET works for any
48 offset (positive or negative) relative to the thread struct.
49 * sysdeps/i386/useldt.h (DO_MODIFY_LDT, DO_SET_THREAD_AREA): Likewise.
51 2002-09-12 Jakub Jelinek <jakub@redhat.com>
53 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: Move...
54 * sysdeps/unix/sysv/linux/sparc/Makefile: ...here.
55 Replace /usr/lib/crt[in].o with crt[in].o too.
57 2002-09-11 Steven Munroe <sjmunroe@us.ibm.com>
59 * sysdeps/powerpc/powerpc64/pt-machine.h: New file.
61 2002-09-04 Bruno Haible <bruno@clisp.org>
63 * pthread.c: Include <sys/time.h>.
64 (is_smp_system): Move to sysdeps/unix/sysv/linux/smp.h.
65 * sysdeps/unix/sysv/linux/smp.h: New file, extracted from pthread.c.
66 * Makefile (distribute): Add smp.h to the list.
68 2002-09-04 Bruno Haible <bruno@clisp.org>
70 * sysdeps/alpha/pt-machine.h: Choose different include file location
71 on non-Linux platforms.
73 * wrapsyscall.c (PROMOTE_INTEGRAL_TYPE): New macro.
74 (open, open64): Change va_arg argument type to the integral type to
75 which mode_t promotes.
77 * sysdeps/pthread/tst-timer.c (main): Don't assume anything about
78 the structure of 'struct sigevent'.
80 * errno.c (__errno_location, __h_errno_location, __res_state):
81 Use prototype function definitions.
83 2002-07-29 Steven Munroe <sjmunroe@us.ibm.com>
85 * shlib-versions: Set libpthread version to 2.3 for powerpc64.
86 * sysdeps/powerpc/pt-machine.h: moved to...
87 * sysdeps/powerpc/powerpc32/pt-machine.h: ...here
88 * sysdeps/powerpc/powerpc64/pt-machine.h: New file.
90 2002-09-02 Roland McGrath <roland@redhat.com>
92 * sysdeps/powerpc/Makefile (CFLAGS-pt-initfini.s): New variable.
94 2002-09-01 Roland McGrath <roland@redhat.com>
96 * sysdeps/pthread/bits/libc-tsd.h (enum __libc_tsd_key_t): Add new keys
97 CTYPE_B, CTYPE_TOLOWER, CTYPE_TOUPPER.
99 * sysdeps/pthread/bits/libc-tsd.h (__libc_tsd_address): New macro.
100 (__libc_internal_tsd_address): Declare it.
101 * Versions (libc, ld, libpthread: GLIBC_PRIVATE): Add
102 __libc_internal_tsd_address.
103 * specific.c (libc_internal_tsd_address): New function.
104 (__libc_internal_tsd_address): New variable.
105 * no-tsd.c (__libc_internal_tsd_address): New variable.
107 2002-08-31 Ulrich Drepper <drepper@redhat.com>
109 * Makefile: Don't use rule for crt%.o, spell it out as rules for
112 2002-08-30 Roland McGrath <roland@redhat.com>
114 * Makefile (extra-objs, omit-deps): Add crtn.
115 ($(objpfx)libpthread.so): Depend on $(objpfx)crtn.o.
116 ($(objpfx)libpthread.so: +postinit): Append $(objpfx)crtn.o.
117 ($(objpfx)crtn.S): New target.
118 ($(objpfx)crt%.o): Pattern rule replaces crti.o target.
119 (generated): Add crtn.S.
121 * sysdeps/unix/sysv/linux/x86_64/Makefile ($(objpfx)specs): Massage
124 2002-08-30 Jakub Jelinek <jakub@redhat.com>
126 * pthread.c (__pthread_initialize_minimal): Call __uselocale even
129 2002-08-30 Roland McGrath <roland@redhat.com>
131 * tst-static-locale.c: New file.
132 * Makefile (tests, tests-static): Add it.
134 2002-04-24 Steven Munroe <sjmunroe@us.ibm.com>
136 * spinlock.c (__pthread_lock): Fix spurious wakeup
137 handling. Don't clear lowest bit of list pointer as sign the thread
138 is still on the wait list. Don't restart after spurious wakeup
139 with spinning to get the lock.
140 (__pthread_unlock): Take set lowest bit into account when handling
141 pointer to list elements.
142 Patch by Steve Munroe <sjmunroe@us.ibm.com>.
144 2002-08-28 Roland McGrath <roland@redhat.com>
146 * sysdeps/pthread/timer_routines.c (thread_func): Fix type in cast.
148 2002-08-28 Jakub Jelinek <jakub@redhat.com>
150 * sysdeps/unix/sysv/linux/hppa/aio_cancel.c: New file.
151 * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
152 * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
154 2002-08-28 Ulrich Drepper <drepper@redhat.com>
156 * sysdeps/pthread/timer_routines.c (thread_func): Change return
157 type to void and add casts in use to avoid warnings with all gcc
160 2002-08-08 Jakub Jelinek <jakub@redhat.com>
162 * sysdeps/unix/sysv/linux/bits/local_lim.h (PTHREAD_THREADS_MAX):
164 * manager.c (__pthread_handles): Remove.
165 * pthandles.c: New file.
166 * pthread.c (__pthread_initialize_minimal): Initialize
167 __pthread_handles[0] and __pthread_handles[1].
168 * Makefile (libpthread-routines): Add pthandles (must be last).
170 2002-08-26 Brian Youmans <3diff@gnu.org>
172 * Examples/ex10.c: Corrected version number in Lesser GPL copying
173 permission notice from 2 to 2.1.
174 * Examples/ex11.c: Likewise.
175 * Examples/ex13.c: Likewise.
176 * Examples/ex8.c: Likewise.
177 * Examples/ex9.c: Likewise.
178 * barrier.c: Likewise.
179 * events.c: Likewise.
180 * lockfile.c: Likewise.
181 * no-tsd.c: Likewise.
182 * pt-machine.c: Likewise.
183 * ptclock_gettime.c: Likewise.
184 * ptclock_settime.c: Likewise.
185 * rwlock.c: Likewise.
186 * sysdeps/alpha/pspinlock.c: Likewise.
187 * sysdeps/alpha/pt-machine.h: Likewise.
188 * sysdeps/arm/pspinlock.c: Likewise.
189 * sysdeps/arm/pt-machine.h: Likewise.
190 * sysdeps/cris/pspinlock.c: Likewise.
191 * sysdeps/cris/pt-machine.h: Likewise.
192 * sysdeps/hppa/pspinlock.c: Likewise.
193 * sysdeps/hppa/pt-machine.h: Likewise.
194 * sysdeps/i386/i686/pt-machine.h: Likewise.
195 * sysdeps/i386/pspinlock.c: Likewise.
196 * sysdeps/i386/pt-machine.h: Likewise.
197 * sysdeps/i386/useldt.h: Likewise.
198 * sysdeps/ia64/pspinlock.c: Likewise.
199 * sysdeps/ia64/pt-machine.h: Likewise.
200 * sysdeps/m68k/pspinlock.c: Likewise.
201 * sysdeps/m68k/pt-machine.h: Likewise.
202 * sysdeps/mips/pspinlock.c: Likewise.
203 * sysdeps/mips/pt-machine.h: Likewise.
204 * sysdeps/powerpc/pspinlock.c: Likewise.
205 * sysdeps/powerpc/pt-machine.h: Likewise.
206 * sysdeps/pthread/bits/initspin.h: Likewise.
207 * sysdeps/pthread/bits/libc-lock.h: Likewise.
208 * sysdeps/pthread/bits/libc-tsd.h: Likewise.
209 * sysdeps/pthread/getcpuclockid.c: Likewise.
210 * sysdeps/pthread/posix-timer.h: Likewise.
211 * sysdeps/pthread/timer_create.c: Likewise.
212 * sysdeps/pthread/timer_delete.c: Likewise.
213 * sysdeps/pthread/timer_getoverr.c: Likewise.
214 * sysdeps/pthread/timer_gettime.c: Likewise.
215 * sysdeps/pthread/timer_routines.c: Likewise.
216 * sysdeps/pthread/timer_settime.c: Likewise.
217 * sysdeps/pthread/tst-timer.c: Likewise.
218 * sysdeps/s390/pspinlock.c: Likewise.
219 * sysdeps/s390/s390-32/pt-machine.h: Likewise.
220 * sysdeps/s390/s390-64/pt-machine.h: Likewise.
221 * sysdeps/sh/pspinlock.c: Likewise.
222 * sysdeps/sh/pt-machine.h: Likewise.
223 * sysdeps/sparc/sparc32/pspinlock.c: Likewise.
224 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
225 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: Likewise.
226 * sysdeps/sparc/sparc64/pspinlock.c: Likewise.
227 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
228 * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
229 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
230 * sysdeps/unix/sysv/linux/bits/sigthread.h: Likewise.
231 * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: Likewise.
232 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
233 * tststack.c: Likewise.
234 * unload.c: Likewise.
236 * wrapsyscall.c: Likewise.
238 * sysdeps/pthread/pt-initfini.c: Changed copying
239 permission notice to Lesser GPL from Library GPL, including the
240 references in the special exception.
241 * sysdeps/unix/sysv/linux/hppa/pt-initfini.c: Likewise.
242 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Likewise.
243 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c:
245 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c:
247 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: Likewise.
249 2002-08-26 Ulrich Drepper <drepper@redhat.com>
251 * Examples/ex10.c (thread): tv_nsec == 1000000000 is already
252 overflow [PR libc/4244].
254 2002-08-25 Ulrich Drepper <drepper@redhat.com>
256 * sysdeps/pthread/timer_routines.c (thread_func): Make the
257 compiler happy by adding a return statement which will never be
260 * tst-context.c (main): Cast to long before casting to pointer.
262 * Examples/ex17.c (main): Use correct format string.
264 * Examples/ex9.c (thread): Remove incorrect return statement.
266 2002-08-23 Ulrich Drepper <drepper@redhat.com>
268 * pthread.c (__linuxthreads_version): New global constant.
270 2002-08-23 Andreas Jaeger <aj@suse.de>
272 * sysdeps/x86_64/pt-machine.h: Use %fs instead of %gs
273 as thread specific register.
274 (testandset): Fix inline asm.
275 (THREAD_GETMEM): Fix inline asm.
277 2002-08-22 Roland McGrath <roland@redhat.com>
279 * sysdeps/i386/useldt.h (INIT_THREAD_SELF): Remove [HAVE_TLS_SUPPORT]
281 (INIT_THREAD_SELF): Pass second arg to DO_SET_THREAD_AREA.
282 (DO_SET_THREAD_AREA): Take second arg, pass to DO_SET_THREAD_AREA_REUSE
283 macro. That chooses whether to reuse %gs value or let kernel set it.
284 [USE_TLS] (DO_SET_THREAD_AREA_REUSE): New macro, always 1.
285 [!USE_TLS] (DO_SET_THREAD_AREA_REUSE): New macro, true if arg is
288 2002-08-21 Ulrich Drepper <drepper@redhat.com>
290 * sysdeps/i386/tls.h (TLS_SETUP_GS_SEGMENT): Add new parameter
291 also to the third definition of this macro.
293 2002-06-17 Andreas Jaeger <aj@suse.de>
295 * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
298 2002-08-20 Ulrich Drepper <drepper@redhat.com>
300 * sysdeps/i386/useldt.h: Go back to using 16-bit instructions when
301 loading/reading segment registers. Some old hardware doesn't
302 handle the 32-bit instructions as expected.
303 * sysdeps/i386/tls.h: Likewise.
305 * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Second parameter is
306 renamed to secondcall and use is negated.
307 (TLS_SETUP_GS_SEGMENT): Likewise.
308 (TLS_INIT_TP): Likewise.
309 * sysdeps/sh/tls.h (TLS_INIT_TP): Second parameter is renamed to
312 * sysdeps/i386/tls.h: Use 32-bit operations when handling segment
313 registers. No need to mask upper 16 bits in this case.
314 * sysdeps/i386/useldt.h: Likewise.
315 (DO_SET_THREAD_AREA): We have to load %gs again even if the value
316 is the same since the GDT content changed.
318 * sysdeps/i386/tls.h (TLS_INIT_TP): Add new parameter and pass it on
319 to TLS_SETUP_GS_SEGMENT.
320 (TLS_SETUP_GS_SEGMENT): Add new parameter and pass it on to
321 TLS_DO_SET_THREAD_AREA.
322 (TLS_DO_SET_THREAD_AREA): If new parameter is zero determine
323 entry number from %gs value.
324 * sysdeps/sh/tls.h (TLS_INIT_TP): Add new parameter and simply
327 * manager.c (pthread_handle_create): Pass NULL to _dl_allocate_tls.
328 Pass true to _dl_deallocate_tls.
329 (pthread_free): Likewise.
330 * pthread.c (__pthread_initialize_manager): Likewise.
332 2002-08-19 Ulrich Drepper <drepper@redhat.com>
334 * sysdeps/i386/useldt.h (DO_SET_THREAD_AREA): Use correct shift when
335 computing index from %gs value.
337 2002-08-16 Roland McGrath <roland@redhat.com>
339 * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Calculate segment
340 register value from entry number properly.
342 * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT): Rewrite asm to use %ebx
343 optimally conditional on [__PIC__].
344 (TLS_DO_SET_THREAD_AREA): New macro, implement inline syscall
345 without touching errno, and use latest modify_ldt-like interface.
346 (TLS_SETUP_GS_SEGMENT): Use that instead of INLINE_SYSCALL.
347 * sysdeps/i386/useldt.h (DO_MODIFY_LDT): Set %gs in this macro.
348 (DO_SET_THREAD_AREA): New macro, uses current syscall interface with
349 existing %gs value as the segment to set.
350 (INIT_THREAD_SELF): Rewritten using those. Use set_thread_area only
351 under [HAVE_TLS_SUPPORT] so we can rely on the initialization done
352 by the first thread's early TLS setup.
354 2002-08-15 Roland McGrath <roland@redhat.com>
356 * sysdeps/i386/tls.h (TLS_INIT_TP): Use statement expression and
357 return a value as callers now expect.
359 2002-08-11 Roland McGrath <roland@redhat.com>
361 * pthread.c (__pthread_initialize_manager): Initialize
362 p_header.data.tcb field of manager thread's descriptor.
363 (__pthread_initialize_minimal): Don't initialize p_header.data.self
364 field, already done by TLS_INIT_TP.
366 * manager.c (pthread_handle_create): Move p_header field initializers
369 2002-08-08 Ulrich Drepper <drepper@redhat.com>
371 * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Removed.
373 2002-08-07 Ulrich Drepper <drepper@redhat.com>
375 * pthread.c (__linuxthreads_initial_report_events): New variable.
376 (__pthread_initialize_manager): Use it to initialize p_report_events
378 [TLS]: Store pointer to descriptor of manager in __pthread_handles.
380 2002-08-07 Roland McGrath <roland@redhat.com>
382 * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT): Add an extra argument with
383 an "m" constraint to the asm so the compiler knows LDT_ENTRY was used.
385 2002-08-02 Roland McGrath <roland@redhat.com>
387 * sysdeps/pthread/bits/libc-tsd.h (enum __libc_tsd_key_t):
388 Add _LIBC_TSD_KEY_LOCALE.
389 * manager.c (pthread_start_thread) [!(USE_TLS && HAVE___THREAD)]:
390 Call __uselocale to initialize our per-thread locale pointer to
392 * pthread.c (__pthread_initialize_minimal): Likewise.
394 * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Add missing \s.
396 2002-08-02 Ulrich Drepper <drepper@redhat.com>
398 * pthread.c: Declare _errno, _h_errno, and _res unless we use TLS
401 * cancel.c (__pthread_perform_cleanup) [USE_TLS && HAVE___THREAD]:
402 Don't use p_libc_specific element in thread descriptor.
404 2002-07-30 Roland McGrath <roland@redhat.com>
406 * sysdeps/pthread/bits/libc-tsd.h: Include <tls.h>.
407 [USE_TLS && HAVE___THREAD]: Just include the sysdeps/generic file,
408 which does the right thing when __thread support is available.
409 * descr.h (struct _pthread_descr_struct) [USE_TLS && HAVE___THREAD]:
410 Omit `p_libc_specific', `p_errnop', `p_errno', `p_h_errnop',
411 `p_h_errno', `p_resp', and `p_res' members.
412 * pthread.c (__pthread_initialize_minimal) [USE_TLS && HAVE___THREAD]:
413 Don't initialize `p_errnop' and `p_h_errnop' members.
414 (__pthread_reset_main_thread): Likewise.
415 (__pthread_initialize_manager): Likewise.
416 * manager.c (__pthread_manager, pthread_handle_create): Likewise.
417 * pthread.c (pthread_initialize) [USE_TLS && HAVE___THREAD]:
418 Don't initialize `p_resp' member.
419 (__pthread_reset_main_thread): Likewise.
420 * manager.c (pthread_handle_create): Likewise.
421 * specific.c (libc_internal_tsd_set, libc_internal_tsd_get):
422 Conditionalize these on [!(USE_TLS && HAVE___THREAD)].
423 * no-tsd.c: Conditionalize contents on [!(USE_TLS && HAVE___THREAD)].
424 * errno.c [USE_TLS && HAVE___THREAD]
425 (__h_errno_location, __res_state): Don't define these at all.
427 * sysdeps/i386/tls.h (INSTALL_DTV): Add parens around arguments!
428 (INSTALL_NEW_DTV, GET_DTV): Likewise.
429 * sysdeps/sh/tls.h (INSTALL_DTV, INSTALL_NEW_DTV, GET_DTV): Likewise.
431 * weaks.c: Don't include <errno.h> here.
433 2002-08-01 Roland McGrath <roland@redhat.com>
435 * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT): New macro, broken out of
437 (TLS_DO_SET_THREAD_AREA): New macro, uses thread_set_area syscall.
438 (TLS_SETUP_GS_SEGMENT): New macro, try one or the other or both.
439 (TLS_INIT_TP): Use that.
441 2002-08-02 Jakub Jelinek <jakub@redhat.com>
443 * sysdeps/i386/useldt.h (DO_MODIFY_LDT): Move from INIT_THREAD_SELF.
444 (INIT_THREAD_SELF): Use sys_thread_area syscall instead if available.
445 (FREE_THREAD): Avoid modify_ldt if using GDT.
446 * sysdeps/i386/pspinlock.c (__have_no_set_thread_area): New variable.
448 2002-07-25 Jakub Jelinek <jakub@redhat.com>
450 * sysdeps/i386/tls.h: Use __ASSEMBLER__ test macro not ASSEMBLER.
451 * sysdeps/i386/pt-machine.h: Likewise.
452 * sysdeps/i386/useldt.h: Likewise.
454 2002-07-22 Ulrich Drepper <drepper@redhat.com>
456 * pthread.c (__pthread_initialize_minimal): If !SHARED and TLS
457 call __libc_setup_tls first.
458 * Makefile: Actually create tst-signal.out file when running the test.
459 (tests): Add tststatic.
460 * Examples/tststatic.c: New file.
462 2002-07-19 Ulrich Drepper <drepper@redhat.com>
464 * errno.c (__errno_location): Don't define unless !USE_TLS
466 * sysdeps/i386/pt-machine.c: Protect C code with #ifndef ASSEMBLER.
467 * sysdeps/i386/tls.h: Likewise.
468 * sysdeps/i386/useldt.h: Likewise.
469 * sysdeps/i386/i686/pt-machine.h: Likewise.
471 2002-07-02 H.J. Lu <hjl@gnu.org>
473 * sysdeps/mips/pspinlock.c: Don't include <sgidefs.h>. Always
475 * sysdeps/mips/pt-machine.h: Likewise.
477 2002-07-14 Ulrich Drepper <drepper@redhat.com>
479 * manager.c (pthread_handle_create): Initialize self-reference in
482 2002-07-01 Jakub Jelinek <jakub@redhat.com>
484 * Examples/ex9.c (main): Remove unused th variable.
486 2002-07-10 Ulrich Drepper <drepper@redhat.com>
488 * wrapsyscall.c: Add __nanosleep alias.
489 * Versions (GLIBC_2.2.6): Add __nanosleep.
490 * bug-sleep.c: New file.
491 * Makefile (tests): Add bug-sleep.
493 2002-06-19 Steven Munroe <sjmunroe@vnet.ibm.com>
495 * Examples/ex9.c (main): Use list of children and join them.
496 (thread): Do not call exit.
498 2002-06-20 Ulrich Drepper <drepper@redhat.com>
500 * spinlock.c (wait_node_alloc): We cannot use compare-and-exchange.
501 Unconditionally use the code using spinlock. Use __pthread_release
503 (wait_node_free): Likewise.
504 (__pthread_acquire, __pthread_release): Unconditionally define.
506 2002-06-07 Jakub Jelinek <jakub@redhat.com>
508 * sysdeps/ia64/pt-machine.h (MEMORY_BARRIER): Fix typo.
510 2002-05-24 Ulrich Drepper <drepper@redhat.com>
512 * sysdeps/ia64/pt-machine.h (MEMORY_BARRIER): Use __sync_synchronize.
514 2002-05-21 Ulrich Drepper <drepper@redhat.com>
516 * sysdeps/pthread/pthread.h (pthread_create): Rename first
518 (pthread_cancel): Likewise.
519 * internals.h (__pthread_create_2_1): Likewise.
520 * sysdeps/unix/sysv/linux/bits/sigthread.h (pthread_kill): Likewise.
522 2002-05-20 Ulrich Drepper <drepper@redhat.com>
524 * sysdeps/alpha/pt-machine.c (THREAD_SELF): Remove clobber.
525 Patch by Glen Nakamura <gen@flex.com>.
527 2002-05-03 Ulrich Drepper <drepper@redhat.com>
529 * signals.c: Move sighandler functions to...
530 * sighandler.c: ...here. New file.
531 * signals.c: Move signal handler related type definitions to...
532 * internals.h: ...here. Add prototypes for signal handlers.
533 * Makefile (libpthread-routines): Add sighandler.
534 (CFLAGS-sighandler.c): Add $(exceptions).
536 2002-04-30 Jakub Jelinek <jakub@redhat.com>
538 * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
540 2002-04-08 Ulrich Drepper <drepper@redhat.com>
542 * sysdeps/pthread/timer_getoverr.c: Return real overrun.
543 * sysdeps/pthread/posix-timer.h (struct timer_node): Add overrun_count.
544 * sysdeps/pthread/timer_routines.c (thread_func): Schedule next timeout
545 based on previous one and not on current time. Count overruns.
546 Patch by Eric F. Sorton <eric@cctcorp.com>.
548 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add DELAYTIMER_MAX.
550 2002-04-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
552 * sysdeps/sh/pt-machine.h: Define _PT_MACHINE_H
553 if it isn't defined yet.
554 (FLOATING_STACKS, ARCH_STACK_MAX_SIZE): Defined.
555 (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
557 * sysdeps/sh/tls.h: New file.
559 2002-04-08 Jakub Jelinek <jakub@redhat.com>
561 * manager.c (__pthread_manager_event): Use self instead of arg
562 for INIT_THREAD_SELF.
563 * sysdeps/i386/useldt.h (INIT_THREAD_SELF): Use sizeof (struct
564 _pthread_descr_struct) instead of sizeof (*descr).
566 2002-04-05 Ulrich Drepper <drepper@redhat.com>
568 * sysdeps/ia64/pt-machine.h: Protect against multiple inclusion.
569 * sysdeps/alpha/pt-machine.h: Likewise.
570 * sysdeps/arm/pt-machine.h: Likewise.
571 * sysdeps/cris/pt-machine.h: Likewise.
572 * sysdeps/hppa/pt-machine.h: Likewise.
573 * sysdeps/m68k/pt-machine.h: Likewise.
574 * sysdeps/mips/pt-machine.h: Likewise.
575 * sysdeps/powerpc/pt-machine.h: Likewise.
576 * sysdeps/s390/s390-32/pt-machine.h: Likewise.
577 * sysdeps/s390/s390-64/pt-machine.h: Likewise.
578 * sysdeps/sh/pt-machine.h: Likewise.
579 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
580 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
581 * sysdeps/x86_64/pt-machine.h: Likewise.
583 2002-04-05 Jakub Jelinek <jakub@redhat.com>
585 * man/pthread_mutexattr_init.man (pthread_mutexattr_settype): Document
586 instead of pthread_mutexattr_setkind_np.
587 (pthread_mutexattr_gettype): Similarly.
588 * man/pthread_mutexattr_setkind_np.man: New.
589 * man/Makefile (SOURCES): Add pthread_mutexattr_setkind_np.man.
591 2002-04-02 Ulrich Drepper <drepper@redhat.com>
593 * sysdeps/ia64/pt-machine.h (MEMORY_BARRIER): Define.
595 2002-03-22 Jakub Jelinek <jakub@redhat.com>
597 * sysdeps/mips/pt-machine.h (MEMORY_BARRIER): Remove.
599 2002-03-22 Ulrich Drepper <drepper@redhat.com>
601 * internals.h (MEMORY_BARRIER): Define as asm with memory as clobber.
603 2002-03-17 Andreas Jaeger <aj@suse.de>
605 * sysdeps/i386/pt-machine.h: Add testandset and __compare_and_swap
607 * sysdeps/alpha/pt-machine.h: Likewise.
608 * sysdeps/arm/pt-machine.h: Likewise.
609 * sysdeps/cris/pt-machine.h: Likewise.
610 * sysdeps/hppa/pt-machine.h: Likewise.
611 * sysdeps/i386/i686/pt-machine.h: Likewise.
612 * sysdeps/ia64/pt-machine.h: Likewise.
613 * sysdeps/m68k/pt-machine.h: Likewise.
614 * sysdeps/mips/pt-machine.h: Likewise.
615 * sysdeps/powerpc/pt-machine.h: Likewise.
616 * sysdeps/s390/s390-32/pt-machine.h: Likewise.
617 * sysdeps/s390/s390-64/pt-machine.h: Likewise.
618 * sysdeps/sh/pt-machine.h: Likewise.
619 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
620 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
621 * sysdeps/x86_64/pt-machine.h: Likewise.
623 * internals.h: Move testandset and __compare_and_swap prototypes
626 2002-03-03 Andreas Jaeger <aj@suse.de>
628 * errno.c: Include resolv.h to avoid warning.
630 2002-02-27 Ulrich Drepper <drepper@redhat.com>
632 * pthread.c [USE_TLS] (thread_self_stack): Correct check for upper
635 2002-02-23 Ulrich Drepper <drepper@redhat.com>
637 * attr.c (pthread_getattr_np): Don't take thread descriptor size
638 into account if USE_TLS.
639 * manager.c (pthread_handle_create): Free TLS data structures if call
640 failed. Pass correct stack to clone if USE_TLS.
641 * sysdeps/i386/pt-machine.h: Handle multiple inclusion.
642 * sysdeps/i386/i686/pt-machine.h: Likewise.
643 * sysdeps/i386/tls.h: Unconditionally include <pt-machine.h>.
645 * descr.h (struct _pthread_descr_struct): Update p_header for TLS.
646 Add p_stackaddr element #if USE_TLS.
647 * internals.c: Include <tls.h>.
648 * manager.c: Integrate creating and handling of thread descriptor
650 * pthread.c: Likewise.
651 * sysdeps/i386/tls.h (tcbhead_t): Add self pointer.
652 Include <linuxthreads/descr.h> only if TLS is really used.
653 (GET_DTV): New macro.
654 (TLS_INIT_TP): Initialize self pointer.
656 2002-02-17 Andreas Schwab <schwab@suse.de>
658 * signals.c (sigwait): Check for old sighandler being SIG_ERR,
661 2002-02-12 Ulrich Drepper <drepper@redhat.com>
663 * sysdeps/i386/tls.c (INSTALL_NEW_DTV): Define.
664 (INSTALL_DTV): Adjust for being passed pointer to element with length.
666 2002-02-08 Ulrich Drepper <drepper@redhat.com>
668 * sysdeps/i386/tls.h (TLS_INIT_TP): Also initialize %gs.
670 2002-02-08 Richard Henderson <rth@redhat.com>
672 * sysdeps/alpha/elf/pt-initfini.c: Use \n\ for multiline string.
674 2002-02-08 Ulrich Drepper <drepper@redhat.com>
676 * sysdeps/i386/tls.h: TLS cannot be supported with FLOATING_STACKS
679 2002-02-07 H.J. Lu <hjl@gnu.org>
681 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Silence the
683 (__pthread_spin_lock): Remove ".set noreorder".
684 * sysdeps/mips/pt-machine.h (__compare_and_swap): Liekwise.
686 2002-02-05 H.J. Lu <hjl@gnu.org>
688 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Not use
690 * sysdeps/mips/pt-machine.h (testandset): Likewise.
691 (__compare_and_swap): Likewise.
693 2002-02-07 Ulrich Drepper <drepper@redhat.com>
695 * internals.h: Move declarations/definitions of
696 __pthread_initial_thread_bos, __pthread_initial_thread,
697 __pthread_manager_thread_bos, __pthread_manager_thread_tos,
698 __pthread_manager_thread, __pthread_nonstandard_stacks, STACK_SIZE,
699 CURRENT_STACK_FRAME, __pthread_find_self, and thread_self...
701 * sysdeps/i386/tls.h: Add TLS definitions also for !FLOATING_STACKS.
702 Define THREAD_GETMEM accordingly.
704 2002-02-06 Ulrich Drepper <drepper@redhat.com>
706 * sysdeps/i386/tls.h: Include <stddef.h> for size_t.
708 * sysdeps/i386/tls.h: Define THREAD_DTV.
710 2002-02-04 Ulrich Drepper <drepper@redhat.com>
712 * internals.h: Move thread descriptor definition...
713 * descr.h.: ...here. New file.
714 * sysdeps/i386/tls.h: New file.
716 2002-02-01 H.J. Lu <hjl@gnu.org>
718 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Use a
719 different register in the delayed slot. Use branch likely.
721 * sysdeps/mips/pt-machine.h (testandset): Call _test_and_set.
722 (__compare_and_swap): Return 0 only when failed to compare. Use
725 2002-02-01 Jakub Jelinek <jakub@redhat.com>
727 * Versions (__libc_internal_tsd_get, __libc_internal_tsd_set,
728 __pthread_kill_other_threads_np): Move to GLIBC_PRIVATE.
729 * sysdeps/i386/i586/Versions: Move all symbols to GLIBC_PRIVATE.
730 * sysdeps/i386/i686/Versions: Move all symbols to GLIBC_PRIVATE.
731 * sysdeps/sparc/sparc32/sparcv9/Versions: New file.
732 * sysdeps/sparc/sparc64/Versions: New file.
733 * sysdeps/ia64/Versions: Move all symbols to GLIBC_PRIVATE.
735 2002-01-31 Ulrich Drepper <drepper@redhat.com>
737 * pthread.c: _dl_cpuclock_offset is not any longer a global variable
738 in SHARED code, use GL(dl_cpuclock_offset).
740 2002-01-28 Andreas Jaeger <aj@suse.de>
742 * sysdeps/mips/pspinlock.c (__pthread_spin_init): Clear *LOCK to
743 0. Patch by Machida Hiroyuki <machida@sm.sony.co.jp>.
745 2002-01-16 Martin Schwidefsky <schwidefsky@de.ibm.com>
747 * sysdeps/s390/s390-32/pt-machine.h (MEMORY_BARRIER): Define.
748 (CURRENT_STACK_FRAME): Remove duplicate definition.
749 * sysdeps/s390/s390-64/pt-machine.h: Likewise.
751 2002-01-14 Martin Schwidefsky <schwidefsky@de.ibm.com>
753 * Makefile (CFLAGS-tst-cancel.c): Add -fno-inline-functions to prevent
756 2002-01-12 Andreas Schwab <schwab@suse.de>
758 * Makefile (test-srcs): Add tst-signal.
759 (tests): Run tst-signal.
760 (distribute): Add tst-signal.sh.
761 * tst-signal.c, tst-signal.sh: New files.
763 2002-01-14 Andreas Jaeger <aj@suse.de>
765 * sysdeps/x86_64/pt-machine.h (INIT_THREAD_SELF): Avoid warning.
767 2002-01-11 Andreas Schwab <schwab@suse.de>
769 * signals.c (sighandler): Initialize all elements to SIG_ERR.
770 (__sigaction): Don't use value from sighandler if it is SIG_ERR.
772 2002-01-06 Richard Henderson <rth@redhat.com>
774 * sysdeps/alpha/elf/pt-initfini.c: New file.
776 2001-12-29 Andreas Jaeger <aj@suse.de>
778 * Examples/ex9.c: Add noreturn attribute for thread.
779 * Examples/ex10.c: Likewise.
780 * Examples/ex13.c (thread_start): Likewise.
781 * Examples/ex15.c (worker): Likewise.
783 * Examples/ex18.c: Include unistd.h for prototype of sleep.
785 2001-12-14 Ulrich Drepper <drepper@redhat.com>
787 * man/pthread_atfork.man: Adjust description of mutex handling
788 after fork for current implementation.
789 * linuxthreads.texi: Likewise [PR libc/2519].
791 2001-12-13 Andreas Schwab <schwab@suse.de>
793 * specific.c (pthread_key_delete): Don't contact the thread
794 manager if no threads have been created yet.
796 2001-12-12 NIIBE Yutaka <gniibe@m17n.org>
798 * sysdeps/sh/pt-machine.h (INIT_THREAD_SELF): Added __volatile__
799 qualifier to be safe.
801 2001-11-30 Andreas Schwab <schwab@suse.de>
803 * pthread.c (pthread_handle_sigcancel) [THREAD_SELF]: Double check
804 that self is the manager thread, and initialize the thread
806 (thread_self_stack) [THREAD_SELF]: New function to find self via
808 * manager.c (pthread_handle_create): Don't block cancel signal any
811 2001-11-29 Andreas Jaeger <aj@suse.de>
813 * sysdeps/x86_64/pt-machine.h: Use %gs as thread specific register.
815 (INIT_THREAD_SELF): New.
816 (THREAD_GETMEM): New.
818 (THREAD_SETMEM): New.
819 (THREAD_SETMEM_NC): New.
820 (FLOATING_STACKS): Define.
821 (ARCH_STACK_MAX_SIZE): Define.
823 2001-11-28 Kaz Kylheku <kaz@ashi.footprints.net>
825 Bugfix to pthread_key_delete. It was iterating over the thread
826 manager's linked list of threads, behind the thread manager's
827 back causing a race. The fix is to have the manager iterate over
828 the threads instead, using a new request type for doing so.
829 * internals.h (struct pthread_request): New manager request type
831 * manager.c (pthread_for_each_thread): New function.
832 (__pthread_manager): Handle new REQ_FOR_EACH_THREAD request.
833 * specific.c (struct pthread_key_delete_helper_args): New type.
834 (pthread_key_delete_helper): New static function.
835 (pthread_key_delete): Use the new thread manager
836 REQ_FOR_EACH_THREAD function to iterate over the threads and set
837 the delete key slot to a null value in each thread.
838 * Examples/ex18.c: New test.
839 * Makefile (tests): Add ex18.
841 2001-11-22 Wolfram Gloger <wg@malloc.de>
843 * pthread.c (pthread_onexit_process): Don't call free
844 after threads have been asynchronously terminated.
846 * manager.c (pthread_handle_exit): Surround cancellation
847 of threads with __flockfilelist()/__funlockfilelist().
849 2001-11-26 Andreas Schwab <schwab@suse.de>
851 * manager.c (pthread_handle_create): Start the child thread with
852 the cancel signal blocked, so that it does not handle it before
853 the thread register is set up. Save errno from failed clone call.
855 2001-11-15 Ulrich Drepper <drepper@redhat.com>
857 * sysdeps/i386/i686/Implies: Removed.
858 * sysdeps/i386/i686/Versions: New file.
860 2001-10-31 Andreas Jaeger <aj@suse.de>
862 * sysdeps/x86_64/Makefile: Remove, we do not need it anymore.
864 2001-10-05 Kevin Buettner <kevinb@cygnus.com>
866 * pthread.c (__linuxthread_pthread_sizeof_descr): Change name
867 to __linuxthreads_pthread_sizeof_descr to match name used by
868 symbol_list_arr[LINUXTHREADS_PTHREAD_SIZEOF_DESCR] in
869 linuxthreads_db/td_symbol_list.c.
871 2001-09-22 Andreas Jaeger <aj@suse.de>
873 * linuxthreads/tst-context.c: Avoid compile warning.
875 2001-09-20 Andreas Jaeger <aj@suse.de>
877 * shlib-versions: Add x86-64.
879 2001-09-19 Andreas Jaeger <aj@suse.de>
881 * sysdeps/x86_64/Makefile: New file.
882 * sysdeps/x86_64/pspinlock.c: New file.
883 * sysdeps/x86_64/pt-machine.h: New file.
885 2001-09-12 Jakub Jelinek <jakub@redhat.com>
887 * sysdeps/pthread/timer_delete.c (timer_delete): Thread may be NULL
889 * sysdeps/pthread/timer_settime.c (timer_settime): Likewise.
891 2001-09-11 Ulrich Drepper <drepper@redhat.com>
892 Wolfram Gloger <wg@malloc.de>
894 * join.c: Protect all communications from and to manager with
896 * manager.c: Likewise.
897 * pthread.c: Likewise.
898 * smeaphore.c: Likewise.
900 2001-08-29 Ulrich Drepper <drepper@redhat.com>
902 * spinlock.c (__pthread_lock): Top max_count value with
903 MAX_ADAPTIVE_SPIN_COUNT.
904 * internals.h (MAX_ADAPTIVE_SPIN_COUNT): Define if not already done.
906 * sysdeps/i386/i686/pt-machine.h (BUSY_WAIT_NOP): New macro to
909 2001-08-27 Jakub Jelinek <jakub@redhat.com>
911 * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_t): Only define to
912 non-opaque type if __USE_UNIX98.
914 2001-08-26 Jakub Jelinek <jakub@redhat.com>
916 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_t): Define
917 non-opaque lock types also if _IO_MTSAFE_IO is defined.
919 2001-08-23 Roland McGrath <roland@frob.com>
921 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start): Take
922 new first argument, skip the cleanup handler if it's zero.
923 (_LIBC_LOCK_RECURSIVE_INITIALIZER): New macro.
924 (__libc_lock_define_initialized_recursive): Use it.
925 * sysdeps/pthread/bits/stdio-lock.h: File removed.
926 The sysdeps/generic file from the main tree now suffices.
928 2001-08-22 Roland McGrath <roland@frob.com>
930 * sysdeps/pthread/bits/stdio-lock.h: Include <bits/libc-lock.h>
931 instead of <pthread.h>.
932 (_IO_lock_t): Define this typedef using __libc_lock_define_recursive.
933 (_IO_lock_initializer): Add braces.
934 (_IO_lock_lock): Use __libc_lock_lock_recursive.
935 (_IO_lock_unlock): Use __libc_lock_unlock_recursive.
937 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_recursive_t): New type.
938 (__libc_lock_define_initialized_recursive): Use it.
939 (__libc_lock_init_recursive): Likewise.
940 (__libc_lock_fini_recursive): Likewise.
941 (__libc_lock_lock_recursive): Likewise.
942 (__libc_lock_trylock_recursive): Likewise.
943 (__libc_lock_unlock_recursive): Likewise.
944 (__libc_lock_define_recursive): New macro.
946 2001-08-14 Jakub Jelinek <jakub@redhat.com>
948 * lockfile.c (__pthread_provide_lockfile): New variable.
949 * pthread.c (__pthread_require_lockfile): New variable.
950 * cancel.c (__pthread_require_lockfile): New variable.
952 2001-07-31 Ulrich Drepper <drepper@redhat.com>
954 * tst-context.c (threadfct): Initialize context before calling
957 * Examples/ex17.c: Make sure test thread is around long enough.
959 2001-07-26 kaz Kojima <kkojima@rr.iij4u.or.jp>
961 * sysdeps/sh/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF): Defined.
963 2001-07-24 Ulrich Drepper <drepper@redhat.com>
965 * tst-context.c (main): Print explanation before bailing out
966 because context handling is not supported.
968 2001-07-23 Ulrich Drepper <drepper@redhat.com>
970 * Makefile (tests): Add tst-context.
971 * tst-context.c: New file.
973 * sysdeps/pthread/bits/stdio-lock.h: Define
974 _IO_cleanup_region_start_noarg.
976 2001-07-23 Jakub Jelinek <jakub@redhat.com>
978 * sysdeps/alpha/pt-machine.h (FLOATING_STACKS): Define.
979 (ARCH_STACK_MAX_SIZE): Define.
980 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
981 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
983 2001-07-19 Jakub Jelinek <jakub@redhat.com>
985 * sysdeps/i386/useldt.h: Fix typo in ARCH_STACK_MAX_SIZE comment.
987 * sysdeps/ia64/pt-machine.h (FLOATING_STACKS): Define.
988 (ARCH_STACK_MAX_SIZE): Define.
989 * manager.c (pthread_allocate_stack): Handle FLOATING_STACKS with
990 NEED_SEPARATE_REGISTER_STACK.
992 2001-07-16 Andreas Schwab <schwab@suse.de>
994 * Makefile (before-compile): Don't add $(objpfx)crti.o.
995 (omit-deps): Add crti.
996 ($(objpfx)libpthread.so): Depend on $(objpfx)crti.o, but make sure
997 it is filtered out of the link command.
999 2001-07-16 Ulrich Drepper <drepper@redhat.com>
1001 * pthread.c (pthread_initialize): For FLOATING_STACKS don't bother
1002 to find the right value for __pthread_initial_thread_bos, it's not
1003 used. If not FLOATING_STACKS first run
1004 __pthread_init_max_stacksize.
1006 2001-06-16 H.J. Lu <hjl@gnu.org>
1008 * internals.h: Include <stackinfo.h>.
1010 * attr.c: Don't include <stackinfo.h> here.
1011 * cancel.c: Likewise.
1012 * manager.c: Likewise.
1013 * pthread.c: Likewise.
1014 * ptlongjmp.c: Likewise.
1016 2001-03-23 Matthew Wilcox <willy@ldl.fc.hp.com>
1018 * attr.c: Make _STACK_GROWS_UP work.
1019 * internals.h: Likewise.
1020 * manager.c: Likewise.
1021 * pthread.c: Likewise.
1023 2001-06-15 H.J. Lu <hjl@gnu.org>
1025 * pthread.c (__pthread_reset_main_thread): Fix a typo.
1027 2001-02-02 John S. Marvin <jsm@udlkern.fc.hp.com>
1029 * semaphore.h: Use struct _pthread_fastlock as an element of
1030 sem_t instead of an identical struct.
1031 * rwlock.c: Remove casts.
1032 * semaphore.c: Likewise.
1034 2001-04-30 Alan Modra <amodra@one.net.au>
1036 * sysdeps/unix/sysv/linux/hppa/pt-initfini.c: New.
1038 2001-05-25 Bruce Mitchener <bruce@cubik.org>
1040 * linuxthreads.texi: Spelling corrections.
1042 2001-05-25 Ulrich Drepper <drepper@redhat.com>
1044 * oldsemaphore.c (__old_sem_wait): Clear p_nextwaiting before
1045 returning successfully.
1046 Patch by Gene Cooperman <gene@ccs.neu.edu>.
1048 2001-05-24 Ulrich Drepper <drepper@redhat.com>
1050 * spinlock.c (__pthread_lock) [HAS_COMPARE_AND_SWAP]: Before doing any
1051 serious work try once whether the lock is uncontested.
1052 Remove duplicate reading of __status before loop.
1053 Change suggested by Hans Boehm <hans_boehm@hp.com>.
1055 * spinlock.h (__pthread_trylock): Remove need for oldstatus variable.
1056 (__pthread_alt_trylock): Likewise.
1058 2001-05-01 Kaz Kylheku <kaz@ashi.footprints.net>
1060 Memory barrier overhaul following line by line inspection.
1061 * mutex.c (pthread_once): Missing memory barriers added.
1062 * pthread.c (__pthread_wait_for_restart_signal,
1063 __pthread_timedsuspend_new, __pthread_restart_new): Added
1064 memory barriers ``just in case'' and for documentary value.
1065 * spinlock.c (__pthread_release): New inline function for releasing
1066 spinlock, to complement __pthread_acquire. Includes memory
1067 barrier prior to assignment to spinlock, and __asm __volatile
1068 dance to prevent reordering or optimization of the spinlock access.
1069 * spinlock.c (__pthread_unlock, __pthread_alt_lock,
1070 __pthread_alt_timedlock, __pthread_alt_unlock,
1071 __pthread_compare_and_swap): Updated to use new __pthread_release
1072 instead of updating spinlock directly.
1073 * spinlock.c (__pthread_lock, __pthread_unlock, wait_node_alloc,
1074 wait_node_free, wait_node_dequeue, __pthread_alt_lock,
1075 __pthread_alt_timedlock, __pthread_alt_unlock, __pthread_acquire):
1076 Memory barrier overhaul. Lots of missing memory barriers added,
1077 a couple needless ones removed.
1078 * spinlock.c (__pthread_compare_and_swap): testandset optimization
1079 removed, just calls __pthread_acquire, which has the new read
1080 barrier in it before its testandset.
1082 2001-05-20 Roland McGrath <roland@frob.com>
1084 * Makeconfig: New file, variables used to be in main libc Makeconfig.
1086 2001-05-09 Geoff Keating <geoffk@redhat.com>
1088 * sysdeps/powerpc/pt-machine.h
1089 (HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS): Define.
1090 (__compare_and_swap): Remove memory barriers.
1091 (__compare_and_swap_with_release_semantics): New function.
1093 2001-04-24 Andreas Jaeger <aj@suse.de>
1095 * wrapsyscall.c: send* and recv* return ssize_t.
1097 * sysdeps/pthread/timer_getoverr.c (timer_getoverrun): Unlock the
1098 mutex instead of double locking it.
1099 Reported by Pierre Artaud <partaud@sodatec.com>.
1101 2001-04-23 Ulrich Drepper <drepper@redhat.com>
1103 * sysdeps/pthread/getcpuclockid.c: Make function generic, test
1104 using #ifdef whether the clock is available.
1105 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c: Removed.
1107 * sysdeps/ia64/Versions: New file.
1109 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init): We don't
1110 have to call __gmon_start__ in the libpthread DSO.
1111 * sysdeps/pthread/pt-initfini.c (_init): Likewise.
1113 * Makefile (libpthread-routines): Add ptclock_gettime and
1115 * internals.h: Don't use cpuclock-init.h definitions, use
1116 hp-timing.h definitions.
1117 * pthread.c: Likewise.
1118 * manager.c: Likewise.
1119 * ptclock_gettime.c: New file.
1120 * ptclock_settime.c: New file.
1121 * internals.h: Fix parameter type for __pthread_clock_gettime and
1122 __pthread_clock_settime.
1124 * sysdeps/i386/i586/ptclock_gettime.c: Removed.
1125 * sysdeps/i386/i586/ptclock_settime.c: Removed.
1126 * sysdeps/i386/i586/Makefile: Removed.
1128 2001-04-22 Ulrich Drepper <drepper@redhat.com>
1130 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_ASYNCH_IO.
1131 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1133 2001-04-21 Andreas Jaeger <aj@suse.de>
1135 * sysdeps/pthread/timer_routines.c (thread_func): Add noreturn
1136 attribute, remove statements that will never be executed.
1137 (thread_func): Remove mutex_unlock call since it's never executed.
1138 (thread_func): Fix comment as suggested by Jakub Jelinek.
1140 * manager.c (__pthread_manager): Add noreturn
1142 (pthread_start_thread): Likewise, remove return statement.
1143 (pthread_start_thread_event): Likewise.
1144 Add noreturn attribute for pthread_handle_exit.
1145 * weaks.c: Add noreturn attribute for pthread_exit.
1147 * internals.h: Add __pthread_clock_gettime and
1148 __pthread_clock_settime prototypes.
1150 2001-04-21 Ulrich Drepper <drepper@redhat.com>
1152 * internals.h: Include <cpuclock-init.h>.
1153 (struct _pthread_descr_struct): Add p_cpuclock_offset field if
1154 CPUCLOCK_VARDEF is defined.
1155 * pthread.c (__pthread_initialize_minimal): Initialize
1156 p_cpuclock_offset field for main thread if CPUCLOCK_INIT is defined.
1157 * manager.c (pthread_start_thread): Set p_cpuclock_offset field
1158 for new thread to current CPU clock value.
1160 * sysdeps/i386/useldt.h: Extend all the macros to handle 8-byte values.
1162 * sysdeps/i386/i586/Makefile: New file.
1163 * sysdeps/i386/i586/Versions: New file.
1164 * sysdeps/i386/i586/ptclock_gettime.c: New file.
1165 * sysdeps/i386/i586/ptclock_settime.c: New file.
1166 * sysdeps/i386/i686/Implies: New file.
1168 2001-04-18 Jakub Jelinek <jakub@redhat.com>
1170 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: Put specs into
1171 $generated, not $postclean-generated.
1173 2001-04-18 Andreas Jaeger <aj@suse.de>
1175 * Makefile (otherlibs): Added.
1177 2001-04-18 Jakub Jelinek <jakub@redhat.com>
1179 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
1181 2001-04-16 Ulrich Drepper <drepper@redhat.com>
1183 * signals.c (sigwait): NSIG is no signal number. Block all
1184 signals while in signal handler for signals in SET.
1185 Patch by Manfred Spraul <manfred@colorfullife.com>.
1187 2001-04-12 Ulrich Drepper <drepper@redhat.com>
1189 * tst-cancel.c: Disable most tests. Add new test where all
1190 cleanup handlers must run.
1191 * Makefile (tests): Add tst-cancel again.
1193 * cancel.c (__pthread_perform_cleanup): Correct condition for
1194 leaving cleanup loop early.
1196 * sysdeps/i386/Makefile: Make sure gcc uses a frame pointer for
1197 all the files which use CURRENT_STACK_FRAME.
1198 * sysdeps/i386/pt-machine.h (CURRENT_STACK_FRAME): Define using
1199 __builtin_frame_address.
1200 * sysdeps/i386/i686/pt-machine.h: Likewise.
1202 2001-04-11 Ulrich Drepper <drepper@redhat.com>
1204 * Makefile (tests): Comment out tst-cancel for now.
1206 * tst-cancel.c (main): Cleanup 4 is supposed to run. Create
1207 temporary file in object directory.
1208 * Makefile: Don't allow inlining when compiling tst-cancel.c.
1209 Pass $(objpfx) to tst-cancel.
1211 2001-04-11 David S. Miller <davem@redhat.com>
1213 * sysdeps/sparc/sparc32/pt-machine.h (stack_pointer): Advance
1214 up closer to user local variables so that new cleanup heuristics work.
1215 * sysdeps/sparc/sparc64/pt-machine.h (stack_pointer): Likewise.
1217 2001-04-11 Ulrich Drepper <drepper@redhat.com>
1219 * cancel.c (_pthread_cleanup_push): Catch invalid __prev buffer
1221 (_pthread_cleanup_push_defer): Likewise.
1223 * tst-cancel.c (main): Fix loop printing cleanup output.
1225 2001-04-10 kaz Kojima <kkojima@rr.iij4u.or.jp>
1227 * sysdeps/sh/pspinlock.c (__pthread_spin_lock): Fix a reverse
1229 (__pthread_spin_trylock): Likewise.
1230 * sysdeps/sh/pt-machine.h (testandset): Likewise.
1232 2001-04-10 Ulrich Drepper <drepper@redhat.com>
1234 * join.c (pthread_exit): Move code to new function __pthread_do_exit
1235 which takes an extra parameter with the current frame pointer.
1236 Call new function with CURRENT_STACK_FRAME.
1237 (__pthread_do_exit): New function. Call __pthread_perform_cleanup
1238 with the new parameter.
1239 (pthread_join): Call __pthread_do_exit instead of pthread_exit.
1240 * cancel.c (__pthread_perform_cleanup): Takes extra parameter. Use
1241 this parameter as the initial value the cleanup handler records are
1242 compared against. No active cleanup handler record must have an
1243 address lower than the previous one and the initial record must be
1244 above (below on PA) the frame address passed in.
1245 (pthread_setcancelstate): Call __pthread_do_exit instead of
1247 (pthread_setcanceltype): Likewise.
1248 (pthread_testcancel): Likewise.
1249 (_pthread_cleanup_pop_restore): Likewise.
1250 * condvar.c (pthread_cond_wait): Likewise.
1251 (pthread_cond_timedwait_relative): Likewise.
1252 * manager.c (pthread_start_thread): Likewise.
1253 * oldsemaphore.c (__old_sem_wait): Likewise.
1254 * pthread.c (pthread_handle_sigcancel): Likewise.
1255 * semaphore.c (__new_sem_wait): Likewise.
1256 (sem_timedwait): Likewise.
1257 * ptlongjmp.c (pthread_cleanup_upto): Also use current stack frame
1258 to limit the cleanup handlers which get run.
1259 * internals.h: Add prototype for __pthread_do_exit. Adjust prototype
1260 for __pthread_perform_cleanup.
1262 * Makefile (tests): Add tst-cancel.
1263 * tst-cancel.c: New file.
1265 2001-04-08 Hans-Peter Nilsson <hp@axis.com>
1267 * sysdeps/cris/pt-machine.h: New file.
1268 * sysdeps/cris/pspinlock.c: New file.
1270 2001-04-09 Hans-Peter Nilsson <hp@axis.com>
1272 * shlib-versions: Add case for Linux on CRIS.
1274 2001-03-26 Ulrich Drepper <drepper@redhat.com>
1276 * attr.c (pthread_getattr_np): Correct computation of stack size
1277 for machiens with register stack.
1279 * Examples/ex17.c (main): Correct detection of failed mmap call.
1281 2001-03-21 Jakub Jelinek <jakub@redhat.com>
1283 * pthread.c (__pthread_initialize_manager): Fix a typo.
1285 2001-03-21 Jakub Jelinek <jakub@redhat.com>
1287 * attr.c (__pthread_attr_setstack): Fix alignment check.
1288 (pthread_getattr_np): __stackaddr is top of stack, not bottom.
1289 * Makefile (tests): Add ex17 test.
1290 * Examples/ex17.c: New test.
1292 2001-03-20 Ulrich Drepper <drepper@redhat.com>
1294 * Makefile: Define -D_RPC_THREAD_SAFE_ for cancel.c.
1295 * cancel.c (__pthread_perform_cleanup): Call __rpc_thread_destroy.
1296 * sysdeps/pthread/bits/libc-tsd.h: Define _LIBC_TSD_KEY_VARS.
1298 2001-03-18 Ulrich Drepper <drepper@redhat.com>
1300 * Makefile: When generating DSO link with libc_nonshared.a.
1302 2001-02-26 Jakub Jelinek <jakub@redhat.com>
1304 * signals.c (pthread_sighandler): Use CALL_SIGHANDLER.
1306 2001-02-23 Jakub Jelinek <jakub@redhat.com>
1308 * internals.h (__pthread_init_max_stacksize): New prototype.
1309 * attr.c (__pthread_attr_setstacksize): Call
1310 __pthread_init_max_stacksize if not yet initialized.
1311 * pthread.c (__pthread_init_max_stacksize): New function.
1312 (__pthread_initialize_manager): Call it.
1313 Patch by <dtc@cmucl.cons.org>.
1315 2001-03-16 Ulrich Drepper <drepper@redhat.com>
1317 * attr.c (pthread_getattr_np): Fix __stacksize computation for IA-64.
1319 2001-03-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
1321 * shlib-versions: Add rule for Linux on 64 bit S/390.
1322 * sysdeps/s390/s390-64/pt-machine.h: New file.
1323 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
1325 2001-03-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
1327 * sysdeps/s390/pt-machine.h: Move to...
1328 * sysdeps/s390/s390-32/pt-machine.h: ...here.
1329 Add defines for FLOATING_STACK and ARCH_STACK_MAX_SIZE.
1331 2001-03-15 Ulrich Drepper <drepper@redhat.com>
1333 * Versions [libpthread] (GLIBC_2.2.3): Add pthread_getattr_np.
1334 * attr.c: Implement pthread_getattr_np.
1335 * sysdeps/pthread/pthread.h: Add prototype for pthread_getattr_np.
1336 * internals.h (struct _pthread_descr_struct): Add p_inheritsched.
1337 * manager.c (pthread_handle_create): Initialize p_inheritsched.
1339 2001-03-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
1341 * sysdeps/unix/sysv/linux/s390/pt-initfini.c: Use 0x07 padding for
1344 2001-02-20 Hans Boehm <hans_boehm@hp.com>
1346 * manager.c (manager_mask): Removed static vesion. Now always local
1347 to __pthread_manager().
1348 (manager_mask_all): Removed completely.
1349 (__pthread_manager): Remove manager_mask_all initialization.
1350 (pthread_handle_create): Remove code to set and reset signal mask
1351 around __clone2() calls.
1353 2001-02-17 Jakub Jelinek <jakub@redhat.com>
1355 * spinlock.c (__pthread_lock): Force lock->__status to be read from
1356 memory on every spin.
1358 2001-02-10 Andreas Jaeger <aj@suse.de>
1360 * Makefile (extra-objs): New.
1362 2001-02-09 Jakub Jelinek <jakub@redhat.com>
1364 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Add
1365 __pthread_initialize_minimal prototype.
1367 2001-02-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
1369 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
1371 2001-02-06 Martin Schwidefsky <schwidefsky@de.ibm.com>
1373 * sysdeps/unix/sysv/linux/s390/pt-initfini.c: New file.
1375 2001-02-06 Ulrich Drepper <drepper@redhat.com>
1377 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: First attempt to fix the
1378 broken code. Patch by Jes Sorensen.
1380 2001-02-06 Andreas Jaeger <aj@suse.de>
1382 * sysdeps/pthread/pthread.h: Move __pthread_initialize from here
1384 * internals.h: ...here.
1386 2001-02-05 Jes Sorensen <jes@linuxcare.com>
1388 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
1390 2001-02-02 Ulrich Drepper <drepper@redhat.com>
1392 * Versions: Remove __pthread_initialize_minimal.
1394 2001-02-01 Ulrich Drepper <drepper@redhat.com>
1396 * Makefile: Add rules to build crti.o and make it being used in
1397 building libpthread.so.
1398 * sysdeps/i386/Makefile: New file.
1399 * sysdeps/pthread/pt-initfini.c: New file.
1401 * pthread.c: Cleanups.
1403 2001-01-28 Andreas Jaeger <aj@suse.de>
1405 * oldsemaphore.c (__old_sem_init): Adjust for last change.
1406 * sysdeps/pthread/bits/libc-lock.h: Likewise.
1407 * spinlock.c: Likewise.
1409 2001-01-28 Ulrich Drepper <drepper@redhat.com>
1411 * sysdeps/pthread/bits/initspin.h: Make all names namespace clean.
1412 * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: Likewise.
1413 * manager.c: Adjust for namespace cleanup in bits/initspin.h.
1414 * pthread.c: Likewise.
1415 * spinlock.h: Likewise.
1416 * sysdeps/pthread/pthread.h: Likewise.
1418 2001-01-26 Ulrich Drepper <drepper@redhat.com>
1420 * sysdeps/pthread/bits/pthreadtypes.h: Define pthread_attr_t also
1421 as struct __pthread_attr_s.
1423 * semaphore.h (sem_t): Cleanup namespace, rename status and
1426 2001-01-13 Jakub Jelinek <jakub@redhat.com>
1428 * pthread.c (pthread_onexit_process): Clear
1429 __pthread_manager_thread_bos after freeing it.
1430 * Makefile (tests): Add ex16.
1431 * Examples/ex16.c: New file.
1433 2001-01-11 Jakub Jelinek <jakub@redhat.com>
1435 * Makefile (CFLAGS-pthread.c): Pass -DHAVE_Z_NODELETE if ld supports
1437 * pthread.c (pthread_exit_process): Rename to...
1438 (pthread_onexit_process): ...this.
1439 (pthread_atexit_process, pthread_atexit_retcode): New.
1440 (pthread_initialize): Call __cxa_atexit instead of __cxa_on_exit
1441 and only if HAVE_Z_NODELETE is not defined.
1442 (__pthread_initialize_manager): Register pthread_atexit_retcode
1445 2001-01-11 Ulrich Drepper <drepper@redhat.com>
1447 * pthread.c (pthread_initialize): Use __cxs_on_exit not __cxa_atexit.
1449 2001-01-11 Jakub Jelinek <jakub@redhat.com>
1451 * Makefile (tests): Add ex15.
1452 * Examples/ex15.c: New test.
1454 2001-01-08 Ulrich Drepper <drepper@redhat.com>
1456 * pthread.c (pthread_exit_process): Free memory allocated for
1459 2000-12-31 Ulrich Drepper <drepper@redhat.com>
1461 * manager.c (pthread_alloca_stack): Remove MAP_FIXED from mmap calls.
1462 (pthread_free): Always unmap the stack. It's safe now that we don't
1463 use MAP_FIXED to allocate stacks.
1465 2000-12-31 Ulrich Drepper <drepper@redhat.com>
1467 * sysdeps/powerpc/pspinlock.c: Don't include pt-machine.h here.
1469 * manager.c (pthread_allocate_stack): Prepare for removal of MAP_FIXED.
1471 2000-11-15 Wolfram Gloger <wg@malloc.de>
1473 * manager.c (pthread_free): [!FLOATING_STACKS]: Only remap the
1474 stack to PROT_NONE, don't unmap it, avoiding collisions with malloc.
1476 2000-12-27 Andreas Jaeger <aj@suse.de>
1478 * Examples/ex13.c: Make local functions static.
1479 * ecmutex.c: Likewise.
1480 * joinrace.c: Likewise.
1481 * Examples/ex14.c: Likewise.
1483 * Examples/ex2.c: Make local functions static; reformat.
1484 * Examples/ex1.c: Likewise.
1485 * Examples/ex4.c: Likewise.
1486 * Examples/ex5.c: Likewise.
1487 * Examples/ex7.c: Likewise.
1489 * oldsemaphore.c: Add prototypes to shut up GCC.
1490 * pt-machine.c: Likewise.
1492 * weaks.c: Add prototype for pthread_exit.
1494 * internals.h: Add some prototypes, format prototypes and add
1496 Move __libc_waitpid prototype to include/sys/wait.h.
1498 * rwlock.c: Include <bits/libc-lock.h> for prototypes.
1499 * mutex.c: Likewise.
1500 * specific.c: Likewise.
1501 * ptfork.c: Likewise.
1503 * lockfile.c: Include internals.h to get prototypes.
1504 * events.c: Likewise.
1505 * sysdeps/alpha/pspinlock.c: Likewise.
1506 * sysdeps/arm/pspinlock.c: Likewise.
1507 * sysdeps/hppa/pspinlock.c: Likewise.
1508 * sysdeps/i386/pspinlock.c: Likewise.
1509 * sysdeps/ia64/pspinlock.c: Likewise.
1510 * sysdeps/m68k/pspinlock.c: Likewise.
1511 * sysdeps/mips/pspinlock.c: Likewise.
1512 * sysdeps/powerpc/pspinlock.c: Likewise.
1513 * sysdeps/s390/pspinlock.c: Likewise.
1514 * sysdeps/sh/pspinlock.c: Likewise.
1515 * sysdeps/sparc/sparc32/pspinlock.c: Likewise.
1516 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: Likewise.
1517 * sysdeps/sparc/sparc64/pspinlock.c: Likewise.
1519 2000-12-27 Ulrich Drepper <drepper@redhat.com>
1521 * attr.c (__pthread_attr_setstack): Fix setting of __stackaddr element.
1522 (__pthread_attr_getstack): Return correct address.
1523 Add warnings for using pthread_attr_getstackaddr and
1524 pthread_attr_setstackaddr.
1526 2000-12-26 Ulrich Drepper <drepper@redhat.com>
1528 * Examples/ex6.c (test_thread): Make static.
1529 * Examples/ex12.c (test_thread): Make static and add noreturn
1532 2000-12-18 Jes Sorensen <jes@linuxcare.com>
1534 * linuxthreads/sysdeps/ia64/pt-machine.h: __compare_and_swap
1535 and compare_and_swap_with_release_semantics returns int not long.
1537 2000-12-17 Andreas Jaeger <aj@suse.de>
1539 * sysdeps/s390/pt-machine.h (testandset): Use long int as return
1541 * sysdeps/arm/pt-machine.h (testandset): Likewise.
1542 * sysdeps/hppa/pt-machine.h (testandset): Likewise.
1543 * sysdeps/m68k/pt-machine.h (testandset): Likewise.
1544 * sysdeps/sh/pt-machine.h (testandset): Likewise.
1545 * sysdeps/sparc/sparc32/pt-machine.h (testandset): Likewise.
1546 * sysdeps/sparc/sparc64/pt-machine.h (testandset): Likewise.
1548 2000-12-17 Ulrich Drepper <drepper@redhat.com>
1550 * sysdeps/i386/pt-machine.h (testandset): Adjust for prototype change.
1551 * sysdeps/i386/i686/pt-machine.h (testandset): Likewise.
1553 2000-12-17 Andreas Jaeger <aj@suse.de>
1555 * internals.h: Add prototypes for testandset and
1556 __compare_and_swap to shut up gcc warnings.
1558 2000-12-06 Wolfram Gloger <wg@malloc.de>
1560 * join.c (pthread_detach): Allow case where the thread has already
1563 2000-12-05 Andreas Jaeger <aj@suse.de>
1565 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Don't set mips2.
1566 * sysdeps/mips/pt-machine.h (testandset): Likewise.
1567 (__compare_and_swap): Likewise.
1568 Patches by Maciej W. Rozycki <macro@ds2.pg.gda.pl>.
1570 2000-11-20 Jakub Jelinek <jakub@redhat.com>
1572 * Examples/ex3.c (main): Cast int to long before casting to void *.
1573 (search): Cast void * to long, not int.
1574 * Examples/ex8.c (main, thread): Similarly.
1575 * Examples/ex11.c (main): Similarly.
1576 * Examples/ex14.c (worker, do_test): Similarly.
1577 * ecmutex.c (worker, do_test): Similarly.
1578 (nlocks): Cast to int.
1580 2000-11-08 Bruce Mitchener <bruce@cubik.org>
1582 * linuxthreads.texi: Add documentation for pthreads attributes
1583 guardsize, stackaddr, stacksize, and stack. Fix typo in previous
1584 patch. Document pthread_[sg]etconcurrency(). Mark
1585 pthread_mutexattr_[sg]ettype() as POSIX rather than GNU.
1587 2000-11-07 Ulrich Drepper <drepper@redhat.com>
1589 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
1591 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1592 Reported by Christopher Yeoh <cyeoh@linuxcare.com.au>.
1594 2000-11-06 Ulrich Drepper <drepper@redhat.com>
1596 * cancel.c (pthread_cancel): Always set p_canceled, even if we are
1597 not doing it right now.
1598 Reported by Kaz Kylheku <kaz@ashi.footprints.net>.
1600 2000-10-30 Ulrich Drepper <drepper@redhat.com>
1602 * Examples/ex4.c (main): Don't use exit() to avoid warning with
1605 2000-10-29 Ulrich Drepper <drepper@redhat.com>
1607 * attr.c (__pthread_attr_setguardsize): Don't round guardsize
1608 here. Reported by Bruce Mitchener <bruce@cubik.org>.
1610 * linuxthreads.texi: Changes terminology to 'type' from 'kind' when
1611 discussing mutexes. (As per the Unix98 name for the API.)
1612 Changes documentation for pthread_mutexattr_setkind_np() and
1613 pthread_mutexattr_getkind_np() over to the Unix98 APIs for the
1614 same: pthread_mutexattr_settype() and pthread_mutexattr_gettype().
1615 Changes references to PTHREAD_MUTEXATTR_FAST_NP to
1616 PTHREAD_MUTEXATTR_ADAPTIVE_NP.
1617 Begins to introduce discussion of the ``timed'' mutex type. This
1618 discussion is currently incomplete.
1619 Patch by Bruce Mitchener <bruce@cubik.org>.
1621 2000-10-26 Kazumoto Kojima <kkojima@rr.iij4u.or.jp>
1622 Yutaka Niibe <gniibe@chroot.org>
1624 * sysdeps/sh/pt-machine.h (testandset): Since the operand of TAS.B
1625 has restrictions, use register.
1627 2000-10-23 Andreas Schwab <schwab@suse.de>
1629 * Examples/ex14.c (TIMEOUT): Override default timeout.
1631 2000-10-16 Ulrich Drepper <drepper@redhat.com>
1633 * specific.c: Protect tsd array modification in thread data
1634 structures by getting the thread lock in pthread_key_delete and
1635 __pthread_destroy_specifics.
1636 Patch by Wolfram Gloger <Wolfram.Gloger@dent.med.uni-muenchen.de>.
1638 2000-10-12 Alan Modra <alan@linuxcare.com.au>
1640 * sysdeps/pthread/bits/initspin.h: New file.
1641 * spinlock.h: Move LOCK_INITIALIZER definition to <bits/initspin.h>.
1642 (__pthread_init_lock): Initialize lock with LT_SPINLOCK_INIT.
1643 (__pthread_alt_init_lock): Likewise.
1644 (__pthread_alt_trylock): Release lock with LT_SPINLOCK_INIT.
1646 2000-10-12 David Huggins-Daines <dhd@linuxcare.com>
1648 * oldsemaphore.c (__old_sem_init): Release lock with
1649 LT_SPINLOCK_INIT, not zero.
1650 * spinlock.c (__pthread_unlock): Likewise.
1651 (__pthread_alt_lock): Likewise.
1652 (__pthread_alt_timedlock): Likewise.
1653 (__pthread_alt_unlock): Likewise.
1654 * sysdeps/pthread/bits/libc-lock.h: Initialize locks with
1655 LT_SPINLOCK_INIT if it is non-zero. Likewise for init-once flags.
1656 * sysdeps/pthread/pthread.h: Include bits/initspin.h. Use
1657 LT_SPINLOCK_INIT do initialize spinlocks not 0.
1659 2000-10-12 David Huggins-Daines <dhd@linuxcare.com>
1661 * shlib-versions: Add version definitions for hppa-linux.
1663 2000-10-12 Alan Modra <alan@linuxcare.com.au>
1665 * sysdeps/hppa/pspinlock.c: New file.
1666 * sysdeps/hppa/pt-machine.h: New file.
1667 * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: New file.
1669 2000-10-05 Jakub Jelinek <jakub@redhat.com>
1671 * mutex.c (__pthread_mutex_destroy): Correct test of
1672 busy mutex for mutexes using alternate fastlocks.
1673 Patch by dtc@cmucl.cons.org.
1675 2000-09-28 Martin Schwidefsksy <schwidefsky@de.ibm.com>
1677 * sysdeps/s390/pt-machine.h: Make %a0 the thread register.
1679 2000-09-28 Ulrich Drepper <drepper@redhat.com>
1681 * mutex.c (__pthread_mutex_unlock): For PTHREAD_MUTEX_RECURSIVE_NP
1682 test for owner first.
1683 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1685 * cancel.c (pthread_cancel): Don't do anything if cancelation is
1688 2000-09-26 Ulrich Drepper <drepper@redhat.com>
1690 * spinlock.h (__pthread_set_own_extricate_if): Optimize a bit.
1691 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1693 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
1694 _POSIX_MONOTONIC_CLOCK.
1696 * spinlock.h (__pthread_set_own_extricate_if): Add back locking
1699 2000-09-20 Andreas Jaeger <aj@suse.de>
1701 * pthread.c [!__ASSUME_REALTIME_SIGNALS]: Make inclusion of
1702 "testrtsig.h" conditional.
1704 2000-09-11 Ulrich Drepper <drepper@redhat.com>
1706 * sysdeps/pthread/pthread.h: Declare pthread_attr_getstack and
1707 pthread_attr_setstack.
1708 * Versions [libpthread] (GLIBC_2.2): Export pthread_attr_getstack and
1709 pthread_attr_setstack.
1710 * attr.c (pthread_attr_getstack, pthread_attr_setstack): New functions.
1712 2000-09-05 Ulrich Drepper <drepper@redhat.com>
1714 * Examples/ex14.c: New file.
1715 * Makefile (tests): Add ex14.
1717 * mutex.c (__pthread_mutex_unlock): Correct test for already unlocked
1718 mutex. Patch by dtc@cmucl.cons.org.
1720 * ecmutex.c: New file.
1721 * Makefile (tests): Add ecmutex.
1723 2000-09-04 H.J. Lu <hjl@gnu.org>
1725 * attr.c (__pthread_attr_setguardsize): Use page_roundup
1726 instead of roundup to round up to the page size.
1728 2000-09-03 Mark Kettenis <kettenis@gnu.org>
1730 * manager.c (pthread_exited): Correctly report event as TD_REAP
1731 instead of TD_DEATH. Fix comments.
1733 2000-09-03 Ulrich Drepper <drepper@redhat.com>
1735 * spinlock.h (testandset): Add cast to avoid warning.
1736 Patch by Franz Sirl <Franz.Sirl-kernel@lauterbach.com>.
1738 2000-09-02 Andreas Jaeger <aj@suse.de>
1740 * sysdeps/pthread/timer_routines.c: Include stdlib.h for abort
1743 2000-09-01 Ulrich Drepper <drepper@redhat.com>
1745 * sysdeps/pthread/bits/stdio-lock.h (_IO_cleanup_region_start):
1746 Fix typo in last patch (_mode -> _flags).
1748 * sysdeps/pthread/bits/stdio-lock.h (_IO_cleanup_region_start):
1749 Provide definition which respects _IO_USER_LOCK flag.
1751 2000-08-30 Ulrich Drepper <drepper@redhat.com>
1753 * manager.c (pthread_allocate_stack): Clear descriptor only if not
1756 2000-08-25 Ulrich Drepper <drepper@redhat.com>
1758 * Makefile: Add rules to build and run unload.
1759 * unload.c: New file.
1761 * pthread.c (pthread_exit_process): Move thread_self use inside `if'.
1763 * sysdeps/pthread/pthread.h
1764 (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Defined.
1765 (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: Defined.
1767 2000-08-24 Andreas Jaeger <aj@suse.de>
1769 * Examples/ex13.c: Include <string.h> for strerror prototype and
1770 <stdlib.h> for abort prototype.
1771 (pthr_cond_signal_mutex): Rewrite to silence GCC.
1772 (thread_start): Remove unused variable err.
1773 (main): Silence GCC warnings.
1775 2000-08-22 Andreas Jaeger <aj@suse.de>
1777 * Examples/ex13.c: New test by Kurt Garloff <garloff@suse.de>.
1779 * Makefile (tests): Add ex13.
1781 2000-08-20 Ulrich Drepper <drepper@redhat.com>
1783 * semaphore.h: Add restrict where required by AGd4.
1784 * sysdeps/pthread/pthread.h: Likewise.
1785 * sysdeps/pthread/unix/sysv/linux/bits/sigthread.h: Likewise.
1787 2000-08-15 Ulrich Drepper <drepper@redhat.com>
1789 * Makefile (tests): Add ex12. Add rule to build it.
1790 * Examples/ex12.c: New file.
1792 2000-08-13 Ulrich Drepper <drepper@redhat.com>
1794 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_SEMAPHORES
1795 even though the implementation is not quite complete (but it reports
1796 it). Define _POSIX_MESSAGE_PASSING to -1.
1797 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1799 2000-08-12 Andreas Jaeger <aj@suse.de>
1801 * sysdeps/mips/pt-machine.h (testandset): Add .set mips2 for
1803 (__compare_and_swap): Likewise.
1804 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Likewise.
1806 2000-08-10 Ulrich Drepper <drepper@redhat.com>
1808 * pthread.c (__pthread_initial_thread): Initialize p_errnop and
1809 p_h_errnop correctly and not to NULL.
1811 2000-08-05 Ulrich Drepper <drepper@redhat.com>
1813 * Banner: Bump version number to 0.9.
1815 2000-08-04 Ulrich Drepper <drepper@redhat.com>
1817 * Makefile (tests): Add tststack. Add rule to build the program.
1818 * tststack.c: New file.
1820 * internals.h: Declare __pthread_max_stacksize.
1821 * pthread.c (__pthread_max_stacksize): New variable.
1822 (__pthread_initialize_manager): Determine __pthread_initialize_manager
1824 * manager.c (thread_segment): Return always NULL if FLOATING_STACKS.
1825 (pthread_allocate_stack): Allow kernel to choose stack address if
1826 FLOATING_STACKS. This also handles variable-sized stacks.
1827 Always allocate stack and guardpage together. Use mprotect to
1828 change guardpage access.
1829 * sysdeps/i386/useldt.h: Define FLOATING_STACKS and
1830 ARCH_STACK_MAX_SIZE.
1832 * attr.c (__pthread_attr_setstacksize): Also test value against
1835 * manager.c (__pthread_nonstandard_stacks): Define only if
1836 THREAD_SELF is not defined.
1837 (pthread_allocate_stack): Always initialize gardaddr to a correct
1839 (pthread_handle_create): Unmap thread with one call.
1840 (pthread_free): Remove test for initial thread before removing stack.
1841 Unmap stack with one call.
1843 * pthread.c (__pthread_initial_thread): Initialize p_userstack to
1844 1 to avoid removing the stack.
1846 2000-07-27 Jes Sorensen <jes@linuxcare.com>
1848 * sysdeps/ia64/pspinlock.c (__pthread_spin_lock): Add
1849 load of spin lock to prime the cache before the atomic compare and
1850 exchange operation (cmpxchg4). This avoids the spinning on the
1851 cmpxchg4 instruction and reduces movement of the cache line back
1852 and forth between the processors (explanation by Asis K. Mallick
1853 from Intel). This basically makes the implementation operate the
1854 same as the Linux kernel implementation.
1856 * shlib-versions: Use GLIBC_2_2 for Linux/ia64.
1857 * sysdeps/ia64/pspinlock.c: New file.
1859 2000-08-03 Ulrich Drepper <drepper@redhat.com>
1861 * pthread.c: Move definition of __pthread_set_own_extricate_if...
1862 * spinlock.h: ...here. Remove locking.
1863 * internals.h: Remove __pthread_set_own_extricate_if prototype.
1865 * rwlock.c: Use THREAD_GETMEM And THREAD_SETMEM.
1866 (rwlock_rd_extricate_func): Don't determine self, let
1867 __pthread_lock do it.
1868 (rwlock_wr_extricate_func): Likewise.
1869 (rwlock_have_already): Optimize *pself handling a bit.
1871 * mutex.c: Use __builtin_expect.
1872 * pthread.c: Likewise.
1874 2000-08-02 Andreas Jaeger <aj@suse.de>
1876 * sysdeps/s390/pspinlock.c: New file.
1877 * sysdeps/s390/pt-machine.h: New file.
1878 Patches by Martin Schwidefsky <schwidefsky@de.ibm.com>.
1880 2000-07-12 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
1882 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Implement for
1884 * sysdeps/mips/pt-machine.h (testandset): Likewise.
1886 2000-07-26 Andreas Jaeger <aj@suse.de>
1888 * pthread.c: Initialize p_sem_avail.
1890 2000-07-25 Ulrich Drepper <drepper@redhat.com>
1892 * internals.h (struct __pthread_descr_struct): Add p_sem_avail.
1893 * semaphore.c: Handle spurious wakeups.
1895 * sysdeps/pthread/pthread.h: Add back PTHREAD_MUTX_FAST_NP as an alias
1896 for PTHREAD_MUTEX_ADAPTIVE_NP for source code compatibility.
1898 * pthread.c (__pthread_set_own_extricate): Use THREAD_GETMEM.
1899 (__pthread_wait_for_restart): Likewise.
1901 * condvar.c (pthread_cond_wait): Also check whether thread is
1902 cancelable before aborting loop.
1903 (pthread_cond_timedwait): Likewise.
1905 * signals.c (pthread_sighandler): Remove special code to restrore
1907 (pthread_sighandler_t): Likewise.
1909 2000-07-25 Mark Kettenis <kettenis@gnu.org>
1911 * internals.h (__RES_PTHREAD_INTERNAL): Remove define.
1912 * pthread.c: Include <resolv.h>.
1913 (_res): Undefine. Add extern declaration.
1915 2000-07-24 Ulrich Drepper <drepper@redhat.com>
1917 * pthread.c (__pthread_initial_thread): Update initializer.
1918 (__pthread_manager_thread): Likewise.
1919 (pthread_initialize): Move setrlimit call to...
1920 (__pthread_initialize_manager): ...here.
1921 (__pthread_reset_main_thread): Reset also soft limit on stack size.
1923 * condvar.c: Handle spurious wakeups. [PR libc/1749].
1924 * internals.h (struct _pthread_descr_struct): Add p_condvar_avail.
1926 2000-07-21 Ulrich Drepper <drepper@redhat.com>
1928 * spinlock.h: If IMPLEMENT_TAS_WITH_CAS is defined use
1929 __compare_and_swap to define testandset.
1930 * sysdeps/powerpc/pt-machine.h: Add volatile to asms.
1931 Define IMPLEMENT_TAS_WITH_CAS.
1933 2000-07-20 Ulrich Drepper <drepper@redhat.com>
1935 * Makefile: Pass -z nodelete to linker for libpthread.so
1936 generation if it understand this option.
1938 2000-07-18 Mark Kettenis <kettenis@gnu.org>
1940 * manager.c (pthread_handle_create): Remove initialization of
1941 new_thread->p_res._sock.
1943 2000-07-19 Kaz Kylheku <kaz@ashi.footprints.net>
1945 Bugfixes to the variant of the code for machines with no compare
1948 * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Wait
1949 node was not being properly enqueued, due to failing to update
1950 the lock->__status field.
1952 * spinlock.c (__pthread_alt_timedlock): The oldstatus variable was
1953 being set inappropriately, causing the suspend function to be called
1954 with a null self pointer and crash.
1956 2000-07-18 Ulrich Drepper <drepper@redhat.com>
1958 * spinlock.h (__pthread_alt_trylock): Fix code used if no
1959 compare&swap is available.
1961 * spinlock.h (__pthread_trylock): Use __compare_and_swap, not
1964 * pthread.c (pthread_initialize): Don't use sysconf to determine
1965 whether the machine has more than one processor.
1967 * spinlock.c (__pthread_alt_timedlock): Add back one of the
1968 removed thread_self calls.
1970 2000-07-18 Kaz Kylheku <kaz@ashi.footprints.net>
1972 * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Changed
1973 __compare_and_swap to compare_and_swap in code which assumes
1974 compare swap is available.
1976 2000-07-18 Kaz Kylheku <kaz@ashi.footprints.net>
1978 * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Fixed
1979 bug whereby thr field of waitnode structure would not be correctly
1980 set unless a null self pointer is passed to the functions.
1981 Eliminated redundant calls to thread_self().
1983 2000-07-18 Jakub Jelinek <jakub@redhat.com>
1985 * pthread.c (__pthread_initialize_manager): Lock
1986 __pthread_manager_thread.p_lock before calling clone.
1988 2000-05-05 H.J. Lu <hjl@gnu.org>
1990 * sysdeps/ia64/pt-machine.h (__compare_and_swap): Change it to
1991 have acquire semantics.
1992 (__compare_and_swap_with_release_semantics): New inline
1994 (HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS): New macro.
1996 2000-01-28 Hans Boehm <hboehm@exch.hpl.hp.com>
1998 * manager.c: Fix the problem with signals at startup.
1999 Change the way that thread stacks are allocated on IA64.
2000 Clean up some of the guard page allocation stuff.
2002 1999-12-19 H.J. Lu <hjl@gnu.org>
2004 * internals.h (page_roundup): New.
2005 * attr.c (__pthread_attr_setguardsize); Use page_roundup
2007 * manager.c (pthread_allocate_stack): Make sure guardaddr is
2008 page aligned with page_roundup if NEED_SEPARATE_REGISTER_STACK
2011 1999-12-17 Hans Boehm <hboehm@exch.hpl.hp.com>
2013 * manager.c (pthread_allocate_stack): Unmap the stack top
2014 if failed to map the stack bottom.
2016 (pthread_free): Fix the guard page.
2018 * pthread.c (pthread_initialize): Set rlimit correctly for
2019 NEED_SEPARATE_REGISTER_STACK.
2021 1999-12-16 H.J. Lu <hjl@gnu.org>
2023 * pthread.c (__pthread_initialize_manager): Pass
2024 __pthread_manager_thread_bos instead of
2025 __pthread_manager_thread_tos to __clone2.
2027 1999-12-16 H.J. Lu <hjl@gnu.org>
2029 * manager.c (pthread_allocate_stack): Correct the calculation
2030 of "new_thread_bottom". Remove MAP_GROWSDOWN from mmap for
2033 1999-12-13 H.J. Lu <hjl@gnu.org>
2035 * sysdeps/ia64/pt-machine.h (__compare_and_swap): Added a stop
2036 bit after setting ar.ccv.
2038 1999-12-12 H.J. Lu <hjl@gnu.org>
2040 * manager.c (pthread_allocate_stack): Make the starting
2041 address of the stack bottom page aligned. FIXME: it may
2042 need changes in other places.
2043 (pthread_handle_create): Likewise.
2045 1999-12-11 Hans Boehm <hboehm@exch.hpl.hp.com>
2047 * manager.c (pthread_allocate_stack): Handle
2048 NEED_SEPARATE_REGISTER_STACK.
2049 (pthread_handle_create): Likewise.
2050 * pthread.c (__pthread_initialize_manager): Likewise.
2052 * sysdeps/ia64/pt-machine.h: Use r13 for thread pointer.
2054 1999-12-02 H.J. Lu <hjl@gnu.org>
2056 * sysdeps/ia64/pt-machine.h: New.
2058 2000-07-13 Ulrich Drepper <drepper@redhat.com>
2060 * wrapsyscall.c: Mark non-__ protected names as weak.
2063 2000-07-12 Bruno Haible <haible@clisp.cons.org>
2065 * Examples/ex8.c: Include <sys/wait.h>, not <wait.h>.
2067 2000-07-12 Ulrich Drepper <drepper@redhat.com>
2069 * spinlock.c: Fix code for TEST_FOR_COMPARE_AND_SWAP being defined.
2070 Add tests also to new alternative spinlock implementation.
2071 * spinlock.h: Likewise.
2072 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2074 2000-07-06 Ulrich Drepper <drepper@redhat.com>
2076 * Version: Export __sigaction.
2077 * signals.c: Define __sigaction alias. Use __libc_sigaction instead
2079 * pthread.c: Use __libc_sigaction instead of __sigaction.
2081 * condvar.c: Implement pthread_condattr_getpshared and
2082 pthread_condattr_setpshared.
2083 * mutex.c: Implement pthread_mutexattr_getpshared and
2084 pthread_mutexattr_setpshared.
2085 * Versions: Export new functions.
2086 * sysdeps/pthread/pthread.h: Add prototypes for new functions.
2088 * rwlock.c (pthread_rwlockattr_init): Use PTHREAD_PROCESS_PRIVATE.
2089 (pthread_rwlockattr_setpshared): Fail if PTHREAD_PROCESS_PRIVATE
2092 2000-07-04 Greg McGary <greg@mcgary.org>
2094 * sysdeps/pthread/bits/libc-lock.h: Remove BP_SYM from
2095 pragmas. Include bp-sym.h only if _LIBC.
2097 2000-07-04 Ulrich Drepper <drepper@redhat.com>
2099 * spinlock.c (__pthread_unlock): Properly place write barrier.
2100 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2102 2000-07-03 Ulrich Drepper <drepper@redhat.com>
2104 * spinlock.c: Replace fast spinlocks by adaptive spinlocks which are
2105 faster on SMP systems. No more emulation of compare&swap for adaptive
2107 * spinlock.h: Likewise.
2108 * sysdeps/pthread/pthread.h: Shuffle PTHREAD_MUTEX_* values around.
2109 Replace fast with adaptive mutex.
2110 * mutex.c: Rewrite for replacement of fast by adaptive mutex.
2111 * condvar.c: Likewise.
2112 * pthread.c: Define and initialize __pthread_smp_kernel variable.
2113 * internals.h: Declare __pthread_smp_kernel.
2114 * sysdeps/pthread/bits/pthreadtypes.h: Update comment of
2115 _pthread_fastlock structure.
2116 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2118 * pthread.c: Remove initialization to zero from global variables.
2120 2000-06-29 Jakub Jelinek <jakub@redhat.com>
2122 * shlib-versions: Make sparc64 GLIBC_2.2+ only.
2124 2000-06-28 Greg McGary <greg@mcgary.org>
2126 * weaks.c: Wrap BP_SYM () around weak extern declarations of
2127 pthread functions that have pointers in their return+arg signatures.
2129 2000-06-27 Greg McGary <greg@mcgary.org>
2131 * sysdeps/pthread/bits/libc-lock.h: Wrap BP_SYM () around weak
2132 extern declarations of pthread functions that have pointers in
2133 their return+arg signatures.
2135 2000-06-26 Ulrich Drepper <drepper@redhat.com>
2137 * Makefile (tests): Add ex11. Add rules to build it.
2138 * Examples/ex11.c: New file.
2139 * rwlock.c: Fix complete braindamaged previous try to implement
2142 * spinlock.c: Pretty print.
2144 2000-06-25 Ulrich Drepper <drepper@redhat.com>
2146 * Makefile (tests): Add ex10. Add rules to build it.
2147 * Versions [GLIBC_2.2] (libpthread): Add pthread_mutex_timedlock,
2148 pthread_rwlock_timedrdlock, and pthread_rwlock_timedwrlock.
2149 * condvar.c (pthread_cond_wait): Allow mutex of kind
2150 PTHREAD_MUTEX_TIMED_NP.
2151 (pthread_cond_timedwait_relative): Likewise.
2152 * mutex.c (__pthread_mutex_init): Default is PTHREAD_MUTEX_TIMED_NP.
2153 (__pthread_mutex_trylock): Use __pthread_alt_trylock for
2154 PTHREAD_MUTEX_ERRORCHECK_NP. Handle PTHREAD_MUTEX_TIMED_NP.
2155 (__pthread_mutex_lock): Use __pthread_alt_lock for
2156 PTHREAD_MUTEX_ERRORCHECK_NP. Handle PTHREAD_MUTEX_TIMED_NP.
2157 (__pthread_mutex_timedlock): New function.
2158 (__pthread_mutex_unlock): Use __pthread_alt_unlock for
2159 PTHREAD_MUTEX_ERRORCHECK_NP. Handle PTHREAD_MUTEX_TIMED_NP.
2160 (__pthread_mutexattr_init): Use PTHREAD_MUTEX_TIMED_NP.
2161 (__pthread_mutexattr_settype): Allow PTHREAD_MUTEX_TIMED_NP.
2162 * spinlock.c: Implement alternate fastlocks.
2163 * spinlock.h: Add prototypes.
2164 * Examples/ex10.c: New file.
2165 * sysdeps/pthread/pthread.h: Add prototypes for new functions.
2166 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2168 * rwlock.c (__pthread_rwlock_rdlock): Optimize loop a bit.
2169 (__pthread_rwlock_timedrdlock): New function.
2170 (__pthread_rwlock_timedwrlock): New function.
2171 Use laternate fastlock function everywhere.
2173 2000-06-21 Andreas Jaeger <aj@suse.de>
2175 * sysdeps/pthread/timer_routines.c: Include <string.h> for memset
2178 * join.c: Include <stdlib.h> for exit prototype.
2180 2000-06-20 Ulrich Drepper <drepper@redhat.com>
2182 * sysdeps/i386/useldt.h: Include <stdlib.h>.
2184 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_BARRIERS.
2185 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
2187 * Makefile (libpthread-routines): Add barrier.
2188 (tests): Add ex9. Add rule to build ex9.
2189 * Versions: Export barrier functions.
2190 * barrier.c: New file.
2191 * Examples/ex9.c: New file.
2192 * sysdeps/pthread/pthread.h: Add barrier data types and declarations.
2193 * sysdeps/pthread/bits/pthreadtypes.h: Likewise.
2194 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2196 2000-06-19 H.J. Lu <hjl@gnu.org>
2198 * spinlock.h (HAS_COMPARE_AND_SWAP): Defined if
2199 HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS is defined.
2200 (compare_and_swap_with_release_semantics): New. Default to
2201 compare_and_swap if HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS
2204 * spinlock.c (__pthread_unlock): Call
2205 compare_and_swap_with_release_semantics () instead of
2206 compare_and_swap ().
2208 2000-06-19 Ulrich Drepper <drepper@redhat.com>
2210 * sysdeps/pthread/timer_create.c: Use _set_errno instead of assigning
2212 * sysdeps/pthread/timer_delete.c: Likewise.
2213 * sysdeps/pthread/timer_getoverr.c: Likewise.
2214 * sysdeps/pthread/timer_gettime.c: Likewise.
2215 * sysdeps/pthread/timer_settime.c: Likewise.
2217 2000-06-13 Kaz Kylheku <kaz@ashi.footprints.net>
2219 Timer nodes are now reference counted, and can be marked
2220 as deleted. This allows for the safe release of the global mutex
2221 in the middle without losing the timer being operated on.
2223 * sysdeps/pthread/posix-timer.h (struct timer_node): The inuse
2224 member is now an enum with three values, so that an intermediate
2225 state can be represented (deleted but not free for reuse yet).
2226 New refcount member added.
2227 * sysdeps/pthread/timer_routines.c: Likewise.
2229 * sysdeps/pthread/posix-timer.h (timer_addref, timer_delref,
2230 timer_valid): New inline functions added.
2232 * sysdeps/pthread/timer_gettime.c (timer_gettime): Function
2233 restructured, recursive deadlock bug fixed.
2235 * sysdeps/pthread/timer_gettime.c (timer_gettime): Uses new
2236 timer_addref to ensure that timer won't be deleted while mutex is not
2237 held. Also uses timer_invalid to perform validation of timer handle.
2238 * sysdeps/pthread/timer_settime.c (timer_settime): Likewise.
2239 * sysdeps/pthread/timer_getoverr.c (timer_getoverrun): Likewise.
2241 2000-06-14 Ulrich Drepper <drepper@redhat.com>
2243 * shlib-versions: Add entry for SH.
2244 Patch by Kaz Kojima <kkojima@rr.iij4u.or.jp>.
2246 2000-06-13 Kaz Kylheku <kaz@ashi.footprints.net>
2248 A few optimizations. Got rid of unnecessary wakeups of timer threads,
2249 tightened up some critical regions and micro-optimized some list
2252 * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
2253 Returns int value now to indicate whether timer was queued at head.
2254 * sysdeps/pthread/posix-timer.h: Likewise.
2255 * sysdeps/pthread/timer_settime.c (timer_settime): Takes advantage of
2256 new return value from __timer_thread_queue_timer to avoid waking
2257 up timer thread unnecessarily.
2259 * sysdeps/pthread/posix-timer.h (timer_id2ptr): No longer checks
2260 inuse flag, because this requires mutex to be held. Callers updated
2261 to do the check when they have the mutex.
2262 * sysdeps/pthread/timer_getoverr.c: Add check for inuse here.
2264 * sysdeps/pthread/timer_settime.c (timer_settime): Tighter critical
2265 regions: avoids making system calls while holding timer mutex, and
2266 a few computations were moved outside of the mutex as well.
2267 * sysdeps/pthread/timer_gettime.c (timer_gettime): Likewise.
2269 * sysdeps/pthread/posix-timer.h (list_unlink_ip): Function name changed
2270 to list_unlink_ip, meaning idempotent. Pointer manipulation
2271 changed to get better better code out of gcc.
2272 * sysdeps/pthread/timer_routines.c (list_unlink): Non-idempotent
2273 version of list_unlink added here.
2274 * sysdeps/pthread/timer_delete.c: Use appropriate list unlink
2275 function in all places: idempotent one for timers, non-idempotent
2276 one for thread nodes.
2277 * sysdeps/pthread/timer_settime: Likewise.
2278 * sysdeps/pthread/timer_routines.c: Likewise.
2280 2000-06-13 Ulrich Drepper <drepper@redhat.com>
2282 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_TIMERS): Define.
2283 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
2285 * sysdeps/pthread/Makefile: Remove tests definition.
2287 2000-06-12 Kazumoto Kojima <kkojima@rr.iij4u.or.jp>
2288 Yutaka Niibe <gniibe@chroot.org>
2290 * sysdeps/sh/pspinlock.c: New file.
2291 * sysdeps/sh/pt-machine.h: New file.
2293 2000-06-12 Ulrich Drepper <drepper@redhat.com>
2295 * Makefile (tests): Add joinrace.
2297 * Examples/ex6.c: Test return value of pthread_join.
2299 2000-06-11 Geoff Keating <geoffk@cygnus.com>
2301 * sysdeps/powerpc/pspinlock.c (__pthread_spin_lock): Implement.
2302 (__pthread_spin_trylock): Implement.
2303 (__pthread_spin_unlock): Implement.
2304 (__pthread_spin_init): Implement.
2305 (__pthread_spin_destroy): Implement.
2307 2000-06-10 Ulrich Drepper <drepper@redhat.com>
2309 * sysdeps/pthread/timer_routines.c (list_append): Little fix to
2310 really append the entry.
2312 2000-06-10 Andreas Jaeger <aj@suse.de>
2314 * lockfile.c (__fresetlockfiles): Remove unused variable fp.
2316 2000-06-10 Kaz Kylheku <kaz@ashi.footprints.net>
2318 * sysdeps/pthread/timer_create.c: Thread matching now done on
2319 clock type as well as thread attributes.
2320 There are individual global signal-delivering threads for
2321 different clock types.
2322 * sysdeps/pthread/posix-timer.h: Likewise.
2323 * sysdeps/pthread/timer_routines.c: Likewise.
2325 * sysdeps/pthread/timer_routines.c: Thread allocation and
2326 deallocation function now remembers to put thread on active
2327 list and remove from active list.
2328 Thus now the feature of binding multiple timers
2329 to a single thread actually works.
2331 2000-06-10 Ulrich Drepper <drepper@redhat.com>
2333 * pthread.c (__pthread_create_2_1): Optimize a bit.
2335 * internals.h (invalid_handle): Also test for p_terminated != 0.
2336 (nonexisting_handle): New function. Same as old invalid_handle.
2337 * join.c (pthread_join): Use nonexisting_handle instead of
2338 invalid_handle to test for acceptable thread handle.
2339 * manager.c (pthread_handle_free): Likewise.
2340 * joinrace.c: New file.
2341 Reported by Permaine Cheung <pcheung@cygnus.com>.
2343 2000-06-08 Ulrich Drepper <drepper@redhat.com>
2345 * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
2346 Correct handling of matching variable.
2348 * sysdeps/pthread/tst-timer.c (main): Rewrite initializers to
2351 * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
2352 Be prepared for empty timer list.
2354 * sysdeps/pthread/timer_create.c (timer_create): Correct names of
2355 CPUTIME clock ID. Add support for thread clocks.
2357 * sysdeps/pthread/posix-timer.h (timer_ptr2id): Operands in
2358 subtraction were switched.
2360 * sysdeps/pthread/timer_routines.c (init_module): Use
2361 THREAD_MAXNODES threads.
2363 * sysdeps/pthread/posix-timer.h (struct timer_node): Add creator_pid.
2364 * sysdeps/pthread/timer_create.c: Fill in creator_pid.
2365 * sysdeps/pthread/timer_routines.c (thread_expire_timer): Send signal
2366 with sigqueueinfo is this system call is available.
2368 * sysdeps/pthread/timer_create.c (timer_create): Allow
2369 CLOCK_CPUTIME if _POSIX_CPUTIME is defined.
2371 * sysdeps/pthread/Makefile: New file. Add rules to build timer
2373 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add TIMER_MAX.
2375 2000-06-04 Kaz Kylheku <kaz@ashi.footprints.net>
2377 * sysdeps/pthread/posix-timer.h: New file.
2378 * sysdeps/pthread/timer_create.c: New file.
2379 * sysdeps/pthread/timer_delete.c: New file.
2380 * sysdeps/pthread/timer_getoverr.c: New file.
2381 * sysdeps/pthread/timer_gettime.c: New file.
2382 * sysdeps/pthread/timer_routines.c: New file.
2383 * sysdeps/pthread/timer_settime.c: New file.
2384 * sysdeps/pthread/tst-timer.c: New file.
2386 2000-06-08 Ulrich Drepper <drepper@redhat.com>
2388 * sysdeps/unix/sysv/linux/bits/local_lim.h: Remove OPEN_MAX and
2389 LINK_MAX definitions if necessary.
2391 2000-06-04 Kaz Kylheku <kaz@ashi.footprints.net>
2393 Added missing fork time handling of global libio lock.
2395 * lockfile.c (__fresetlockfiles): Now also resets the list lock,
2396 not just the individual stream locks. Rewritten to use new
2397 iterator interface provided by libio rather than accessing
2400 * lockfile.c (__flockfilelist, _funlockfilelist): New functions
2401 which lock and unlock the stream list using the new interface
2403 * internals.h: Likewise.
2405 * ptfork.c (__fork): Now calls __flockfilelist before fork,
2406 and __funlockfilelist in the parent after the fork.
2407 Child still calls __fresetlockfiles as before.
2409 * linuxthreads.texi: Now explains what happens to streams at
2410 fork time. Also whole new section on forking and thread added.
2411 Definition of pthread_atfork moved out of Miscellaneous Functions
2412 to this new section.
2414 2000-06-04 Jakub Jelinek <jakub@redhat.com>
2416 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c (__pthread_spin_lock):
2417 Add missing register.
2418 * sysdeps/sparc/sparc64/pspinlock.c (__pthread_spin_lock): Likewise.
2420 2000-06-02 Jakub Jelinek <jakub@redhat.com>
2422 * sysdeps/sparc/sparc32/pspinlock.c: Implement spinlocks.
2423 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: New.
2424 * sysdeps/sparc/sparc64/pspinlock.c: Implement spinlocks.
2426 2000-05-31 Andreas Jaeger <aj@suse.de>
2428 * sysdeps/mips/pspinlock.c: Implement spinlocks.
2430 2000-05-28 Ulrich Drepper <drepper@redhat.com>
2432 * spinlock.c (__pthread_lock): Remove ASSERT.
2434 * Makefile (tests): Add ex8.
2435 * Examples/ex8.c: New file.
2437 2000-05-12 Kaz Kylheku <kaz@ashi.footprints.net>
2439 Bugfix: The pthread_atfork mechanism now takes care of its
2440 own internal mutex at fork time.
2442 * ptfork.c (__fork): Revised so that the mutex is held across
2443 the fork operation and while the handlers are called, and so that
2444 the child resets the mutex.
2446 * linuxthreads.texi: Updated pthread_atfork documentation to make
2447 it clear that fork and pthread_atfork can't be reentered from
2448 atfork handlers, that pthread_atfork and fork are mutually atomic,
2449 and that the handlers are inherited by the child process.
2451 2000-05-24 Ulrich Drepper <drepper@redhat.com>
2453 * Makefile (libpthread-routines): Add pspinlock.
2454 * cancel.c: Rename __pthread_spin_unlock back to __pthread_unlock.
2455 Use struct _pthread_fastlock instead of pthread_spinlock_t.
2456 * condvar.c: Likewise.
2457 * internals.h: Likewise.
2459 * manager.c: Likewise.
2460 * mutex.c: Likewise.
2461 * pthread.c: Likewise.
2462 * rwlock.c: Likewise.
2463 * semaphore.c: Likewise.
2464 * signals.c: Likewise.
2465 * spinlock.h: Likewise.
2466 * spinlock.c: Likewise. Remove pthread_spin_lock functions.
2467 * sysdeps/alpha/pspinlock.c: New file.
2468 * sysdeps/arm/pspinlock.c: New file.
2469 * sysdeps/i386/pspinlock.c: New file.
2470 * sysdeps/m68k/pspinlock.c: New file.
2471 * sysdeps/mips/pspinlock.c: New file.
2472 * sysdeps/powerpc/pspinlock.c: New file.
2473 * sysdeps/sparc/sparc32/pspinlock.c: New file.
2474 * sysdeps/sparc/sparc64/pspinlock.c: New file.
2475 * sysdeps/pthread/bits/pthreadtypes.h: Remove pthread_spinlock_t
2476 back to _pthread_fastlock. Define new pthread_spinlock_t.
2478 2000-05-24 Andreas Jaeger <aj@suse.de>
2480 * sysdeps/i386/i686/pt-machine.h: Only use LDT on newer kernels.
2482 2000-05-21 Jakub Jelinek <jakub@redhat.com>
2484 * manager.c (pthread_handle_create): Initialize p_res._sock to -1.
2486 2000-05-13 Jakub Jelinek <jakub@redhat.com>
2488 * internals.h (__RES_PTHREAD_INTERNAL): Define.
2490 2000-05-06 Kaz Kylheku <kaz@ashi.footprints.net>
2492 * mutex.c (pthread_once): IN_PROGRESS state of pthread_once_t
2493 object state is represented with additional bits which distinguish
2494 whether that state was set up in the current process, or
2495 in an ancestor process. If that state was set in an ancestor,
2496 it means that a fork happened while thread was executing the init
2497 function. In that case, the state is reset to NEVER.
2498 * mutex.c (__pthread_once_fork_prepare): New function.
2499 (__pthread_once_fork_child): Likewise
2500 (__pthread_once_fork_parent): Likewise
2501 (__pthread_reset_pthread_once): Removed.
2502 * ptfork.c (__fork): Call new handlers in mutex.c.
2503 * internals.h: Declarations of new mutex.c functions added.
2504 Declaration of removed function deleted.
2505 * linuxthreads.texi: Updated documentation about pthread_once
2506 to clarify what happens under cancellation and forking.
2508 2000-05-06 Kaz Kylheku <kaz@ashi.footprints.net>
2510 * internals.h: New thread manager request type, REQ_KICK.
2511 * join.c (pthread_exit): main thread now calls exit() instead
2512 of _exit() in order to proper process cleanup.
2513 * manager.c (__pthread_manager): Do not terminate manager
2514 after unblocking main thread; wait for main thread's
2515 REQ_PROCESS_EXIT request instead.
2516 Also, added REQ_KICK case to handle new request; this just does
2518 * manager.c (pthread_exited): Do not terminate manager after
2519 unblocking main thread.
2520 * manager.c (__pthread_manager_sighandler): If the main thread
2521 is waiting for all other threads to die, send a REQ_KICK into
2522 the thread manager request pipe to get it to clean out the threads
2523 and unblock the main thread as soon as possible. This fixes
2524 the 2000 millisecond hang on shutdown bug.
2525 * Examples/ex7.c: New file, tests shutdown behavior when all threads
2526 including the main one call pthread_exit(), or implicitly do so.
2527 * Makefile (tests): Add ex7.
2529 2000-05-05 Andreas Jaeger <aj@suse.de>
2531 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
2532 (pthread_getcpuclockid): Correct test for ourselves.
2534 2000-05-05 Ulrich Drepper <drepper@redhat.com>
2536 * internals.h (struct _pthread_descr_struct): Reorganization.
2537 Allocate room for 16 pointers at head of the structure for future
2538 thread-local data handling. Move p_self member in this area.
2539 * manager.c (pthread_handle_create): Adjust use of p_self.
2540 * sysdeps/i386/useldt.h (THREAD_SELF): Likewise.
2541 * pthread.c (__pthread_initial_thread): Adjust initialization.
2542 (__pthread_manager_thread): Likewise.
2544 2000-04-29 Bruno Haible <haible@clisp.cons.org>
2546 * join.c (pthread_exit): Use THREAD_GETMEM_NC instead of THREAD_GETMEM
2547 for eventmask larger than 1 word.
2549 2000-04-27 Ulrich Drepper <drepper@redhat.com>
2551 * Versions [libpthread] (GLIBC_2.2): Add __pthread_initialize_minimal.
2552 * pthread.c (__pthread_initialize_minimal): New function. Perform
2553 minimal initialization.
2554 (pthread_initialize): Remove this code here.
2555 * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h" again. We
2556 are working around the problem in glibc.
2558 2000-04-25 Ulrich Drepper <drepper@redhat.com>
2560 * sysdeps/i386/i686/pt-machine.h: Do not use "../useldt.h" for
2561 now. First gcc must be fixed (more concrete: libgcc).
2563 2000-04-24 Ulrich Drepper <drepper@redhat.com>
2565 * pthread.c: Remove special treatement for interrupt handlers on x86.
2566 * manager.c (pthread_free): Use FREE_THREAD not FREE_THREAD_SELF.
2567 * sysdeps/i386/useldt.h: Use "q" constraint instead of "r" where
2569 * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h".
2571 2000-04-24 Mark Kettenis <kettenis@gnu.org>
2573 * join.c (pthread_exit): Set p_terminated after reporting the
2574 termination event instead of before.
2576 2000-04-20 Jakub Jelinek <jakub@redhat.com>
2578 * sysdeps/pthread/bits/libc-lock.h: Only declare __pthread_rwlock_*
2581 2000-04-18 Andreas Jaeger <aj@suse.de>
2583 * Versions: Use ld instead of ld.so.
2585 2000-04-18 Jakub Jelinek <jakub@redhat.com>
2587 * sysdeps/unix/sysv/linux/sparc/bits/sigcontext.h (struct sigcontext):
2588 Remove the typedef keyword.
2590 2000-04-18 Jakub Jelinek <jakub@redhat.com>
2592 * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Use membar,
2594 (READ_MEMORY_BARRIER): Define.
2595 * spinlock.c (__pthread_spin_unlock): Use READ_MEMORY_BARRIER, not
2597 * internals.h (READ_MEMORY_BARRIER): Define if not defined in sysdep
2600 2000-04-17 Ulrich Drepper <drepper@redhat.com>
2602 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
2603 (pthread_getcpuclockid): Don't compare thread_id with thread_self,
2604 use thread_handle().
2606 2000-04-16 Ulrich Drepper <drepper@redhat.com>
2608 * condvar.c (pthread_cond_timedwait_relative): Don't test for owner
2609 if fast mutex is used. Don't initialize `already_canceled' twice.
2610 Correctly test for return value of timedsuspend.
2612 * pthread.c: Correct long-time braino. We never set SA_SIGINFO and
2613 therefore don't need the _rt versions of the signal handlers.
2615 2000-04-15 Ulrich Drepper <drepper@redhat.com>
2617 * pthread.c (pthread_yield): New function.
2618 * sysdeps/pthread/pthread.h (pthread_yield): Add prototype.
2619 * Versions [libpthread] (GLIBC_2.2): Add pthread_yield.
2620 * internals.h: Declare __pthread_yield.
2622 * pthread.c (pthread_initialize): Avoid a bit more code if
2623 realtime signals are known to exist.
2625 * pthread.c: Is __ASSUME_REALTIME_SIGNALS then avoid generating code
2626 to dynamically detect RT signals and avoid generating compatibility
2627 functions with old kernel.
2628 * restart.h (restart) [__ASSUME_REALTIME_SIGNALS]: Use
2629 __pthread_restart_new directly.
2630 (suspend) [__ASSUME_REALTIME_SIGNALS]: Use
2631 __pthread_wait_for_restart_signal directly.
2632 (timedsuspend) [__ASSUME_REALTIME_SIGNALS]: Use
2633 __pthread_timedsuspend_new directly.
2635 2000-04-15 Ulrich Drepper <drepper@redhat.com>
2637 * condvar.c: Remove all the special code to handle cond_timedwait.
2638 Use timedsuspend instead.
2639 * internals.h: Declare __pthread_timedsuspend_old,
2640 __pthread_timedsuspend_new, and __pthread_timedsuspend.
2641 Remove declaration of __pthread_init_condvar.
2642 * pthread.c: Define __pthread_timedsuspend variable.
2643 (__pthread_timedsuspend_old): New function. Timed suspension
2644 implementation for old Linux kernels.
2645 (__pthread_timedsuspend_new): New function. Timed suspension
2646 implementation for new Linux kernels.
2647 * restart.h (timedsuspend): New function. Call appropriate
2648 suspension function through __pthread_timedsuspend.
2649 * semaphore.c (sem_timedwait): Use timedsuspend, don't duplicate
2651 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2653 * internals.h (WRITE_MEMORY_BARRIER): Define as MEMORY_BARRIER if
2655 * spinlock.c: Use WRITE_MEMORY_BARRIER instead of MEMORY_BARRIER
2657 * sysdeps/alpha/pt-machine.h: Define WRITE_MEMORY_BARRIER.
2658 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
2660 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _POSIX_SPAWN.
2661 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
2663 2000-04-14 Andreas Jaeger <aj@suse.de>
2665 * weaks.c: Fix typo.
2667 * shlib-versions (mips.*-.*-linux.*): Support only GLIBC 2.0 and
2668 2.2 for linuxthreads.
2670 2000-04-13 Ulrich Drepper <drepper@redhat.com>
2672 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
2673 (pthread_getcpuclockid): Fix typo.
2675 2000-04-12 Ulrich Drepper <drepper@redhat.com>
2677 * Makefile (libpthread-routines): Add getcpuclockid.
2678 * Versions [libpthread] (GLIBC_2.2): Add pthread_getcpuclockid.
2679 * sysdeps/pthread/getcpuclockid.c: New file.
2680 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c: New file.
2681 * sysdeps/pthread/pthread.h: Add prototype for pthread_getcpuclockid.
2683 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_SPIN_LOCKS):
2685 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
2687 * sysdeps/pthread/pthread.h: Add prototypes for pthread_spin_init,
2688 pthread_spin_destroy, pthread_spin_lock, pthread_spin_trylock,
2689 and pthread_spin_unlock.
2690 * sysdeps/pthread/bits/pthreadtypes.h: Change struct _pthread_fastlock
2691 into pthread_spinlock_t. Change all uses.
2692 * spinlock.c: Implement pthread_spin_lock.
2693 Rename __pthread_unlock to __pthread_spin_unlock and define weak
2694 alias for real name.
2695 Define pthread_spin_trylock, pthread_spin_init, and
2696 pthread_spin_destroy.
2697 Change all uses of _pthread_fastlock to pthread_spinlock_t.
2698 * spinlock.h: Rename __pthread_unlock to __pthread_spin_unlock.
2699 Change all uses of _pthread_fastlock to pthread_spinlock_t.
2700 * Versions [libpthread] (GLIBC_2.2): Add pthread_spin_init,
2701 pthread_spin_destroy, pthread_spin_lock, pthread_spin_trylock,
2702 and pthread_spin_unlock.
2703 * cancel.c: Use __pthread_spin_unlock instead of __pthread_unlock.
2704 Change all uses of _pthread_fastlock to pthread_spinlock_t.
2705 * condvar.c: Likewise.
2706 * internals.h: Likewise.
2708 * manager.c: Likewise.
2709 * mutex.c: Likewise.
2710 * pthread.c: Likewise.
2711 * rwlock.c: Likewise.
2712 * semaphore.c: Likewise.
2713 * signals.c: Likewise.
2715 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add various new POSIX
2717 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
2719 2000-04-11 Ulrich Drepper <drepper@redhat.com>
2721 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add
2722 _POSIX_SHARED_MEMORY_OBJECTS.
2724 2000-04-11 Andreas Jaeger <aj@suse.de>
2726 * sysdeps/mips/pt-machine.h (MEMORY_BARRIER): Define.
2727 (__compare_and_swap): Mark as modifying memory.
2729 2000-04-11 Geoff Keating <geoffk@cygnus.com>
2731 * sysdeps/powerpc/pt-machine.h (MEMORY_BARRIER): Don't be
2733 (__compare_and_swap): Replace other 'sync' with MEMORY_BARRIER.
2734 Don't have the 'asm' __volatile__.
2736 2000-04-11 Ulrich Drepper <drepper@redhat.com>
2738 * internals.h: Define MEMORY_BARRIER as empty if not defined already.
2739 * spinlock.c (__pthread_lock): Add memory barriers.
2740 (__pthread_unlock): Likewise.
2741 * sysdeps/alpha/pt-machine.h (MEMORY_BARRIER): Define using mb
2743 (RELEASE): Not needed anymore.
2744 (__compare_and_swap): Mark asm as modifying memory.
2745 * sysdeps/powerpc/pt-machine.h (sync): Remove. Replace with definition
2747 (__compare_and_swap): Use MEMORY_BARRIER instead of sync.
2748 * sysdeps/sparc/sparc32/pt-machine.h (RELEASE): Not needed anymore.
2749 (MEMORY_BARRIER): Define using stbar.
2750 * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Define using
2752 (__compare_and_swap): Use MEMORY_BARRIER to ensure ordering.
2753 Patch by Xavier Leroy <Xavier.Leroy@inria.fr> based on comments by
2754 Mike Burrows <m3b@pa.dec.com>.
2756 2000-04-09 Ulrich Drepper <drepper@redhat.com>
2758 * signals.c (sigaction): Fix return value for the case SIG is one
2759 of the signals the implementation uses.
2760 Patch by Xavier.Leroy@inria.fr.
2762 2000-04-01 Andreas Jaeger <aj@suse.de>
2764 * attr.c: Use shlib-compat macros.
2765 * oldsemaphore.c: Likewise.
2766 * pthread.c: Likewise.
2767 * weaks.c: Likewise.
2769 2000-03-26 Ulrich Drepper <drepper@redhat.com>
2771 * semaphore.c (sem_timedwait): New function.
2772 Patch by Carl Mailloux <carlm@oricom.ca>.
2773 * semaphore.h: Declare sem_timedwait.
2774 * Versions [libpthread] (GLIBC_2.2): Add sem_timedwait.
2776 2000-03-26 Roland McGrath <roland@baalperazim.frob.com>
2778 * sysdeps/pthread/Makefile: File removed.
2780 2000-03-23 Ulrich Drepper <drepper@redhat.com>
2782 * mutex.c (__pthread_reset_pthread_once): Reset once_masterlock.
2783 * internals.h (__pthread_reset_pthread_once): Add prototype.
2784 * ptfork.c (__fork): Call __pthread_reset_pthread_once.
2786 * manager.c (pthread_handle_create): Store ID of new thread before
2789 2000-03-21 Ulrich Drepper <drepper@redhat.com>
2791 * attr.c: Use new macros from shlib-compat.h to define versions.
2792 * oldsemaphore.c: Likewise.
2793 * semaphore.c: Likewise.
2794 * weaks.c: Likewise.
2796 * pthread.c: Update for new SHLIB_COMPAT definition.
2798 * manager.c (__pthread_manager): Unmask debug signal.
2800 * pthread.c (pthread_initialize): Test for address of __dso_handle
2801 being NULL, not value. Use __on_exit, not on_exit.
2802 Patch by Andreas Jaeger <aj@suse.de>.
2804 * pthread.c: Use new macros from shlib-compat.h to define versions.
2806 2000-03-19 Ulrich Drepper <drepper@redhat.com>
2808 * pthread.c (pthread_initialize): Instead of on_exit use
2809 __cxa_atexit if __dso_label is available to allow unloading the
2810 libpthread shared library.
2812 2000-03-16 Ulrich Drepper <drepper@redhat.com>
2814 * condvar.c: Make tests for ownership of mutex less strict.
2816 2000-03-14 Ulrich Drepper <drepper@redhat.com>
2818 * condvar.c (pthread_cond_wait): Check whether mutex is owned by
2819 current thread and return error if not.
2820 (pthread_cond_timedwait_relative_old): Likewise.
2821 (pthread_cond_timedwait_relative_new): Likewise.
2823 * mutex.c (__pthread_once): Handle cancelled init function correctly.
2824 (pthread_once_cancelhandler): New function.
2825 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2827 2000-03-14 Andreas Jaeger <aj@suse.de>
2829 * pthread.c (pthread_handle_sigcancel_rt): GS has been renamed to
2831 (pthread_handle_sigrestart_rt): Likewise.
2832 * signals.c (pthread_sighandler_rt): Likewise.
2834 2000-03-02 Andreas Jaeger <aj@suse.de>
2836 * sysdeps/pthread/bits/libc-lock.h: Fix typo.
2837 Reported by Sean Chen <sean.chen@turbolinux.com>.
2839 2000-02-28 Andreas Jaeger <aj@suse.de>
2841 * rwlock.c: Fix typo.
2843 2000-02-27 Ulrich Drepper <drepper@redhat.com>
2845 * rwlock.c: Define __* variants of the functions and make old names
2847 * Versions [GLIBC_2.2]: Export the __pthread_rwlock_* functions.
2848 * sysdeps/pthread/bits/libc-lock.h: Define __libc_rwlock_* macros.
2850 2000-02-25 Andreas Jaeger <aj@suse.de>
2852 * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
2853 pwrite64, lseek64, open64, and __open64 with version 2.2.
2855 2000-02-22 Ulrich Drepper <drepper@redhat.com>
2857 * semaphore.h (SEM_FAILED): Use 0 not NULL.
2859 2000-02-14 Ulrich Drepper <drepper@redhat.com>
2861 * condvar.c (pthread_cond_timedwait_relative_old): Tight loop with
2862 nanosleep does not work either. Get absolute time inside the
2864 (pthread_cond_timedwait_relative_new): Likewise.
2865 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2867 2000-02-13 Andreas Jaeger <aj@suse.de>
2869 * condvar.c (pthread_cond_timedwait_relative_new): Fix last patch.
2870 (pthread_cond_timedwait_relative_old): Likewise.
2872 2000-02-13 Ulrich Drepper <drepper@redhat.com>
2874 * condvar.c (pthread_cond_timedwait_relative_old): Undo last patch
2875 but keep the code around. A bug in the kernel prevent us from
2877 (pthread_cond_timedwait_relative_new): Likewise.
2878 (PR libc/1597 and libc/1598).
2880 2000-02-01 Kaz Kylheku <kaz@ashi.footprints.net>
2882 * condvar.c (pthread_cond_timedwait_relative_old): Do tight
2883 loop around nanosleep calls instead of around most of the function
2884 (pthread_cond_timedwait_relative_new): Likewise.
2885 body. Got rid of backwards goto and one local.
2887 2000-01-31 Ulrich Drepper <drepper@redhat.com>
2889 * condvar.c (pthread_cond_timedwait_relative_old): Recompute time
2890 before every nanosleep call to account for time spent in the rest
2892 (pthread_cond_timedwait_relative_new): Likewise.
2893 Patch by khendricks@ivey.uwo.ca (PR libc/1564).
2895 2000-01-29 Ulrich Drepper <drepper@redhat.com>
2897 * condvar.c (pthread_cond_timedwait_relative_old): Get remaining time
2898 from nanosleep call so that in case we restart we only wait for the
2900 (pthread_cond_timedwait_relative_new): Likewise.
2901 Patch by khendricks@ivey.uwo.ca (PR libc/1561).
2903 2000-01-18 Ulrich Drepper <drepper@cygnus.com>
2905 * manager.c (pthread_allocate_stack): Compute guard page address
2906 correctly. Patch by HJ Lu.
2908 * sysdeps/pthread/pthread.h: Define
2909 PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP.
2911 2000-01-16 Ulrich Drepper <drepper@cygnus.com>
2913 * rwlock.c (pthread_rwlock_unlock): Correct one more problem with
2914 preference handling.
2915 (pthread_rwlockattr_setkind_np): Allow
2916 PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP.
2917 Patches by Kaz Kylheku <kaz@ashi.footprints.net>.
2919 2000-01-12 Ulrich Drepper <drepper@cygnus.com>
2921 * internals.h (pthread_readlock_info): New structure.
2922 (_pthread_descr_struct): Add p_readlock_list, p_readlock_free, and
2923 p_untracked_readlock_count.
2924 * pthread.c (__pthread_initial_thread, pthread_manager_thread):
2925 Add initializers for new fields.
2926 * manager.c (pthread_free): Free read/write lock lists.
2927 * queue.h (queue_is_empty): New function.
2928 * rwlock.c: Implement requirements about when readers should get
2930 * sysdeps/pthread/pthread.h
2931 (PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP): New definition.
2932 * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_rwlock_t):
2933 Define this name as well.
2934 Patches by Kaz Kylheku <kaz@ashi.footprints.net>.
2936 2000-01-05 Ulrich Drepper <drepper@cygnus.com>
2938 * pthread.c (__pthread_initial_thread, pthread_manager_thread):
2939 Adjust initializers for struct _pthread_descr_struct change.
2940 * internals.h (struct _pthread_descr_struct): Move new elements to
2943 2000-01-03 Kaz Kylheku <kaz@ashi.footprints.net>
2945 Redesigned how cancellation unblocks a thread from internal
2946 cancellation points (sem_wait, pthread_join,
2947 pthread_cond_{wait,timedwait}).
2948 Cancellation won't eat a signal in any of these functions
2949 (*required* by POSIX and Single Unix Spec!).
2950 * condvar.c: Spontaneous wakeup on pthread_cond_timedwait won't eat a
2951 simultaneous condition variable signal (not required by POSIX
2952 or Single Unix Spec, but nice).
2953 * spinlock.c: __pthread_lock queues back any received restarts
2954 that don't belong to it instead of assuming ownership of lock
2955 upon any restart; fastlock can no longer be acquired by two threads
2957 * restart.h: Restarts queue even on kernels that don't have
2958 queued real time signals (2.0, early 2.1), thanks to atomic counter,
2959 avoiding a rare race condition in pthread_cond_timedwait.
2961 1999-12-31 Andreas Jaeger <aj@suse.de>
2963 * internals.h: Remove duplicate prototype declarations.
2965 * weaks.c: Remove __THROW from prototypes since the file is not
2966 compiled by a C++ compiler.
2967 * internals.h: Likewise.
2969 1999-12-30 Andreas Jaeger <aj@suse.de>
2971 * sysdeps/pthread/pthread.h: Move internal functions to...
2972 * sysdeps/pthread/bits/libc-lock.h: ...here.
2974 1999-12-29 Andreas Jaeger <aj@suse.de>
2976 * sysdeps/pthread/pthread.h: Fix typos, reformat comments.
2978 1999-12-28 Ulrich Drepper <drepper@cygnus.com>
2980 * sysdeps/alpha/pt-machine.h: Move stack_pointer definition to the
2983 * manager.c (__pthread_start): Add one more cast to prevent
2984 warning on 64bit machines.
2986 1999-12-21 Ulrich Drepper <drepper@cygnus.com>
2988 * manager.c (pthread_handle_create): Set p_pid of new thread
2989 before calling the callback function to report a new thread.
2991 1999-12-20 Andreas Jaeger <aj@suse.de>
2993 * pthread.c (pthread_initialize): Move getrlimit call after
2996 1999-12-18 Ulrich Drepper <drepper@cygnus.com>
2998 * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
2999 pwrite64, lseek64, open64, and __open64.
3000 * wrapsyscall.c: Define pread, __pread64, pread64, pwrite, __pwrite64,
3001 pwrite64, lseek64, open64, and __open64.
3003 * manager.c (pthread_allocate_stack): Correct computation of
3004 new_thread_bottom. Correct handling of stack size and when the
3005 rlimit method to guard for stack growth is used.
3006 * pthread.c (pthread_initialize): Stack limit must be STACK_SIZE
3007 minus one pagesize (not two).
3009 1999-12-03 Andreas Jaeger <aj@suse.de>
3011 * Versions: Add __res_state with version GLIBC_2.2.
3013 * errno.c (__res_state): New function to return thread specific
3016 * pthread.c (pthread_initialize): Initialize p_resp.
3017 (__pthread_reset_main_thread): Also set p_resp.
3019 * manager.c (pthread_handle_create): Initialize p_resp.
3021 * internals.h: Add thread specific resolver state.
3022 Based on patches by Adam D. Bradley <artdodge@cs.bu.edu>.
3024 1999-12-01 Ulrich Drepper <drepper@cygnus.com>
3026 * sysdeps/i386/pt-machine.h: Move stack_pointer definition to the
3028 * sysdeps/i386/i686/pt-machine.h: Likewise.
3029 Patches by Alan Modra <alan@SPRI.Levels.UniSA.Edu.Au>.
3031 1999-11-23 Ulrich Drepper <drepper@cygnus.com>
3033 * manager.c (pthread_start_thread_event): Initialize p_pid already
3036 1999-11-22 Ulrich Drepper <drepper@cygnus.com>
3038 * internals.h: Add prototype for __pthread_manager_event.
3039 * manager.c (__pthread_manager_event): New function.
3040 (pthread_start_thread_event): Correct computation of self.
3041 Use INIT_THREAD_SELF.
3042 * pthread.c (__pthread_manager_thread): Initialize p_lock.
3043 (__pthread_initialize_manager): Respect event flags also for creation
3044 of the manager thread.
3046 1999-11-08 Ulrich Drepper <drepper@cygnus.com>
3048 * pthread.c (__pthread_initialize_manager): Initialize
3049 __pthread_manager_thread.p_tid.
3051 1999-11-02 Ulrich Drepper <drepper@cygnus.com>
3053 * internals.h: Declare __pthread_last_event.
3054 * manager.c: Define __pthread_last_event.
3055 (pthread_handle_create): Set __pthread_last_event.
3056 (pthread_exited): Likewise.
3057 * join.c (pthread_exit): Likewise.
3059 * Makefile (libpthread-routines): Add events.
3060 * events.c: New file.
3061 * internals.h: Protect against multiple inclusion.
3062 Include thread_dbP.h header.
3063 (struct _pthread_descr_struct): Add new fields p_report_events and
3065 Declare event reporting functions.
3066 * join.c (pthread_exit): Signal event if this is wanted.
3067 * manager.c (__pthread_threads_events): New variable.
3068 (pthread_handle_create): Take new parameters with event information.
3069 Signal TD_CREATE event if wanted.
3070 (__pthread_manager): Adjust pthread_handle_create call.
3071 (pthread_start_thread_event): New function. Block until manager is
3072 finished and then call pthread_start_thread.
3073 (pthread_exited): Signal TD_REAP event if wanted.
3075 1999-10-26 Ulrich Drepper <drepper@cygnus.com>
3077 * restart.h (suspend_with_cancellation): Rewrite as a macro.
3079 * condvar.c (pthread_cond_timedwait_relative): Don't mark as inline.
3081 1999-10-25 Andreas Jaeger <aj@suse.de>
3083 * internals.h: Remove K&R compatibility.
3084 * no-tsd.c: Likewise.
3085 * semaphore.h: Likewise.
3086 * signals.c: Likewise.
3087 * sysdeps/pthread/bits/libc-tsd.h: Likewise.
3088 * sysdeps/unix/sysv/linux/bits/sigthread.h: Likewise.
3089 * weaks.c: Likewise.
3091 1999-10-21 Xavier Leroy <Xavier.Leroy@inria.fr>
3093 * pthread.c: For i386, wrap pthread_handle_sigrestart and
3094 pthread_handle_sigcancel with functions that restore %gs from the
3095 signal context. For each signal handling function, two wrappers
3096 are required, one for a non-RT signal and one for a RT signal.
3097 * signal.c: For i386, add code to restore %gs from the signal
3098 context in pthread_sighandler and pthread_sighandler_rt.
3100 1999-10-17 Ulrich Drepper <drepper@cygnus.com>
3102 * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add cast.
3104 1999-10-14 Ulrich Drepper <drepper@cygnus.com>
3106 * pthread.c (__pthread_initial_thread): Pass argument to
3107 PTHREAD_START_ARGS_INITIALIZER.
3108 (__pthread_manager_thread): Likewise.
3110 * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add parameter to
3111 initialize function.
3113 * manager.c (pthread_handle_create): Remove p_startfct initialization.
3115 * internals.h (_pthread_descr_struct): We don't need p_startfct field.
3117 1999-10-12 Ulrich Drepper <drepper@cygnus.com>
3119 * internals.h: Correct return types for __libc_read and __libc_write.
3121 1999-10-09 Andreas Jaeger <aj@suse.de>
3123 * internals.h: Add __new_sem_post to get prototype in
3124 manager.c; include semaphore.h for needed types.
3126 1999-10-08 Ulrich Drepper <drepper@cygnus.com>
3128 * manager.c (__pthread_manager) [REQ_POST]: Use __new_sem_post
3129 directly instead of calling sem_post which should not be necessary
3130 but is faster and might help in some case to work around problems.
3131 Patch by khendricks@ivey.uwo.ca [libc/1382].
3133 1999-10-08 Andreas Schwab <schwab@suse.de>
3135 * sysdeps/pthread/Subdirs: New file.
3138 1999-10-07 Ulrich Drepper <drepper@cygnus.com>
3140 * Implies: New file.
3141 * internals.h (struct _pthread_descr_struct): Add p_startfct.
3142 * manager.c (pthread_handle_create): Initialize p_startfct.
3143 * pthread.c: Define __linuxthread_pthread_sizeof_descr variable.
3145 1999-09-25 Ulrich Drepper <drepper@cygnus.com>
3147 * manager.c (__linuxthreads_pthread_threads_max): New variable.
3148 * specific.c (__linuxthreads_pthread_keys_max): New variable.
3149 (__linuxthreads_pthread_key_2ndlevel_size): New variable.
3151 * condvar.c (pthread_cond_timedwait_relative): Never return with
3152 EINTR. Patch by Andreas Schwab.
3154 1999-09-19 Ulrich Drepper <drepper@cygnus.com>
3156 * signals.c (sigaction): Correct last patch. Don't select
3157 pthread_sighandler_rt based on the signal number but instead of
3158 the SA_SIGINFO flag.
3160 1999-09-23 Ulrich Drepper <drepper@cygnus.com>
3162 * specific.c: Move definitions of struct pthread_key_struct and
3163 destr_function to ...
3164 * internals.h: ...here.
3166 1999-09-18 Ulrich Drepper <drepper@cygnus.com>
3168 * pthread.c (pthread_handle_sigrestart_rt): New function. Use
3169 this instead of pthread_handle_sigrestart if the signal is an RT
3172 * signals.c: Handle passing through of sighandler arguments also
3173 for real-time signals.
3175 1999-09-03 Andreas Schwab <schwab@suse.de>
3177 * ptfork.c (__fork): Renamed from fork and use __libc_fork. Add
3179 (__vfork): New function, alias vfork.
3180 * Versions: Export __fork, vfork, and __vfork in libpthread.
3182 1999-08-23 Andreas Schwab <schwab@suse.de>
3184 * signals.c (pthread_sighandler): Add SIGCONTEXT_EXTRA_ARGS to
3185 call to signal handler.
3187 1999-08-20 Ulrich Drepper <drepper@cygnus.com>
3189 * pthread.c (__pthread_reset_main_thread): Undo last change.
3190 (__pthread_kill_other_threads_np): Reset signal handlers for the
3191 signals we used in the thread implementation here.
3193 1999-08-19 Ulrich Drepper <drepper@cygnus.com>
3195 * pthread.c (__pthread_reset_main_thread): Reset signal handlers
3196 for the signals we used in the thread implementation [PR libc/1234].
3198 * Versions: Export __pthread_kill_other_threads_np from libpthread
3201 * signals.c: Pass sigcontext through wrapper to the user function.
3203 1999-08-01 Ulrich Drepper <drepper@cygnus.com>
3205 * Versions [ld.so] (GLIBC_2.0): Export __libc_internal_tsd_get and
3206 __libc_internal_tsd_set.
3208 1999-07-29 Andreas Jaeger <aj@arthur.rhein-neckar.de>
3210 * manager.c: Remove inclusion of <linux/tasks.h> since it's not
3213 1999-07-16 Andreas Jaeger <aj@arthur.rhein-neckar.de>
3215 * internals.h: Align _pthread_descr_struct to 32 bytes.
3216 Reported by Tim Hockin <thockin@cobaltnet.com>, close PR
3219 1999-07-09 Ulrich Drepper <drepper@cygnus.com>
3221 * oldsemaphore.c (sem_compare_and_swap): Fix use of compare and
3224 1999-07-09 Cristian Gafton <gafton@redhat.com>
3226 * Makefile (libpthread-routines): Add oldsemaphore routine.
3227 * Versions: Add sem_destroy, sem_getvalue, sem_init, sem_post,
3228 sem_trywait, and sem_wait to GLIBC_2.1.
3229 * oldsemaphore.c: New file.
3230 * semaphore.c: Add default_symbol_versions for the changed functions.
3231 (__new_sem_init): Rename from sem_init.
3232 (__new_sem_post): Rename from sem_post.
3233 (__new_sem_wait): Rename from sem_wait.
3234 (__new_sem_trywait): Rename from sem_trywait.
3235 (__new_sem_getvalue): Rename from sem_getvalue.
3236 (__new_sem_destroy): Rename from sem_destroy.
3238 1999-06-23 Robey Pointer <robey@netscape.com>
3240 * internals.h: Added p_nextlock entry to separate queueing for a
3241 lock from queueing for a CV (sometimes a thread queues on a lock
3242 to serialize removing itself from a CV queue).
3243 * pthread.c: Added p_nextlock to initializers.
3244 * spinlock.c: Changed to use p_nextlock instead of p_nextwaiting.
3246 1999-07-09 Ulrich Drepper <drepper@cygnus.com>
3248 * manager.c (pthread_handle_create): Free mmap region after stack
3249 if clone failed. Patch by Kaz Kylheku <kaz@ashi.FootPrints.net>.
3251 1999-05-23 Andreas Jaeger <aj@arthur.rhein-neckar.de>
3253 * man/pthread_cond_init.man: Correct example.
3254 Reported by Tomas Berndtsson <tomas@nocrew.org>.
3256 * linuxthreads.texi (Condition Variables): Likewise.
3258 1999-05-18 Jakub Jelinek <jj@ultra.linux.cz>
3260 * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): Use
3261 casx not cas, also successful casx returns the old value in rd
3262 and not the new value.
3264 1999-05-16 Xavier Leroy <Xavier.Leroy@inria.fr>
3266 * manager.c: If pthread_create() is given a NULL attribute
3267 and the thread manager runs with a realtime policy, set the
3268 scheduling policy of the newly created thread back to SCHED_OTHER.
3269 * manager.c: If the PTHREAD_INHERIT_SCHED attribute is given,
3270 initialize the schedpolicy field of new_thread->p_start_args
3271 to that of the calling thread.
3273 1999-04-29 Ulrich Drepper <drepper@cygnus.com>
3275 * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): cas
3276 instruction does not allow memory element to use offset.
3278 1999-04-28 Ulrich Drepper <drepper@cygnus.com>
3280 * manager.c (pthread_allocate_stack): Optimize initialization of new
3283 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_define_initialized):
3284 Don't use initializer since it is all zeroes.
3285 (__libc_once_define): Likewise.
3287 1999-04-16 Andreas Jaeger <aj@arthur.rhein-neckar.de>
3289 * sysdeps/arm/Implies: Removed since cmpxchg/no-cmpxchg
3290 doesn't exist anymore.
3291 * sysdeps/i386/Implies: Likewise.
3292 * sysdeps/m68k/Implies: Likewise.
3293 * sysdeps/mips/Implies: Likewise.
3294 * sysdeps/powerpc/Implies: Likewise.
3295 * sysdeps/sparc/sparc32/Implies: Likewise.
3296 * sysdeps/sparc/sparc64/Implies: Likewise.
3298 1999-04-15 Ulrich Drepper <drepper@cygnus.com>
3300 * sysdeps/alpha/bits/semaphore.h: Removed.
3301 * sysdeps/powerpc/bits/semaphore.h: Removed.
3302 * sysdeps/pthread/cmpxchg/bits/semaphore.h: Removed.
3303 * sysdeps/pthread/no-cmpxchg/bits/semaphore.h: Removed.
3304 * Makefile (headers): Remove bits/semaphore.h.
3306 * semaphore.h: Define _pthread_descr if necessary.
3307 Don't include limits.h. Define SEM_VALUE_MAX directly.
3309 (sem_t): Protect element names with leading __.
3310 Add declarations for sem_close, sem_open, and sem_unlink.
3311 * semaphore.c: Adjust all functions for new element names.
3312 Define sem_close, sem_open, and sem_unlink.
3313 * Versions (libthread): Add sem_close, sem_open, and sem_unlink for
3315 * sysdeps/pthread/bits/pthreadtypes.h: Define _pthread_descr only if
3318 1999-03-16 H.J. Lu <hjl@gnu.org>
3320 * specific.c (pthread_key_delete): Check th->p_terminated to see
3321 if the thread is running.
3323 * Versions (__libc_internal_tsd_get, __libc_internal_tsd_set):
3324 Added to GLIBC_2.0 for libc.so.
3326 1999-02-12 H.J. Lu <hjl@gnu.org>
3328 * Versions (__libc_current_sigrtmin, __libc_current_sigrtmax,
3329 __libc_allocate_rtsig): Added to GLIBC_2.1.
3331 * internals.h (DEFAULT_SIG_RESTART): Removed.
3332 (DEFAULT_SIG_CANCEL): Removed.
3334 * pthread.c (init_rtsigs, __libc_current_sigrtmin,
3335 __libc_current_sigrtmax, __libc_allocate_rtsig): New functions.
3336 (__pthread_sig_restart, __pthread_sig_cancel,
3337 __pthread_sig_debug): Initialized.
3338 (pthread_initialize): Call init_rtsigs () to initialize
3341 1999-02-03 H.J. Lu <hjl@gnu.org>
3343 * manager.c (__pthread_manager): Do block __pthread_sig_debug.
3344 Don't restart the thread which sent REQ_DEBUG.
3345 (pthread_start_thread): Check if __pthread_sig_debug > 0
3348 * pthread.c (__pthread_initialize_manager): Suspend ourself
3349 after sending __pthread_sig_debug to gdb instead of
3350 __pthread_sig_cancel.
3352 1999-01-24 H.J. Lu <hjl@gnu.org>
3354 * manager.c (__pthread_manager): Delete __pthread_sig_debug
3355 from mask if __pthread_sig_debug > 0.
3356 (pthread_handle_create): Increment __pthread_handles_num.
3358 * manager.c (pthread_handle_create): Don't pass CLONE_PTRACE to clone.
3359 * pthread.c (__pthread_initialize_manager): Likewise.
3361 * pthread.c (pthread_initialize): Use __libc_allocate_rtsig (1)
3362 instead of __libc_allocate_rtsig (2).
3363 (__pthread_initialize_manager): Send __pthread_sig_debug to gdb
3364 instead of __pthread_sig_cancel.
3365 (pthread_handle_sigdebug): Fix comments.
3367 1999-01-21 Ulrich Drepper <drepper@cygnus.com>
3369 * manager.c (pthread_allocate_stack): Set
3370 __pthread_nonstandard_stacks if user-specified stack is used.
3372 1999-01-16 Ulrich Drepper <drepper@cygnus.com>
3374 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _LFS_ASYNCHRONOUS_IO,
3375 _LFS_LARGEFILE, _LFS64_LARGEFILE, and _LFS64_STDIO from Unix98.
3377 1999-01-07 Xavier Leroy <Xavier.Leroy@inria.fr>
3379 * pthread.c: Use a third signal __pthread_sig_debug distinct
3380 from __pthread_sig_cancel to notify gdb when a thread is
3382 * manager.c: Likewise.
3383 * internals.h: Likewise.
3384 * signals.c: The implementation of sigwait(s) assumed that
3385 all signals in s have signal handlers already attached.
3386 This is not required by the standard, so make it work
3387 also if some of the signals have no handlers.
3389 1999-01-05 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
3391 * linuxthreads.texi: Remove pointers from first @node. Move old
3392 @node spec inside comment.
3394 1998-12-31 Ulrich Drepper <drepper@cygnus.com>
3396 * sysdeps/pthread/bits/stdio-lock.h: Define _IO_lock_lock and
3399 1998-12-29 Ulrich Drepper <drepper@cygnus.com>
3401 * semaphore.c (sem_trywait): Don't forget to unlock the semaphore
3402 lock. Patch by Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>.
3404 1998-12-21 Ulrich Drepper <drepper@cygnus.com>
3406 * manager.c: Threads now send __pthread_sig_cancel on termination.
3407 Change clone call and signal masks.
3408 * thread.c (pthread_handle_sigrestart): Remove special code for
3410 (pthread_handle_sigcancel): In manager thread call
3411 __pthread_manager_sighandler.
3412 * sysdeps/i386/pt-machine.h (__compare_and_swap): Add memory clobber.
3413 * sysdeps/i386/i686/pt-machine.h: Likewise.
3414 Patches by Xavier Leroy.
3416 1998-12-14 Ulrich Drepper <drepper@cygnus.com>
3418 * spinlock.c (__pthread_unlock): Don't crash if called for an
3419 untaken mutex. Reported by Ruslan V. Brushkoff <rus@Snif.Te.Net.UA>.
3421 * Examples/ex6.c: Unbuffer stdout and reduce sleep time to reduce
3424 1998-12-13 Ulrich Drepper <drepper@cygnus.com>
3426 * Examples/ex3.c: Wait until all threads are started before
3427 searching for the number to avoid race condition on very fast
3430 1998-12-08 Andreas Jaeger <aj@arthur.rhein-neckar.de>
3432 * sysdeps/pthread/pthread.h: Remove __pthread_setcanceltype
3433 declaration since it's not needed.
3435 * sysdeps/pthread/pthread.h: Move internal functions to ...
3436 * internals.h: ...here.
3438 1998-12-02 H.J. Lu <hjl@gnu.org>
3440 * pthread.c (__pthread_sig_restart): Initiliaze to 0 if
3441 SIGRTMIN is defined.
3442 (__pthread_sig_cancel): Likewise.
3444 1998-12-01 Andreas Jaeger <aj@arthur.rhein-neckar.de>
3446 * wrapsyscall.c: Include <sys/mman.h> for msync,
3447 <stdlib.h> for system and <termios.h> for tcdrain prototype.
3448 Correct msync declaration.
3450 1998-11-29 Roland McGrath <roland@baalperazim.frob.com>
3452 * sysdeps/pthread/bits/libc-tsd.h (__libc_tsd_define, __libc_tsd_get,
3453 __libc_tsd_set): New macros for new interface.
3454 * no-tsd.c: New file, provide uninitialized defns of
3455 __libc_internal_tsd_get and __libc_internal_tsd_set.
3456 * Makefile (routines): Add no-tsd.
3458 1998-10-12 Roland McGrath <roland@baalperazim.frob.com>
3460 * internals.h: Include <bits/libc-tsd.h>, not <bits/libc-lock.h>.
3461 * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
3462 __libc_internal_tsd_set): Move decls to ...
3463 * sysdeps/pthread/bits/libc-tsd.h: New file for __libc_internal_tsd_*
3466 * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
3467 __libc_internal_tsd_set): Make these pointers to functions, not
3468 functions; remove #pragma weak decls for them.
3469 * specific.c (__libc_internal_tsd_get, __libc_internal_tsd_set):
3470 Define static functions and initialized pointers to them.
3472 1998-11-18 Ulrich Drepper <drepper@cygnus.com>
3474 * Makefile (CFLAGS-mutex.c): Define as -D__NO_WEAK_PTHREAD_ALIASES.
3475 (CFLAGS-specific.c): Likewise.
3476 (CFLAGS-pthread.c): Likewise.
3477 (CFLAGS-ptfork.c): Likewise.
3478 (CFLAGS-cancel.c): Likewise.
3479 * sysdeps/pthread/bits/libc-lock.h: Don't mark __pthread_* functions
3480 as weak references if __NO_WEAK_PTHREAD_ALIASES is defined.
3482 * mutex.c (pthread_mutex_init): Define as strong symbol.
3483 (pthread_mutex_destroy): Likewise.
3484 (pthread_mutex_trylock): Likewise.
3485 (pthread_mutex_lock): Likewise.
3486 (pthread_mutex_unlock): Likewise.
3487 (pthread_mutexattr_init): Likewise.
3488 (pthread_mutexattr_destroy): Likewise.
3489 (pthread_once): Likewise.
3490 * ptfork.c (pthread_atfork): Likewise.
3491 * specific.c (pthread_key_create): Likewise.
3492 (pthread_setspecific): Likewise.
3493 (pthread_getspecific): Likewise.
3495 1998-11-15 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
3497 * linuxthreads.texi: Fix punctuation after xref.
3499 1998-11-10 H.J. Lu <hjl@gnu.org>
3501 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine NR_OPEN
3502 if it is defined in <linux/limits.h>.
3504 1998-10-29 14:28 Ulrich Drepper <drepper@cygnus.com>
3506 * spinlock.h (__pthread_trylock): Define inline.
3507 (__pthread_lock): Add extra parameter to declaration. Declare
3508 using internal_function.
3509 (__pthread_unlock): Declare using internal_function.
3510 * spinlock.c (__pthread_lock): Add new parameter. Use it instead
3511 of local variable self. Avoid recomputing self. Define using
3513 (__pthread_trylock): Remove.
3514 (__pthread_unlock): Define using internal_function.
3515 * cancel.c: Adjust for __pthread_lock interface change. Use already
3516 computed self value is possible.
3517 * condvar.c: Likewise.
3519 * manager.c: Likewise.
3520 * mutex.c: Likewise.
3521 * pthread.c: Likewise.
3522 * rwlock.c: Likewise.
3523 * semaphore.c: Likewise.
3524 * signals.c: Likewise.
3526 1998-10-27 13:46 Ulrich Drepper <drepper@cygnus.com>
3528 * sysdeps/pthread/pthread.h (struct _pthread_cleanup_buffer): Prepend
3529 __ to field names of the struct.
3530 * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_fastlock):
3532 (pthread_attr_t): Likewise.
3533 (pthread_cond_t): Likewise.
3534 (pthread_condattr_t): Likewise.
3535 (pthread_mutex_t): Likewise.
3536 (pthread_mutexattr_t): Likewise.
3537 (pthread_rwlock_t): Likewise.
3538 (pthread_rwlockattr_t): Likewise.
3539 * attr.c: Adjust for pthread.h and pthreadtypes.h change.
3540 * cancel.c: Likewise.
3541 * condvar.c: Likewise.
3542 * manager.c: Likewise.
3543 * mutex.c: Likewise.
3544 * pthread.c: Likewise.
3545 * ptlongjmp.c: Likewise.
3546 * rwlock.c: Likewise.
3547 * spinlock.c: Likewise.
3549 1998-10-09 Ulrich Drepper <drepper@cygnus.com>
3551 * sysdeps/i386/pt-machine.h (get_eflags, set_eflags): Mark these
3554 * sysdeps/i386/i686/pt-machine.h: Remove unused inline
3557 * Makefile (libpthread-routines): Add pt-machine.
3558 * pt-machine.c: New file.
3559 * sysdeps/alpha/pt-machine.h: Define PT_EI as extern inline is not
3560 yet defined. Use PT_EI in extern inline definitions.
3561 * sysdeps/arm/pt-machine.h: Likewise.
3562 * sysdeps/i386/pt-machine.h: Likewise.
3563 * sysdeps/i386/i686/pt-machine.h: Likewise.
3564 * sysdeps/m68k/pt-machine.h: Likewise.
3565 * sysdeps/mips/pt-machine.h: Likewise.
3566 * sysdeps/powerpc/pt-machine.h: Likewise.
3567 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
3568 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
3570 1998-10-02 Andreas Jaeger <aj@arthur.rhein-neckar.de>
3572 * semaphore.h: Include <sys/types.h> so that _pthread_descr
3575 1998-09-15 David S. Miller <davem@pierdol.cobaltmicro.com>
3577 * sysdeps/sparc/sparc32/pt-machine.h (INIT_THREAD_SELF): Add nr
3579 * sysdeps/sparc/sparc64/pt-machine.h (INIT_THREAD_SELF): Likewise.
3581 1998-09-12 14:24 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu>
3583 * sysdeps/unix/sysv/linux/bits/sigthread.h: Add multiple inclusion
3586 1998-09-02 11:08 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3588 * signals.c (sigaction): Check that sig is less than NSIG to avoid
3589 array index overflow.
3591 1998-09-06 10:56 Ulrich Drepper <drepper@cygnus.com>
3593 * sysdeps/pthread/semaphore.h: New file.
3595 1998-09-06 09:08 Ulrich Drepper <drepper@cygnus.com>
3597 * sysdeps/pthread/bits/libc-lock.h (enum __libc_tsd_key_t): Add
3598 _LIBC_TSD_KEY_DL_ERROR.
3600 1998-08-31 Ulrich Drepper <drepper@cygnus.com>
3602 * sysdeps/i386/i686/pt-machine.h (testandset): Add memory clobber.
3603 * sysdeps/i386/pt-machine.h: Likewise.
3604 Suggested by Roland McGrath.
3606 1998-08-28 13:58 Ulrich Drepper <drepper@cygnus.com>
3608 * internals.h: Also define THREAD_GETMEM_NC and THREAD_SETMEM_NC to
3609 access thread data with non-constant offsets.
3610 * specific.c: Use THREAD_GETMEM_NC and THREAD_SETMEM_NC where
3613 * sysdeps/i386/useldt.h: Fix typo. Add THREAD_GETMEM_NC and
3614 THREAD_SETMEM_NC definitions.
3616 * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM_NC and
3618 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
3620 1998-08-26 15:46 Ulrich Drepper <drepper@cygnus.com>
3622 * internals.h: Define THREAD_GETMEM and THREAD_SETMEM to default if
3623 not already defined.
3624 (struct _pthread_descr_struct): Add p_self and p_nr field.
3625 * manager.c (__pthread_handles): Define second element to point
3627 (__pthread_handles_num): Initialize to 2.
3628 (__pthread_manager): Use INIT_THREAD_SELF with two arguments.
3629 (pthread_start_thread): Likewise.
3630 (pthread_handle_create): Start search for free slot at entry 2.
3631 Initialize new fields p_self and p_nr.
3632 Call __clone with CLONE_PTRACE if available.
3633 (pthread_free): Call FREE_THREAD_SELF if available.
3634 * pthread.c (__pthread_initial_thread): Initialize new fields.
3635 (__pthread_manager_thread): Likewise.
3636 (__pthread_initialize_manager): Call __clone with CLONE_PTRACE.
3638 * cancel.c: Use THREAD_GETMEM and THREAD_SETMEM to access the
3639 elements of the thread descriptor.
3640 * condvar.c: Likewise.
3641 * errno.c: Likewise.
3643 * manager.c: Likewise.
3644 * pthread.c: Likewise.
3645 * ptlongjmp.c: Likewise.
3646 * semaphore.c: Likewise.
3647 * signals.c: Likewise.
3648 * specific.c: Likewise.
3649 * spinlock.c: Likewise.
3651 * sysdeps/alpha/pt-machine.h (INIT_THREAD_SELF): Add extra parameter.
3653 * sysdeps/i386/useldt.h: New file.
3654 * sysdeps/i386/i686/pt-machine.h: Show how to use this file.
3656 * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM and
3657 THREAD_SETMEM using __thread_self.
3658 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
3660 1998-08-24 Geoff Keating <geoffk@ozemail.com.au>
3662 * spinlock.c (__pthread_lock): Reset p_nextwaiting to NULL if it
3663 turned out that we didn't need to queue after all.
3665 1998-08-22 Geoff Keating <geoffk@ozemail.com.au>
3667 * sysdeps/powerpc/pt-machine.h: Remove testandset, it's not used
3668 and wastes space; correct types.
3670 1998-08-08 11:18 H.J. Lu <hjl@gnu.org>
3672 * signals.c (sigaction): Handle NULL argument.
3674 1998-08-04 Ulrich Drepper <drepper@cygnus.com>
3676 * sysdeps/unix/sysv/linux/bits/sigthread.h: Use __sigset_t instead
3679 1998-08-02 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3681 * Makefile (linuxthreads-version): Extract correct number from
3684 1998-07-29 Xavier Leroy <Xavier.Leroy@inria.fr>
3686 * Banner: Bump version number to 0.8
3687 * FAQ.html: Many updates, in particular w.r.t. debugging.
3688 * manager.c: Support for non-default stacksize for
3689 LinuxThreads-allocated stacks;
3690 don't use guard pages for stacks with default size, rely on
3691 rlimit(RLIMIT_STACK) instead (it's cheaper).
3693 * cancel.c: Use __pthread_sig_cancel and __pthread_sig_restart
3694 everywhere instead of PTHREAD_SIG_CANCEL and PTHREAD_SIG_RESTART.
3695 * condvar.c: Likewise.
3696 * internals.h: Likewise.
3697 * restart.h: Likewise.
3698 * signals.c: Likewise.
3699 * pthread.c: Likewise; set rlimit(RLIMIT_STACK) as we need it.
3701 1998-07-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3703 * weaks.c: Define pthread_mutexattr_[sg]ettype instead of
3704 __pthread_mutexattr_[sg]ettype. Add more weak aliases.
3705 * Versions: Put __pthread_mutexattr_settype under version
3706 GLIBC_2.0. Don't export __pthread_mutexattr_setkind_np and
3707 __pthread_mutexattr_gettype.
3709 1998-07-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3711 * sysdeps/pthread/bits/libc-lock.h: Make
3712 __pthread_mutexattr_settype weak. Don't make
3713 __pthread_mutexattr_setkind_np weak.
3715 1998-07-16 10:52 Ulrich Drepper <drepper@cygnus.com>
3717 * manager.c (pthread_handle_create): Check whether sched_setscheduler
3718 call can succeed here.
3720 * mutex.c: Define __pthread_mutexattr_settype and make
3721 __pthread_mutexattr_setkind_np an alias.
3722 Likewise for __pthread_mutexattr_gettype.
3724 1998-07-15 11:00 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu>
3726 * attr.c (pthread_attr_setschedpolicy): Don't check whether caller
3729 1998-07-14 19:38 Ulrich Drepper <drepper@cygnus.com>
3731 * sysdeps/pthread/bits/libc-lock.h: Define __libc_cleanup_end.
3733 1998-07-11 Andreas Jaeger <aj@arthur.rhein-neckar.de>
3735 * Examples/ex6.c: Include <unistd.h> for usleep.
3737 1998-06-13 11:04 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3739 * Examples/ex4.c (main): Use exit, not pthread_exit.
3741 1998-07-09 13:39 Ulrich Drepper <drepper@cygnus.com>
3743 * Versions: Add __pthread_mutexattr_gettype and
3744 __pthread_mutexattr_settype.
3745 * lockfile.c: Use __pthread_mutexattr_settype instead of
3746 __pthread_mutexattr_setkind_np.
3747 * mutex.c: Define __pthread_mutexattr_gettype and
3748 __pthread_mutexattr_settype.
3750 * sysdeps/pthread/pthread.h: Declare __pthread_mutexattr_gettype and
3751 __pthread_mutexattr_settype.
3752 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_init_recursive):
3753 Use __pthread_mutexattr_settype.
3755 1998-07-08 22:26 Ulrich Drepper <drepper@cygnus.com>
3757 * Versions: Add pthread_mutexattr_gettype, pthread_mutexattr_settype.
3758 * mutex.c: Define weak alias pthread_mutexattr_gettype and
3759 pthread_mutexattr_settype.
3760 * sysdeps/pthread/pthread.h: Declare these functions.
3761 Move pthread_sigmask and pthread_kill declaration in separate header.
3762 * sysdeps/unix/sysv/linux/bits/sigthread.h: New file.
3764 1998-07-07 15:20 Ulrich Drepper <drepper@cygnus.com>
3766 * Makefile: Add rules to compile and run tests.
3767 * Examples/ex1.c: Little changes to fix warnings.
3768 * Examples/ex2.c: Likewise.
3769 * Examples/ex3.c: Likewise.
3770 * Examples/ex4.c: Likewise.
3771 * Examples/ex5.c: Likewise.
3772 * Examples/ex6.c: New file.
3774 1998-07-05 11:54 Ulrich Drepper <drepper@cygnus.com>
3776 * Versions: Add pthread_attr_init to GLIBC_2.1 version in libc.
3778 1998-07-01 Andreas Jaeger <aj@arthur.rhein-neckar.de>
3780 * attr.c: Include <string.h>.
3782 1998-06-30 11:47 Ulrich Drepper <drepper@cygnus.com>
3784 * attr.c: Include errno.h. Use memcpy to copy sched_param.
3785 * internals.h: Include limits.h.
3786 * manager.c: Use memcpy to copy sched_param.
3787 * ptfork.c: Include errno.h.
3788 * pthread.c: Likewise.
3789 * semaphore.c: Likewise.
3790 * specific.c: Likewise.
3791 * spinlock.h: Likewise.
3792 * sysdeps/pthread/pthread.h: Include only allowed headers. Move
3793 type definition to ...
3794 * sysdeps/pthread/bits/pthreadtypes.h: ...here. New file.
3796 1998-06-29 12:34 Ulrich Drepper <drepper@cygnus.com>
3798 * sysdeps/pthread/pthread.h: Use __PMT not __P for function pointers.
3800 * sysdeps/pthread/pthread.h: Define various PTHREAD_* symbols also
3801 as macros as demanded in POSIX.1, Annex C.
3803 1998-06-29 12:29 Ulrich Drepper <drepper@cygnus.com>
3805 * internals.h (struct pthread_request): For free use pthread_t
3806 instead of pthread_descr.
3807 * join.c (pthread_join): Pass thread_id, not th to manager.
3808 (pthread_detach): Likewise.
3809 * manager.c (__pthread_manager): Except thread ID in FREE_REQ case.
3810 (pthread_exited): Remove detached queue code.
3811 (pthread_handle_free): Expect thread ID parameter and use it to
3812 validate the thread decsriptor. Don't use detached queue.
3813 Patches by Xavier Leroy.
3815 1998-06-27 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3817 * libpthread.map: Export accept, longjmp, sigaction, siglongjmp,
3818 _IO_flockfile, _IO_ftrylockfile, _IO_funlockfile,
3819 __pthread_atfork, __pthread_key_create, __pthread_once.
3820 * internals.h: Doc fix.
3821 * pthread.c (__pthread_initialize): Define again.
3823 1998-06-26 Ulrich Drepper <drepper@cygnus.com>
3825 * manager.c (pthread_exited): If thread is not detached put it on
3827 (pthread_handle_free): If thread is not on list with living threads
3828 search on list with detached threads.
3830 * sysdeps/pthread/pthread.h (PTHREAD_RWLOCK_INITIALIZER): Correct
3831 for new definition of pthread_rwlock_t.
3833 * spinlock.c: Correct test whether to compile
3834 __pthread_compare_and_swap or not.
3836 1998-06-25 19:27 Ulrich Drepper <drepper@cygnus.com>
3838 * attr.c: Finish user stack support. Change locking code to be safe
3839 in situations with different priorities.
3840 * cancel.c: Likewise.
3841 * condvar.c: Likewise.
3842 * internals.h: Likewise.
3844 * manager.c: Likewise.
3845 * mutex.c: Likewise.
3846 * pthread.c: Likewise.
3847 * ptlongjmp.c: Likewise.
3848 * queue.h: Likewise.
3849 * rwlock.c: Likewise.
3850 * semaphore.c: Likewise.
3851 * semaphore.h: Likewise.
3852 * signals.c: Likewise.
3853 * spinlock.c: Likewise.
3854 * spinlock.h: Likewise.
3855 * sysdeps/pthread/pthread.h: Likewise.
3856 Patches by Xavier Leroy.
3858 * sysdeps/i386/i686/pt-machine.h: New file.
3860 1998-06-25 Ulrich Drepper <drepper@cygnus.com>
3862 * sysdeps/pthread/pthread.h: Make [sg]et_stacksize and
3863 [sg]et_stackaddr prototypes always available.
3865 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
3866 _POSIX_THREAD_ATTR_STACKSIZE and _POSIX_THREAD_ATTR_STACKADDR.
3868 1998-06-24 Ulrich Drepper <drepper@cygnus.com>
3870 * manager.c (pthread_free): Undo patch from 980430.
3871 Reported by David Wragg <dpw@doc.ic.ac.uk>.
3873 1998-06-09 15:07 Ulrich Drepper <drepper@cygnus.com>
3875 * manager.c: Define __pthread_manager_adjust_prio and use it to
3876 increase priority when needed.
3877 * internals.h: Add prototype for __pthread_manager_adjust_prio.
3878 * mutex.c: Optimize mutexes to wake up only one thread.
3879 * pthread.c: Move PID of manager for global variable in structure
3881 Patches by Xavier Leroy.
3883 1998-06-07 13:47 Ulrich Drepper <drepper@cygnus.com>
3885 * sysdeps/pthread/bits/libc-lock.h: Optimize cleanup handlers a bit.
3887 1998-06-03 Andreas Jaeger <aj@arthur.rhein-neckar.de>
3889 * attr.c: Correct typo.
3891 1998-05-01 Ulrich Drepper <drepper@cygnus.com>
3893 * manager.c (pthread_free): Unmap guard before the stack.
3894 Patch by Matthias Urlichs.
3896 1998-04-30 Ulrich Drepper <drepper@cygnus.com>
3898 * manager.c (pthread_free): Detect already free child.
3899 Patch by Xavier Leroy, reported by Matthias Urlichs.
3901 1998-04-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3903 * Makefile (linuxthreads-version): Renamed back from
3906 1998-04-21 Ulrich Drepper <drepper@cygnus.com>
3908 * ptlongjmp.c: Add prototypes for __libc_siglongjmp and
3911 1998-04-20 14:55 Ulrich Drepper <drepper@cygnus.com>
3913 * Makefile (libpthread-routines): Add ptlongjmp and spinlock.
3914 * internals.h: Add definitions for new spinlock implementation.
3915 * ptlongjmp.c: New file.
3916 * spinlock.c: New file.
3917 * spinlock.h (acquire): Don't reschedule using __sched_yield, use
3918 new function __pthread_acquire to prevent deadlocks with thread
3919 with different priorities.
3920 Patches by Xavier Leroy <Xavier.Leroy@inria.fr>.
3922 1998-03-16 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3924 * manager.c (__pthread_manager): Reduce first argument to select
3925 to include just the needed file descriptor.
3927 1998-03-17 00:06 Ulrich Drepper <drepper@cygnus.com>
3929 * manager.c: Fix last patch which caused core dumps.
3931 * pthread.c: Correctly handle missing SIGRTMIN.
3933 1998-03-15 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3935 * libpthread.map: Add __libc_internal_tsd_get and
3936 __libc_internal_tsd_set. Add missing cancelable functions. Export
3937 libc internal versions of the cancelable functions.
3939 1998-03-13 16:51 Ulrich Drepper <drepper@cygnus.com>
3941 * weaks.c: Define pthread_attr_init as GLIBC_2.0 and GLIBC_2.1.
3943 1998-03-13 00:46 Ulrich Drepper <drepper@cygnus.com>
3945 * attr.c: Implement pthread_attr_[gs]etguardsize,
3946 pthread_attr_[gs]setstackaddr, pthread_attr_[gs]etstacksize.
3947 Change pthread_attr_init to have two interfaces.
3948 * internals.h (struct _pthread_descr_struct): Add new fields for
3950 * libpthread.map: Add names in GLIBC_2.1 section.
3951 * manager.c (pthread_handle_create): Implement guardsize and
3953 (pthread_free): Likewise.
3954 * pthread.c (pthread_create): Add new interface for changed
3956 * sysdeps/pthread/pthread.h: Add prototypes for new functions.
3957 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add definition of
3960 1998-03-11 00:42 Wolfram Gloger <wmglo@dent.med.uni-muenchen.de>
3962 * manager.c: Enable resetting of the thread scheduling policy
3963 to SCHED_OTHER when the parent thread has a different one.
3965 1998-02-01 13:51 Ulrich Drepper <drepper@cygnus.com>
3967 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
3968 _POSIX_ASYNCHRONOUS_IO.
3970 * sysdeps/pthread/pthread.h: Define bits for Unix98 variants of
3972 * mutex.c: Implement new mutex types.
3974 * internals.h: Include <signal.h>.
3976 * libpthread.map: Add __erno_location and __h_errno_location.
3978 * errno.c: Return pointer to variable actually in use. This might
3979 not be the one in the thread structure.
3980 * internals.h (struct _pthread_descr_struct): Add new fields p_errnop
3982 * manager.c (__pthread_manager): Set p_errnop and p_h_errnop member
3983 of manager thread structure.
3984 (pthread_handle_create): Set p_errnop and p_h_errnop members for new
3986 * pthread.c: Adapt initializer for thread structures.
3987 (__pthread_initial_thread): Set p_errnop and p_h_errnop member.
3988 (__pthread_reset_main_thread): Reset p_errnop and p_h_errnop of
3989 current thread to global variables.
3991 1998-01-31 17:27 Ulrich Drepper <drepper@cygnus.com>
3993 * rwlock.c: New file.
3994 * Makefile (libpthread-routines): Add rwlock.
3995 * sysdeps/pthread/pthread.h: Define data structures and declare
3997 * libpthread.map: Add new functions.
3999 1997-12-18 13:50 Philip Blundell <pb@nexus.co.uk>
4001 * sysdeps/arm/pt-machine.h: New file; add ARM support.
4002 * sysdeps/arm/Implies: likewise.
4003 * README: Document it.
4005 1997-12-13 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
4007 * signals.c: Remove unneeded initializer for sigwaited, saving a
4010 1997-04-11 01:18 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
4012 * semaphore.c (sem_init): Set sem_spinlock only if available.
4014 1997-12-04 01:48 Ulrich Drepper <drepper@cygnus.com>
4016 * mutex.c: Implement PTHREAD_MUTEX_CHECKERROR.
4017 * sysdeps/pthread/pthread.h: Define PTHREAD_MUTEX_CHECKERROR.
4019 * Makefile: Update from LinuxThreads 0.7.
4020 * internals.h. Likewise.
4021 * manager.c: Likewise.
4022 * mutex.c: Likewise.
4023 * pthread.c: Likewise.
4024 * signals.c: Likewise.
4025 * specific.c: Likewise.
4026 * Examples/ex3.c: Likewise.
4028 1997-11-20 18:13 Ulrich Drepper <drepper@cygnus.com>
4030 * pthread.c (__pthread_reset_main_thread): Close pipe only if still
4033 1997-10-29 05:38 Ulrich Drepper <drepper@cygnus.com>
4035 * wrapsyscall.c: Add socket functions which are also cancelation
4038 1997-10-19 21:40 Wolfram Gloger <wg@wolfram.dent.med.uni-muenchen.de>
4040 * specific.c (__libc_internal_tsd_set, __libc_internal_tsd_get):
4041 New functions for fast thread specific data within libc.
4043 * internals.h: Add new array p_libc_specific to struct
4044 _pthread_descr_struct.
4046 * sysdeps/pthread/bits/libc-lock.h: Declare new functions.
4048 1997-10-13 05:39 Ulrich Drepper <drepper@cygnus.com>
4050 * semaphore.h: Add __BEGIN_DECLS/__END_DECLS.
4051 Reported by Ralf Corsepius <corsepiu@faw.uni-ulm.de>.
4053 1997-08-29 03:05 Ulrich Drepper <drepper@cygnus.com>
4055 * internals.h (struct _pthread_descr_struct): Add definitions for
4056 two-level specific key handling.
4057 * manager.c (pthread_handle_create): Initialize specific memory array.
4058 * specific.c: Implement two-level key handling.
4059 * weaks.c: Don't provide dummy key handling.
4060 * sysdeps/pthread/bits/libc-lock.h: Typedef __libc_lock_t (no #define).
4061 Add definition of __libc_key_t.
4062 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define PTHREAD_KEYS_MAX
4064 Add definition of _POSIX_THREAD_DESTRUCTOR_ITERATIONS and
4065 PTHREAD_DESTRUCTOR_ITERATIONS.
4067 * manager.c (pthread_handle_create): Compare mmap result with
4070 * ptfork.c: Rename to __pthread_atfork and make old name a weak alias.
4071 * sysdeps/pthread/bits/pthread.h: Add prototype for __pthread_atfork.
4073 1997-08-22 19:04 Richard Henderson <rth@cygnus.com>
4075 sysdeps/sparc -> sysdeps/sparc/sparc32
4076 sysdeps/sparc64 -> sysdeps/sparc/sparc64
4078 * internals.h: Change definition of THREAD_SELF to be an expression,
4079 not a statement that did a return.
4080 * sysdeps/alpha/pt-machine.h (THREAD_SELF): Update accordingly.
4081 * sysdeps/sparc/sparc32/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF):
4082 Follow Solaris and use a "system reserved" register (%g6) to hold
4083 the thread descriptor.
4084 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
4086 1997-08-03 00:09 Ulrich Drepper <drepper@cygnus.com>
4088 * mutex.c: Correct pthread_once. Patch by Xavier Leroy.
4089 * sysdeps/pthread/pthread.h: Add prototype for __pthread_once.
4090 * sysdeps/pthread/bits/pthread.h: Add macros for __libc_once.
4092 * semaphore.c: Include spinlock.h only when needed.
4094 * specific.c (__pthread_setsepcific, __pthread_getspecific): Reject
4095 keys for entries not in use.
4097 * weaks.c: Implement key handling functions for real.
4099 1997-06-29 01:04 Richard Henderson <richard@gnu.ai.mit.edu>
4101 Initial sparc64-linux support:
4102 * sysdeps/sparc64/Implies: New file.
4103 * sysdeps/sparc64/pt-machine.h: Likewise.
4105 1997-06-29 00:48 Ulrich Drepper <drepper@cygnus.com>
4107 * semaphore.c: Include spinlock.h at correct place.
4110 1997-06-13 10:06 Richard Henderson <rth@tamu.edu>
4112 The Great Bit File Move:
4113 * sysdeps/alpha/semaphorebits.h: -> .../bits/semaphore.h.
4114 * sysdeps/powerpc/semaphorebits.h: Likewise.
4115 * sysdeps/pthread/cmpxchg/semaphorebits.h: Likewise.
4116 * sysdeps/pthread/no-cmpxchg/semaphorebits.h: Likewise.
4117 * sysdeps/pthread/libc-lock.h: -> bits/
4118 * sysdeps/pthread/stdio-lock.h: Likewise.
4119 * sysdeps/unix/sysv/linux/local_lim.h: Likewise.
4120 * sysdeps/unix/sysv/linux/posix_opt.h: Likewise.
4121 * semaphore.h: Likewise.
4122 * sysdeps/pthread/pthread.h: Likewise.
4124 * lockfile.c: <foo.h> -> <bits/foo.h>.
4125 * semaphore.h: Likewise.
4127 * Makefile: (headers): foo.h -> bits/foo.h.
4128 * sysdeps/pthread/Makefile: Likewise.
4130 1997-04-11 01:18 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
4132 * semaphore.c (sem_init): Set sem_spinlock only if available.
4134 * sysdeps/m68k/pt-machine.h (testandset, __compare_and_swap): Fix
4137 1997-04-09 03:00 Ulrich Drepper <drepper@cygnus.com>
4139 Update from LinuxThreads 0.6.
4141 * attr.c (pthread_attr_getdetachstate): Use __sched_get_priority_max
4142 and __sched_get_priority_min instead of names without `__'.
4144 * manager.c: Rewrite large parts to implement opaque pthread_t.
4146 * cancel.c: Adapt for opaque pthread_t type.
4147 * condvar.c: Likewise.
4148 * errno.c: Likewise.
4150 * mutex.c: Likewise.
4151 * pthread.c: Likewise.
4152 * signals.c: Likewise.
4153 * specific.c: Likewise.
4154 * restart.h: Likewise.
4155 * queue.h: Likewise.
4156 * Examples/ex3.c: Likewise.
4157 * Examples/ex4.c: Likewise.
4158 * sysdeps/pthread/pthread.h: Likewise.
4160 * pthread.c: Accumulate time for all threads in thread manager.
4162 * semaphore.c: Implement fallback implementation for architectures
4163 sometimes missing compare-exchange operations.
4165 * cancel.c (pthread_cancel): Validate handle argument.
4166 * join.c (pthread_join): Likewise.
4167 (pthread_detach): Likewise.
4168 * signals.c (pthread_kill): Likewise.
4170 * spinlock.h (acquire): Use __sched_yield not sched_yield.
4172 * queue.h (enqueue): Enqueue thread according to priority.
4174 * internals.c (struct pthread_start_args): New struct for passing
4175 args to cloning function.
4176 (struct _pthread): Rename to _pthread_descr_struct and adapt for
4179 * Examples/Makefile (clean): Pass -f option to rm.
4181 * sysdeps/i386/pt-machine.h: Add check for compare-exchange instruction
4182 and define TEST_FOR_COMPARE_AND_SWAP.
4183 * sysdeps/i386/i486/pt-machine.h: Removed.
4185 * sysdeps/unix/sysv/linux/local_lim.h (PTHREAD_THREADS_MAX): Increase
4188 1997-04-04 16:38 Ulrich Drepper <drepper@cygnus.com>
4190 * restart.h (suspend): Clear p_signal before suspending.
4191 (suspend_with_cancellation): Likewise.
4192 Patch by Xavier Leroy <Xavier.Leroy@inria.fr>.
4194 * weaks.c: Make __pthread_key_create return 1.
4195 * sysdeps/pthread/libc-lock.h: Define __libc_key_create,
4196 __libc_getspecific, __libc_setspecific, and __libc_key_t.
4197 * sysdeps/pthread/stdio-lock.h: Don't care for implementation not
4200 1997-03-19 15:13 Miguel de Icaza <miguel@nuclecu.unam.mx>
4202 * sysdeps/sparc/pt-machine (RELEASE): Fix.
4204 1997-03-01 07:55 Geoff Keating <geoffk@ozemail.com.au>
4206 * sysdeps/powerpc/Implies: Added.
4207 * sysdeps/powerpc/pt-machine.h: Added.
4208 * sysdeps/powerpc/semaphorebits.h: Added.
4210 1997-01-22 01:22 Ulrich Drepper <drepper@cygnus.com>
4212 * pthread.c (__pthread_initial_thread): Correct
4214 (__pthread_manager_thread): Likewise.
4215 Reported by Andreas Jaeger.
4217 1997-01-18 22:15 Richard Henderson <rth@tamu.edu>
4219 Since sigset_t no longer fits in a register, we can't pass in the
4220 thread's initial mask so easily. Take this opportunity to simplify
4221 the clone implementation by only accepting a single void* argument.
4223 * manager.c (__pthread_manager): Put thread vitals in the thread
4224 struct instead of as arguments through clone.
4225 (pthread_start_thread): Look for them there.
4226 * internals.h (struct _pthread): Add p_initial_fn,
4227 p_initial_fn_arg, p_initial_mask. Fix __pthread_manager proto.
4228 * pthread.c (pthread_initialize_manager): Revise clone invocation.