1 2002-08-26 Brian Youmans <3diff@gnu.org>
3 * Examples/ex10.c: Corrected version number in Lesser GPL copying
4 permission notice from 2 to 2.1.
5 * Examples/ex11.c: Likewise.
6 * Examples/ex13.c: Likewise.
7 * Examples/ex8.c: Likewise.
8 * Examples/ex9.c: Likewise.
11 * lockfile.c: Likewise.
13 * pt-machine.c: Likewise.
14 * ptclock_gettime.c: Likewise.
15 * ptclock_settime.c: Likewise.
17 * sysdeps/alpha/pspinlock.c: Likewise.
18 * sysdeps/alpha/pt-machine.h: Likewise.
19 * sysdeps/arm/pspinlock.c: Likewise.
20 * sysdeps/arm/pt-machine.h: Likewise.
21 * sysdeps/cris/pspinlock.c: Likewise.
22 * sysdeps/cris/pt-machine.h: Likewise.
23 * sysdeps/hppa/pspinlock.c: Likewise.
24 * sysdeps/hppa/pt-machine.h: Likewise.
25 * sysdeps/i386/i686/pt-machine.h: Likewise.
26 * sysdeps/i386/pspinlock.c: Likewise.
27 * sysdeps/i386/pt-machine.h: Likewise.
28 * sysdeps/i386/useldt.h: Likewise.
29 * sysdeps/ia64/pspinlock.c: Likewise.
30 * sysdeps/ia64/pt-machine.h: Likewise.
31 * sysdeps/m68k/pspinlock.c: Likewise.
32 * sysdeps/m68k/pt-machine.h: Likewise.
33 * sysdeps/mips/pspinlock.c: Likewise.
34 * sysdeps/mips/pt-machine.h: Likewise.
35 * sysdeps/powerpc/pspinlock.c: Likewise.
36 * sysdeps/powerpc/pt-machine.h: Likewise.
37 * sysdeps/pthread/bits/initspin.h: Likewise.
38 * sysdeps/pthread/bits/libc-lock.h: Likewise.
39 * sysdeps/pthread/bits/libc-tsd.h: Likewise.
40 * sysdeps/pthread/getcpuclockid.c: Likewise.
41 * sysdeps/pthread/posix-timer.h: Likewise.
42 * sysdeps/pthread/timer_create.c: Likewise.
43 * sysdeps/pthread/timer_delete.c: Likewise.
44 * sysdeps/pthread/timer_getoverr.c: Likewise.
45 * sysdeps/pthread/timer_gettime.c: Likewise.
46 * sysdeps/pthread/timer_routines.c: Likewise.
47 * sysdeps/pthread/timer_settime.c: Likewise.
48 * sysdeps/pthread/tst-timer.c: Likewise.
49 * sysdeps/s390/pspinlock.c: Likewise.
50 * sysdeps/s390/s390-32/pt-machine.h: Likewise.
51 * sysdeps/s390/s390-64/pt-machine.h: Likewise.
52 * sysdeps/sh/pspinlock.c: Likewise.
53 * sysdeps/sh/pt-machine.h: Likewise.
54 * sysdeps/sparc/sparc32/pspinlock.c: Likewise.
55 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
56 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: Likewise.
57 * sysdeps/sparc/sparc64/pspinlock.c: Likewise.
58 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
59 * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
60 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
61 * sysdeps/unix/sysv/linux/bits/sigthread.h: Likewise.
62 * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: Likewise.
63 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
64 * tststack.c: Likewise.
67 * wrapsyscall.c: Likewise.
69 * sysdeps/pthread/pt-initfini.c: Changed copying
70 permission notice to Lesser GPL from Library GPL, including the
71 references in the special exception.
72 * sysdeps/unix/sysv/linux/hppa/pt-initfini.c: Likewise.
73 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Likewise.
74 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c:
76 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c:
78 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: Likewise.
80 2002-08-26 Ulrich Drepper <drepper@redhat.com>
82 * Examples/ex10.c (thread): tv_nsec == 1000000000 is already
83 overflow [PR libc/4244].
85 2002-08-25 Ulrich Drepper <drepper@redhat.com>
87 * sysdeps/pthread/timer_routines.c (thread_func): Make the
88 compiler happy by adding a return statement which will never be
91 * tst-context.c (main): Cast to long before casting to pointer.
93 * Examples/ex17.c (main): Use correct format string.
95 * Examples/ex9.c (thread): Remove incorrect return statement.
97 2002-08-23 Ulrich Drepper <drepper@redhat.com>
99 * pthread.c (__linuxthreads_version): New global constant.
101 2002-08-23 Andreas Jaeger <aj@suse.de>
103 * sysdeps/x86_64/pt-machine.h: Use %fs instead of %gs
104 as thread specific register.
105 (testandset): Fix inline asm.
106 (THREAD_GETMEM): Fix inline asm.
108 2002-08-22 Roland McGrath <roland@redhat.com>
110 * sysdeps/i386/useldt.h (INIT_THREAD_SELF): Remove [HAVE_TLS_SUPPORT]
112 (INIT_THREAD_SELF): Pass second arg to DO_SET_THREAD_AREA.
113 (DO_SET_THREAD_AREA): Take second arg, pass to DO_SET_THREAD_AREA_REUSE
114 macro. That chooses whether to reuse %gs value or let kernel set it.
115 [USE_TLS] (DO_SET_THREAD_AREA_REUSE): New macro, always 1.
116 [!USE_TLS] (DO_SET_THREAD_AREA_REUSE): New macro, true if arg is
119 2002-08-21 Ulrich Drepper <drepper@redhat.com>
121 * sysdeps/i386/tls.h (TLS_SETUP_GS_SEGMENT): Add new parameter
122 also to the third definition of this macro.
124 2002-06-17 Andreas Jaeger <aj@suse.de>
126 * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
129 2002-08-20 Ulrich Drepper <drepper@redhat.com>
131 * sysdeps/i386/useldt.h: Go back to using 16-bit instructions when
132 loading/reading segment registers. Some old hardware doesn't
133 handle the 32-bit instructions as expected.
134 * sysdeps/i386/tls.h: Likewise.
136 * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Second parameter is
137 renamed to secondcall and use is negated.
138 (TLS_SETUP_GS_SEGMENT): Likewise.
139 (TLS_INIT_TP): Likewise.
140 * sysdeps/sh/tls.h (TLS_INIT_TP): Second parameter is renamed to
143 * sysdeps/i386/tls.h: Use 32-bit operations when handling segment
144 registers. No need to mask upper 16 bits in this case.
145 * sysdeps/i386/useldt.h: Likewise.
146 (DO_SET_THREAD_AREA): We have to load %gs again even if the value
147 is the same since the GDT content changed.
149 * sysdeps/i386/tls.h (TLS_INIT_TP): Add new parameter and pass it on
150 to TLS_SETUP_GS_SEGMENT.
151 (TLS_SETUP_GS_SEGMENT): Add new parameter and pass it on to
152 TLS_DO_SET_THREAD_AREA.
153 (TLS_DO_SET_THREAD_AREA): If new parameter is zero determine
154 entry number from %gs value.
155 * sysdeps/sh/tls.h (TLS_INIT_TP): Add new parameter and simply
158 * manager.c (pthread_handle_create): Pass NULL to _dl_allocate_tls.
159 Pass true to _dl_deallocate_tls.
160 (pthread_free): Likewise.
161 * pthread.c (__pthread_initialize_manager): Likewise.
163 2002-08-19 Ulrich Drepper <drepper@redhat.com>
165 * sysdeps/i386/useldt.h (DO_SET_THREAD_AREA): Use correct shift when
166 computing index from %gs value.
168 2002-08-16 Roland McGrath <roland@redhat.com>
170 * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Calculate segment
171 register value from entry number properly.
173 * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT): Rewrite asm to use %ebx
174 optimally conditional on [__PIC__].
175 (TLS_DO_SET_THREAD_AREA): New macro, implement inline syscall
176 without touching errno, and use latest modify_ldt-like interface.
177 (TLS_SETUP_GS_SEGMENT): Use that instead of INLINE_SYSCALL.
178 * sysdeps/i386/useldt.h (DO_MODIFY_LDT): Set %gs in this macro.
179 (DO_SET_THREAD_AREA): New macro, uses current syscall interface with
180 existing %gs value as the segment to set.
181 (INIT_THREAD_SELF): Rewritten using those. Use set_thread_area only
182 under [HAVE_TLS_SUPPORT] so we can rely on the initialization done
183 by the first thread's early TLS setup.
185 2002-08-15 Roland McGrath <roland@redhat.com>
187 * sysdeps/i386/tls.h (TLS_INIT_TP): Use statement expression and
188 return a value as callers now expect.
190 2002-08-11 Roland McGrath <roland@redhat.com>
192 * pthread.c (__pthread_initialize_manager): Initialize
193 p_header.data.tcb field of manager thread's descriptor.
194 (__pthread_initialize_minimal): Don't initialize p_header.data.self
195 field, already done by TLS_INIT_TP.
197 * manager.c (pthread_handle_create): Move p_header field initializers
200 2002-08-08 Ulrich Drepper <drepper@redhat.com>
202 * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Removed.
204 2002-08-07 Ulrich Drepper <drepper@redhat.com>
206 * pthread.c (__linuxthreads_initial_report_events): New variable.
207 (__pthread_initialize_manager): Use it to initialize p_report_events
209 [TLS]: Store pointer to descriptor of manager in __pthread_handles.
211 2002-08-07 Roland McGrath <roland@redhat.com>
213 * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT): Add an extra argument with
214 an "m" constraint to the asm so the compiler knows LDT_ENTRY was used.
216 2002-08-02 Roland McGrath <roland@redhat.com>
218 * sysdeps/pthread/bits/libc-tsd.h (enum __libc_tsd_key_t):
219 Add _LIBC_TSD_KEY_LOCALE.
220 * manager.c (pthread_start_thread) [!(USE_TLS && HAVE___THREAD)]:
221 Call __uselocale to initialize our per-thread locale pointer to
223 * pthread.c (__pthread_initialize_minimal): Likewise.
225 * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Add missing \s.
227 2002-08-02 Ulrich Drepper <drepper@redhat.com>
229 * pthread.c: Declare _errno, _h_errno, and _res unless we use TLS
232 * cancel.c (__pthread_perform_cleanup) [USE_TLS && HAVE___THREAD]:
233 Don't use p_libc_specific element in thread descriptor.
235 2002-07-30 Roland McGrath <roland@redhat.com>
237 * sysdeps/pthread/bits/libc-tsd.h: Include <tls.h>.
238 [USE_TLS && HAVE___THREAD]: Just include the sysdeps/generic file,
239 which does the right thing when __thread support is available.
240 * descr.h (struct _pthread_descr_struct) [USE_TLS && HAVE___THREAD]:
241 Omit `p_libc_specific', `p_errnop', `p_errno', `p_h_errnop',
242 `p_h_errno', `p_resp', and `p_res' members.
243 * pthread.c (__pthread_initialize_minimal) [USE_TLS && HAVE___THREAD]:
244 Don't initialize `p_errnop' and `p_h_errnop' members.
245 (__pthread_reset_main_thread): Likewise.
246 (__pthread_initialize_manager): Likewise.
247 * manager.c (__pthread_manager, pthread_handle_create): Likewise.
248 * pthread.c (pthread_initialize) [USE_TLS && HAVE___THREAD]:
249 Don't initialize `p_resp' member.
250 (__pthread_reset_main_thread): Likewise.
251 * manager.c (pthread_handle_create): Likewise.
252 * specific.c (libc_internal_tsd_set, libc_internal_tsd_get):
253 Conditionalize these on [!(USE_TLS && HAVE___THREAD)].
254 * no-tsd.c: Conditionalize contents on [!(USE_TLS && HAVE___THREAD)].
255 * errno.c [USE_TLS && HAVE___THREAD]
256 (__h_errno_location, __res_state): Don't define these at all.
258 * sysdeps/i386/tls.h (INSTALL_DTV): Add parens around arguments!
259 (INSTALL_NEW_DTV, GET_DTV): Likewise.
260 * sysdeps/sh/tls.h (INSTALL_DTV, INSTALL_NEW_DTV, GET_DTV): Likewise.
262 * weaks.c: Don't include <errno.h> here.
264 2002-08-01 Roland McGrath <roland@redhat.com>
266 * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT): New macro, broken out of
268 (TLS_DO_SET_THREAD_AREA): New macro, uses thread_set_area syscall.
269 (TLS_SETUP_GS_SEGMENT): New macro, try one or the other or both.
270 (TLS_INIT_TP): Use that.
272 2002-08-02 Jakub Jelinek <jakub@redhat.com>
274 * sysdeps/i386/useldt.h (DO_MODIFY_LDT): Move from INIT_THREAD_SELF.
275 (INIT_THREAD_SELF): Use sys_thread_area syscall instead if available.
276 (FREE_THREAD): Avoid modify_ldt if using GDT.
277 * sysdeps/i386/pspinlock.c (__have_no_set_thread_area): New variable.
279 2002-07-25 Jakub Jelinek <jakub@redhat.com>
281 * sysdeps/i386/tls.h: Use __ASSEMBLER__ test macro not ASSEMBLER.
282 * sysdeps/i386/pt-machine.h: Likewise.
283 * sysdeps/i386/useldt.h: Likewise.
285 2002-07-22 Ulrich Drepper <drepper@redhat.com>
287 * pthread.c (__pthread_initialize_minimal): If !SHARED and TLS
288 call __libc_setup_tls first.
289 * Makefile: Actually create tst-signal.out file when running the test.
290 (tests): Add tststatic.
291 * Examples/tststatic.c: New file.
293 2002-07-19 Ulrich Drepper <drepper@redhat.com>
295 * errno.c (__errno_location): Don't define unless !USE_TLS
297 * sysdeps/i386/pt-machine.c: Protect C code with #ifndef ASSEMBLER.
298 * sysdeps/i386/tls.h: Likewise.
299 * sysdeps/i386/useldt.h: Likewise.
300 * sysdeps/i386/i686/pt-machine.h: Likewise.
302 2002-07-02 H.J. Lu <hjl@gnu.org>
304 * sysdeps/mips/pspinlock.c: Don't include <sgidefs.h>. Always
306 * sysdeps/mips/pt-machine.h: Likewise.
308 2002-07-14 Ulrich Drepper <drepper@redhat.com>
310 * manager.c (pthread_handle_create): Initialize self-reference in
313 2002-07-01 Jakub Jelinek <jakub@redhat.com>
315 * Examples/ex9.c (main): Remove unused th variable.
317 2002-07-10 Ulrich Drepper <drepper@redhat.com>
319 * wrapsyscall.c: Add __nanosleep alias.
320 * Versions (GLIBC_2.2.6): Add __nanosleep.
321 * bug-sleep.c: New file.
322 * Makefile (tests): Add bug-sleep.
324 2002-06-19 Steven Munroe <sjmunroe@vnet.ibm.com>
326 * Examples/ex9.c (main): Use list of children and join them.
327 (thread): Do not call exit.
329 2002-06-20 Ulrich Drepper <drepper@redhat.com>
331 * spinlock.c (wait_node_alloc): We cannot use compare-and-exchange.
332 Unconditionally use the code using spinlock. Use __pthread_release
334 (wait_node_free): Likewise.
335 (__pthread_acquire, __pthread_release): Unconditionally define.
337 2002-06-07 Jakub Jelinek <jakub@redhat.com>
339 * sysdeps/ia64/pt-machine.h (MEMORY_BARRIER): Fix typo.
341 2002-05-24 Ulrich Drepper <drepper@redhat.com>
343 * sysdeps/ia64/pt-machine.h (MEMORY_BARRIER): Use __sync_synchronize.
345 2002-05-21 Ulrich Drepper <drepper@redhat.com>
347 * sysdeps/pthread/pthread.h (pthread_create): Rename first
349 (pthread_cancel): Likewise.
350 * internals.h (__pthread_create_2_1): Likewise.
351 * sysdeps/unix/sysv/linux/bits/sigthread.h (pthread_kill): Likewise.
353 2002-05-20 Ulrich Drepper <drepper@redhat.com>
355 * sysdeps/alpha/pt-machine.c (THREAD_SELF): Remove clobber.
356 Patch by Glen Nakamura <gen@flex.com>.
358 2002-05-03 Ulrich Drepper <drepper@redhat.com>
360 * signals.c: Move sighandler functions to...
361 * sighandler.c: ...here. New file.
362 * signals.c: Move signal handler related type definitions to...
363 * internals.h: ...here. Add prototypes for signal handlers.
364 * Makefile (libpthread-routines): Add sighandler.
365 (CFLAGS-sighandler.c): Add $(exceptions).
367 2002-04-30 Jakub Jelinek <jakub@redhat.com>
369 * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
371 2002-04-08 Ulrich Drepper <drepper@redhat.com>
373 * sysdeps/pthread/timer_getoverr.c: Return real overrun.
374 * sysdeps/pthread/posix-timer.h (struct timer_node): Add overrun_count.
375 * sysdeps/pthread/timer_routines.c (thread_func): Schedule next timeout
376 based on previous one and not on current time. Count overruns.
377 Patch by Eric F. Sorton <eric@cctcorp.com>.
379 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add DELAYTIMER_MAX.
381 2002-04-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
383 * sysdeps/sh/pt-machine.h: Define _PT_MACHINE_H
384 if it isn't defined yet.
385 (FLOATING_STACKS, ARCH_STACK_MAX_SIZE): Defined.
386 (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
388 * sysdeps/sh/tls.h: New file.
390 2002-04-08 Jakub Jelinek <jakub@redhat.com>
392 * manager.c (__pthread_manager_event): Use self instead of arg
393 for INIT_THREAD_SELF.
394 * sysdeps/i386/useldt.h (INIT_THREAD_SELF): Use sizeof (struct
395 _pthread_descr_struct) instead of sizeof (*descr).
397 2002-04-05 Ulrich Drepper <drepper@redhat.com>
399 * sysdeps/ia64/pt-machine.h: Protect against multiple inclusion.
400 * sysdeps/alpha/pt-machine.h: Likewise.
401 * sysdeps/arm/pt-machine.h: Likewise.
402 * sysdeps/cris/pt-machine.h: Likewise.
403 * sysdeps/hppa/pt-machine.h: Likewise.
404 * sysdeps/m68k/pt-machine.h: Likewise.
405 * sysdeps/mips/pt-machine.h: Likewise.
406 * sysdeps/powerpc/pt-machine.h: Likewise.
407 * sysdeps/s390/s390-32/pt-machine.h: Likewise.
408 * sysdeps/s390/s390-64/pt-machine.h: Likewise.
409 * sysdeps/sh/pt-machine.h: Likewise.
410 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
411 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
412 * sysdeps/x86_64/pt-machine.h: Likewise.
414 2002-04-05 Jakub Jelinek <jakub@redhat.com>
416 * man/pthread_mutexattr_init.man (pthread_mutexattr_settype): Document
417 instead of pthread_mutexattr_setkind_np.
418 (pthread_mutexattr_gettype): Similarly.
419 * man/pthread_mutexattr_setkind_np.man: New.
420 * man/Makefile (SOURCES): Add pthread_mutexattr_setkind_np.man.
422 2002-04-02 Ulrich Drepper <drepper@redhat.com>
424 * sysdeps/ia64/pt-machine.h (MEMORY_BARRIER): Define.
426 2002-03-22 Jakub Jelinek <jakub@redhat.com>
428 * sysdeps/mips/pt-machine.h (MEMORY_BARRIER): Remove.
430 2002-03-22 Ulrich Drepper <drepper@redhat.com>
432 * internals.h (MEMORY_BARRIER): Define as asm with memory as clobber.
434 2002-03-17 Andreas Jaeger <aj@suse.de>
436 * sysdeps/i386/pt-machine.h: Add testandset and __compare_and_swap
438 * sysdeps/alpha/pt-machine.h: Likewise.
439 * sysdeps/arm/pt-machine.h: Likewise.
440 * sysdeps/cris/pt-machine.h: Likewise.
441 * sysdeps/hppa/pt-machine.h: Likewise.
442 * sysdeps/i386/i686/pt-machine.h: Likewise.
443 * sysdeps/ia64/pt-machine.h: Likewise.
444 * sysdeps/m68k/pt-machine.h: Likewise.
445 * sysdeps/mips/pt-machine.h: Likewise.
446 * sysdeps/powerpc/pt-machine.h: Likewise.
447 * sysdeps/s390/s390-32/pt-machine.h: Likewise.
448 * sysdeps/s390/s390-64/pt-machine.h: Likewise.
449 * sysdeps/sh/pt-machine.h: Likewise.
450 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
451 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
452 * sysdeps/x86_64/pt-machine.h: Likewise.
454 * internals.h: Move testandset and __compare_and_swap prototypes
457 2002-03-03 Andreas Jaeger <aj@suse.de>
459 * errno.c: Include resolv.h to avoid warning.
461 2002-02-27 Ulrich Drepper <drepper@redhat.com>
463 * pthread.c [USE_TLS] (thread_self_stack): Correct check for upper
466 2002-02-23 Ulrich Drepper <drepper@redhat.com>
468 * attr.c (pthread_getattr_np): Don't take thread descriptor size
469 into account if USE_TLS.
470 * manager.c (pthread_handle_create): Free TLS data structures if call
471 failed. Pass correct stack to clone if USE_TLS.
472 * sysdeps/i386/pt-machine.h: Handle multiple inclusion.
473 * sysdeps/i386/i686/pt-machine.h: Likewise.
474 * sysdeps/i386/tls.h: Unconditionally include <pt-machine.h>.
476 * descr.h (struct _pthread_descr_struct): Update p_header for TLS.
477 Add p_stackaddr element #if USE_TLS.
478 * internals.c: Include <tls.h>.
479 * manager.c: Integrate creating and handling of thread descriptor
481 * pthread.c: Likewise.
482 * sysdeps/i386/tls.h (tcbhead_t): Add self pointer.
483 Include <linuxthreads/descr.h> only if TLS is really used.
484 (GET_DTV): New macro.
485 (TLS_INIT_TP): Initialize self pointer.
487 2002-02-17 Andreas Schwab <schwab@suse.de>
489 * signals.c (sigwait): Check for old sighandler being SIG_ERR,
492 2002-02-12 Ulrich Drepper <drepper@redhat.com>
494 * sysdeps/i386/tls.c (INSTALL_NEW_DTV): Define.
495 (INSTALL_DTV): Adjust for being passed pointer to element with length.
497 2002-02-08 Ulrich Drepper <drepper@redhat.com>
499 * sysdeps/i386/tls.h (TLS_INIT_TP): Also initialize %gs.
501 2002-02-08 Richard Henderson <rth@redhat.com>
503 * sysdeps/alpha/elf/pt-initfini.c: Use \n\ for multiline string.
505 2002-02-08 Ulrich Drepper <drepper@redhat.com>
507 * sysdeps/i386/tls.h: TLS cannot be supported with FLOATING_STACKS
510 2002-02-07 H.J. Lu <hjl@gnu.org>
512 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Silence the
514 (__pthread_spin_lock): Remove ".set noreorder".
515 * sysdeps/mips/pt-machine.h (__compare_and_swap): Liekwise.
517 2002-02-05 H.J. Lu <hjl@gnu.org>
519 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Not use
521 * sysdeps/mips/pt-machine.h (testandset): Likewise.
522 (__compare_and_swap): Likewise.
524 2002-02-07 Ulrich Drepper <drepper@redhat.com>
526 * internals.h: Move declarations/definitions of
527 __pthread_initial_thread_bos, __pthread_initial_thread,
528 __pthread_manager_thread_bos, __pthread_manager_thread_tos,
529 __pthread_manager_thread, __pthread_nonstandard_stacks, STACK_SIZE,
530 CURRENT_STACK_FRAME, __pthread_find_self, and thread_self...
532 * sysdeps/i386/tls.h: Add TLS definitions also for !FLOATING_STACKS.
533 Define THREAD_GETMEM accordingly.
535 2002-02-06 Ulrich Drepper <drepper@redhat.com>
537 * sysdeps/i386/tls.h: Include <stddef.h> for size_t.
539 * sysdeps/i386/tls.h: Define THREAD_DTV.
541 2002-02-04 Ulrich Drepper <drepper@redhat.com>
543 * internals.h: Move thread descriptor definition...
544 * descr.h.: ...here. New file.
545 * sysdeps/i386/tls.h: New file.
547 2002-02-01 H.J. Lu <hjl@gnu.org>
549 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Use a
550 different register in the delayed slot. Use branch likely.
552 * sysdeps/mips/pt-machine.h (testandset): Call _test_and_set.
553 (__compare_and_swap): Return 0 only when failed to compare. Use
556 2002-02-01 Jakub Jelinek <jakub@redhat.com>
558 * Versions (__libc_internal_tsd_get, __libc_internal_tsd_set,
559 __pthread_kill_other_threads_np): Move to GLIBC_PRIVATE.
560 * sysdeps/i386/i586/Versions: Move all symbols to GLIBC_PRIVATE.
561 * sysdeps/i386/i686/Versions: Move all symbols to GLIBC_PRIVATE.
562 * sysdeps/sparc/sparc32/sparcv9/Versions: New file.
563 * sysdeps/sparc/sparc64/Versions: New file.
564 * sysdeps/ia64/Versions: Move all symbols to GLIBC_PRIVATE.
566 2002-01-31 Ulrich Drepper <drepper@redhat.com>
568 * pthread.c: _dl_cpuclock_offset is not any longer a global variable
569 in SHARED code, use GL(dl_cpuclock_offset).
571 2002-01-28 Andreas Jaeger <aj@suse.de>
573 * sysdeps/mips/pspinlock.c (__pthread_spin_init): Clear *LOCK to
574 0. Patch by Machida Hiroyuki <machida@sm.sony.co.jp>.
576 2002-01-16 Martin Schwidefsky <schwidefsky@de.ibm.com>
578 * sysdeps/s390/s390-32/pt-machine.h (MEMORY_BARRIER): Define.
579 (CURRENT_STACK_FRAME): Remove duplicate definition.
580 * sysdeps/s390/s390-64/pt-machine.h: Likewise.
582 2002-01-14 Martin Schwidefsky <schwidefsky@de.ibm.com>
584 * Makefile (CFLAGS-tst-cancel.c): Add -fno-inline-functions to prevent
587 2002-01-12 Andreas Schwab <schwab@suse.de>
589 * Makefile (test-srcs): Add tst-signal.
590 (tests): Run tst-signal.
591 (distribute): Add tst-signal.sh.
592 * tst-signal.c, tst-signal.sh: New files.
594 2002-01-14 Andreas Jaeger <aj@suse.de>
596 * sysdeps/x86_64/pt-machine.h (INIT_THREAD_SELF): Avoid warning.
598 2002-01-11 Andreas Schwab <schwab@suse.de>
600 * signals.c (sighandler): Initialize all elements to SIG_ERR.
601 (__sigaction): Don't use value from sighandler if it is SIG_ERR.
603 2002-01-06 Richard Henderson <rth@redhat.com>
605 * sysdeps/alpha/elf/pt-initfini.c: New file.
607 2001-12-29 Andreas Jaeger <aj@suse.de>
609 * Examples/ex9.c: Add noreturn attribute for thread.
610 * Examples/ex10.c: Likewise.
611 * Examples/ex13.c (thread_start): Likewise.
612 * Examples/ex15.c (worker): Likewise.
614 * Examples/ex18.c: Include unistd.h for prototype of sleep.
616 2001-12-14 Ulrich Drepper <drepper@redhat.com>
618 * man/pthread_atfork.man: Adjust description of mutex handling
619 after fork for current implementation.
620 * linuxthreads.texi: Likewise [PR libc/2519].
622 2001-12-13 Andreas Schwab <schwab@suse.de>
624 * specific.c (pthread_key_delete): Don't contact the thread
625 manager if no threads have been created yet.
627 2001-12-12 NIIBE Yutaka <gniibe@m17n.org>
629 * sysdeps/sh/pt-machine.h (INIT_THREAD_SELF): Added __volatile__
630 qualifier to be safe.
632 2001-11-30 Andreas Schwab <schwab@suse.de>
634 * pthread.c (pthread_handle_sigcancel) [THREAD_SELF]: Double check
635 that self is the manager thread, and initialize the thread
637 (thread_self_stack) [THREAD_SELF]: New function to find self via
639 * manager.c (pthread_handle_create): Don't block cancel signal any
642 2001-11-29 Andreas Jaeger <aj@suse.de>
644 * sysdeps/x86_64/pt-machine.h: Use %gs as thread specific register.
646 (INIT_THREAD_SELF): New.
647 (THREAD_GETMEM): New.
649 (THREAD_SETMEM): New.
650 (THREAD_SETMEM_NC): New.
651 (FLOATING_STACKS): Define.
652 (ARCH_STACK_MAX_SIZE): Define.
654 2001-11-28 Kaz Kylheku <kaz@ashi.footprints.net>
656 Bugfix to pthread_key_delete. It was iterating over the thread
657 manager's linked list of threads, behind the thread manager's
658 back causing a race. The fix is to have the manager iterate over
659 the threads instead, using a new request type for doing so.
660 * internals.h (struct pthread_request): New manager request type
662 * manager.c (pthread_for_each_thread): New function.
663 (__pthread_manager): Handle new REQ_FOR_EACH_THREAD request.
664 * specific.c (struct pthread_key_delete_helper_args): New type.
665 (pthread_key_delete_helper): New static function.
666 (pthread_key_delete): Use the new thread manager
667 REQ_FOR_EACH_THREAD function to iterate over the threads and set
668 the delete key slot to a null value in each thread.
669 * Examples/ex18.c: New test.
670 * Makefile (tests): Add ex18.
672 2001-11-22 Wolfram Gloger <wg@malloc.de>
674 * pthread.c (pthread_onexit_process): Don't call free
675 after threads have been asynchronously terminated.
677 * manager.c (pthread_handle_exit): Surround cancellation
678 of threads with __flockfilelist()/__funlockfilelist().
680 2001-11-26 Andreas Schwab <schwab@suse.de>
682 * manager.c (pthread_handle_create): Start the child thread with
683 the cancel signal blocked, so that it does not handle it before
684 the thread register is set up. Save errno from failed clone call.
686 2001-11-15 Ulrich Drepper <drepper@redhat.com>
688 * sysdeps/i386/i686/Implies: Removed.
689 * sysdeps/i386/i686/Versions: New file.
691 2001-10-31 Andreas Jaeger <aj@suse.de>
693 * sysdeps/x86_64/Makefile: Remove, we do not need it anymore.
695 2001-10-05 Kevin Buettner <kevinb@cygnus.com>
697 * pthread.c (__linuxthread_pthread_sizeof_descr): Change name
698 to __linuxthreads_pthread_sizeof_descr to match name used by
699 symbol_list_arr[LINUXTHREADS_PTHREAD_SIZEOF_DESCR] in
700 linuxthreads_db/td_symbol_list.c.
702 2001-09-22 Andreas Jaeger <aj@suse.de>
704 * linuxthreads/tst-context.c: Avoid compile warning.
706 2001-09-20 Andreas Jaeger <aj@suse.de>
708 * shlib-versions: Add x86-64.
710 2001-09-19 Andreas Jaeger <aj@suse.de>
712 * sysdeps/x86_64/Makefile: New file.
713 * sysdeps/x86_64/pspinlock.c: New file.
714 * sysdeps/x86_64/pt-machine.h: New file.
716 2001-09-12 Jakub Jelinek <jakub@redhat.com>
718 * sysdeps/pthread/timer_delete.c (timer_delete): Thread may be NULL
720 * sysdeps/pthread/timer_settime.c (timer_settime): Likewise.
722 2001-09-11 Ulrich Drepper <drepper@redhat.com>
723 Wolfram Gloger <wg@malloc.de>
725 * join.c: Protect all communications from and to manager with
727 * manager.c: Likewise.
728 * pthread.c: Likewise.
729 * smeaphore.c: Likewise.
731 2001-08-29 Ulrich Drepper <drepper@redhat.com>
733 * spinlock.c (__pthread_lock): Top max_count value with
734 MAX_ADAPTIVE_SPIN_COUNT.
735 * internals.h (MAX_ADAPTIVE_SPIN_COUNT): Define if not already done.
737 * sysdeps/i386/i686/pt-machine.h (BUSY_WAIT_NOP): New macro to
740 2001-08-27 Jakub Jelinek <jakub@redhat.com>
742 * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_t): Only define to
743 non-opaque type if __USE_UNIX98.
745 2001-08-26 Jakub Jelinek <jakub@redhat.com>
747 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_t): Define
748 non-opaque lock types also if _IO_MTSAFE_IO is defined.
750 2001-08-23 Roland McGrath <roland@frob.com>
752 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start): Take
753 new first argument, skip the cleanup handler if it's zero.
754 (_LIBC_LOCK_RECURSIVE_INITIALIZER): New macro.
755 (__libc_lock_define_initialized_recursive): Use it.
756 * sysdeps/pthread/bits/stdio-lock.h: File removed.
757 The sysdeps/generic file from the main tree now suffices.
759 2001-08-22 Roland McGrath <roland@frob.com>
761 * sysdeps/pthread/bits/stdio-lock.h: Include <bits/libc-lock.h>
762 instead of <pthread.h>.
763 (_IO_lock_t): Define this typedef using __libc_lock_define_recursive.
764 (_IO_lock_initializer): Add braces.
765 (_IO_lock_lock): Use __libc_lock_lock_recursive.
766 (_IO_lock_unlock): Use __libc_lock_unlock_recursive.
768 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_recursive_t): New type.
769 (__libc_lock_define_initialized_recursive): Use it.
770 (__libc_lock_init_recursive): Likewise.
771 (__libc_lock_fini_recursive): Likewise.
772 (__libc_lock_lock_recursive): Likewise.
773 (__libc_lock_trylock_recursive): Likewise.
774 (__libc_lock_unlock_recursive): Likewise.
775 (__libc_lock_define_recursive): New macro.
777 2001-08-14 Jakub Jelinek <jakub@redhat.com>
779 * lockfile.c (__pthread_provide_lockfile): New variable.
780 * pthread.c (__pthread_require_lockfile): New variable.
781 * cancel.c (__pthread_require_lockfile): New variable.
783 2001-07-31 Ulrich Drepper <drepper@redhat.com>
785 * tst-context.c (threadfct): Initialize context before calling
788 * Examples/ex17.c: Make sure test thread is around long enough.
790 2001-07-26 kaz Kojima <kkojima@rr.iij4u.or.jp>
792 * sysdeps/sh/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF): Defined.
794 2001-07-24 Ulrich Drepper <drepper@redhat.com>
796 * tst-context.c (main): Print explanation before bailing out
797 because context handling is not supported.
799 2001-07-23 Ulrich Drepper <drepper@redhat.com>
801 * Makefile (tests): Add tst-context.
802 * tst-context.c: New file.
804 * sysdeps/pthread/bits/stdio-lock.h: Define
805 _IO_cleanup_region_start_noarg.
807 2001-07-23 Jakub Jelinek <jakub@redhat.com>
809 * sysdeps/alpha/pt-machine.h (FLOATING_STACKS): Define.
810 (ARCH_STACK_MAX_SIZE): Define.
811 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
812 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
814 2001-07-19 Jakub Jelinek <jakub@redhat.com>
816 * sysdeps/i386/useldt.h: Fix typo in ARCH_STACK_MAX_SIZE comment.
818 * sysdeps/ia64/pt-machine.h (FLOATING_STACKS): Define.
819 (ARCH_STACK_MAX_SIZE): Define.
820 * manager.c (pthread_allocate_stack): Handle FLOATING_STACKS with
821 NEED_SEPARATE_REGISTER_STACK.
823 2001-07-16 Andreas Schwab <schwab@suse.de>
825 * Makefile (before-compile): Don't add $(objpfx)crti.o.
826 (omit-deps): Add crti.
827 ($(objpfx)libpthread.so): Depend on $(objpfx)crti.o, but make sure
828 it is filtered out of the link command.
830 2001-07-16 Ulrich Drepper <drepper@redhat.com>
832 * pthread.c (pthread_initialize): For FLOATING_STACKS don't bother
833 to find the right value for __pthread_initial_thread_bos, it's not
834 used. If not FLOATING_STACKS first run
835 __pthread_init_max_stacksize.
837 2001-06-16 H.J. Lu <hjl@gnu.org>
839 * internals.h: Include <stackinfo.h>.
841 * attr.c: Don't include <stackinfo.h> here.
842 * cancel.c: Likewise.
843 * manager.c: Likewise.
844 * pthread.c: Likewise.
845 * ptlongjmp.c: Likewise.
847 2001-03-23 Matthew Wilcox <willy@ldl.fc.hp.com>
849 * attr.c: Make _STACK_GROWS_UP work.
850 * internals.h: Likewise.
851 * manager.c: Likewise.
852 * pthread.c: Likewise.
854 2001-06-15 H.J. Lu <hjl@gnu.org>
856 * pthread.c (__pthread_reset_main_thread): Fix a typo.
858 2001-02-02 John S. Marvin <jsm@udlkern.fc.hp.com>
860 * semaphore.h: Use struct _pthread_fastlock as an element of
861 sem_t instead of an identical struct.
862 * rwlock.c: Remove casts.
863 * semaphore.c: Likewise.
865 2001-04-30 Alan Modra <amodra@one.net.au>
867 * sysdeps/unix/sysv/linux/hppa/pt-initfini.c: New.
869 2001-05-25 Bruce Mitchener <bruce@cubik.org>
871 * linuxthreads.texi: Spelling corrections.
873 2001-05-25 Ulrich Drepper <drepper@redhat.com>
875 * oldsemaphore.c (__old_sem_wait): Clear p_nextwaiting before
876 returning successfully.
877 Patch by Gene Cooperman <gene@ccs.neu.edu>.
879 2001-05-24 Ulrich Drepper <drepper@redhat.com>
881 * spinlock.c (__pthread_lock) [HAS_COMPARE_AND_SWAP]: Before doing any
882 serious work try once whether the lock is uncontested.
883 Remove duplicate reading of __status before loop.
884 Change suggested by Hans Boehm <hans_boehm@hp.com>.
886 * spinlock.h (__pthread_trylock): Remove need for oldstatus variable.
887 (__pthread_alt_trylock): Likewise.
889 2001-05-01 Kaz Kylheku <kaz@ashi.footprints.net>
891 Memory barrier overhaul following line by line inspection.
892 * mutex.c (pthread_once): Missing memory barriers added.
893 * pthread.c (__pthread_wait_for_restart_signal,
894 __pthread_timedsuspend_new, __pthread_restart_new): Added
895 memory barriers ``just in case'' and for documentary value.
896 * spinlock.c (__pthread_release): New inline function for releasing
897 spinlock, to complement __pthread_acquire. Includes memory
898 barrier prior to assignment to spinlock, and __asm __volatile
899 dance to prevent reordering or optimization of the spinlock access.
900 * spinlock.c (__pthread_unlock, __pthread_alt_lock,
901 __pthread_alt_timedlock, __pthread_alt_unlock,
902 __pthread_compare_and_swap): Updated to use new __pthread_release
903 instead of updating spinlock directly.
904 * spinlock.c (__pthread_lock, __pthread_unlock, wait_node_alloc,
905 wait_node_free, wait_node_dequeue, __pthread_alt_lock,
906 __pthread_alt_timedlock, __pthread_alt_unlock, __pthread_acquire):
907 Memory barrier overhaul. Lots of missing memory barriers added,
908 a couple needless ones removed.
909 * spinlock.c (__pthread_compare_and_swap): testandset optimization
910 removed, just calls __pthread_acquire, which has the new read
911 barrier in it before its testandset.
913 2001-05-20 Roland McGrath <roland@frob.com>
915 * Makeconfig: New file, variables used to be in main libc Makeconfig.
917 2001-05-09 Geoff Keating <geoffk@redhat.com>
919 * sysdeps/powerpc/pt-machine.h
920 (HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS): Define.
921 (__compare_and_swap): Remove memory barriers.
922 (__compare_and_swap_with_release_semantics): New function.
924 2001-04-24 Andreas Jaeger <aj@suse.de>
926 * wrapsyscall.c: send* and recv* return ssize_t.
928 * sysdeps/pthread/timer_getoverr.c (timer_getoverrun): Unlock the
929 mutex instead of double locking it.
930 Reported by Pierre Artaud <partaud@sodatec.com>.
932 2001-04-23 Ulrich Drepper <drepper@redhat.com>
934 * sysdeps/pthread/getcpuclockid.c: Make function generic, test
935 using #ifdef whether the clock is available.
936 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c: Removed.
938 * sysdeps/ia64/Versions: New file.
940 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init): We don't
941 have to call __gmon_start__ in the libpthread DSO.
942 * sysdeps/pthread/pt-initfini.c (_init): Likewise.
944 * Makefile (libpthread-routines): Add ptclock_gettime and
946 * internals.h: Don't use cpuclock-init.h definitions, use
947 hp-timing.h definitions.
948 * pthread.c: Likewise.
949 * manager.c: Likewise.
950 * ptclock_gettime.c: New file.
951 * ptclock_settime.c: New file.
952 * internals.h: Fix parameter type for __pthread_clock_gettime and
953 __pthread_clock_settime.
955 * sysdeps/i386/i586/ptclock_gettime.c: Removed.
956 * sysdeps/i386/i586/ptclock_settime.c: Removed.
957 * sysdeps/i386/i586/Makefile: Removed.
959 2001-04-22 Ulrich Drepper <drepper@redhat.com>
961 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_ASYNCH_IO.
962 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
964 2001-04-21 Andreas Jaeger <aj@suse.de>
966 * sysdeps/pthread/timer_routines.c (thread_func): Add noreturn
967 attribute, remove statements that will never be executed.
968 (thread_func): Remove mutex_unlock call since it's never executed.
969 (thread_func): Fix comment as suggested by Jakub Jelinek.
971 * manager.c (__pthread_manager): Add noreturn
973 (pthread_start_thread): Likewise, remove return statement.
974 (pthread_start_thread_event): Likewise.
975 Add noreturn attribute for pthread_handle_exit.
976 * weaks.c: Add noreturn attribute for pthread_exit.
978 * internals.h: Add __pthread_clock_gettime and
979 __pthread_clock_settime prototypes.
981 2001-04-21 Ulrich Drepper <drepper@redhat.com>
983 * internals.h: Include <cpuclock-init.h>.
984 (struct _pthread_descr_struct): Add p_cpuclock_offset field if
985 CPUCLOCK_VARDEF is defined.
986 * pthread.c (__pthread_initialize_minimal): Initialize
987 p_cpuclock_offset field for main thread if CPUCLOCK_INIT is defined.
988 * manager.c (pthread_start_thread): Set p_cpuclock_offset field
989 for new thread to current CPU clock value.
991 * sysdeps/i386/useldt.h: Extend all the macros to handle 8-byte values.
993 * sysdeps/i386/i586/Makefile: New file.
994 * sysdeps/i386/i586/Versions: New file.
995 * sysdeps/i386/i586/ptclock_gettime.c: New file.
996 * sysdeps/i386/i586/ptclock_settime.c: New file.
997 * sysdeps/i386/i686/Implies: New file.
999 2001-04-18 Jakub Jelinek <jakub@redhat.com>
1001 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: Put specs into
1002 $generated, not $postclean-generated.
1004 2001-04-18 Andreas Jaeger <aj@suse.de>
1006 * Makefile (otherlibs): Added.
1008 2001-04-18 Jakub Jelinek <jakub@redhat.com>
1010 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
1012 2001-04-16 Ulrich Drepper <drepper@redhat.com>
1014 * signals.c (sigwait): NSIG is no signal number. Block all
1015 signals while in signal handler for signals in SET.
1016 Patch by Manfred Spraul <manfred@colorfullife.com>.
1018 2001-04-12 Ulrich Drepper <drepper@redhat.com>
1020 * tst-cancel.c: Disable most tests. Add new test where all
1021 cleanup handlers must run.
1022 * Makefile (tests): Add tst-cancel again.
1024 * cancel.c (__pthread_perform_cleanup): Correct condition for
1025 leaving cleanup loop early.
1027 * sysdeps/i386/Makefile: Make sure gcc uses a frame pointer for
1028 all the files which use CURRENT_STACK_FRAME.
1029 * sysdeps/i386/pt-machine.h (CURRENT_STACK_FRAME): Define using
1030 __builtin_frame_address.
1031 * sysdeps/i386/i686/pt-machine.h: Likewise.
1033 2001-04-11 Ulrich Drepper <drepper@redhat.com>
1035 * Makefile (tests): Comment out tst-cancel for now.
1037 * tst-cancel.c (main): Cleanup 4 is supposed to run. Create
1038 temporary file in object directory.
1039 * Makefile: Don't allow inlining when compiling tst-cancel.c.
1040 Pass $(objpfx) to tst-cancel.
1042 2001-04-11 David S. Miller <davem@redhat.com>
1044 * sysdeps/sparc/sparc32/pt-machine.h (stack_pointer): Advance
1045 up closer to user local variables so that new cleanup heuristics work.
1046 * sysdeps/sparc/sparc64/pt-machine.h (stack_pointer): Likewise.
1048 2001-04-11 Ulrich Drepper <drepper@redhat.com>
1050 * cancel.c (_pthread_cleanup_push): Catch invalid __prev buffer
1052 (_pthread_cleanup_push_defer): Likewise.
1054 * tst-cancel.c (main): Fix loop printing cleanup output.
1056 2001-04-10 kaz Kojima <kkojima@rr.iij4u.or.jp>
1058 * sysdeps/sh/pspinlock.c (__pthread_spin_lock): Fix a reverse
1060 (__pthread_spin_trylock): Likewise.
1061 * sysdeps/sh/pt-machine.h (testandset): Likewise.
1063 2001-04-10 Ulrich Drepper <drepper@redhat.com>
1065 * join.c (pthread_exit): Move code to new function __pthread_do_exit
1066 which takes an extra parameter with the current frame pointer.
1067 Call new function with CURRENT_STACK_FRAME.
1068 (__pthread_do_exit): New function. Call __pthread_perform_cleanup
1069 with the new parameter.
1070 (pthread_join): Call __pthread_do_exit instead of pthread_exit.
1071 * cancel.c (__pthread_perform_cleanup): Takes extra parameter. Use
1072 this parameter as the initial value the cleanup handler records are
1073 compared against. No active cleanup handler record must have an
1074 address lower than the previous one and the initial record must be
1075 above (below on PA) the frame address passed in.
1076 (pthread_setcancelstate): Call __pthread_do_exit instead of
1078 (pthread_setcanceltype): Likewise.
1079 (pthread_testcancel): Likewise.
1080 (_pthread_cleanup_pop_restore): Likewise.
1081 * condvar.c (pthread_cond_wait): Likewise.
1082 (pthread_cond_timedwait_relative): Likewise.
1083 * manager.c (pthread_start_thread): Likewise.
1084 * oldsemaphore.c (__old_sem_wait): Likewise.
1085 * pthread.c (pthread_handle_sigcancel): Likewise.
1086 * semaphore.c (__new_sem_wait): Likewise.
1087 (sem_timedwait): Likewise.
1088 * ptlongjmp.c (pthread_cleanup_upto): Also use current stack frame
1089 to limit the cleanup handlers which get run.
1090 * internals.h: Add prototype for __pthread_do_exit. Adjust prototype
1091 for __pthread_perform_cleanup.
1093 * Makefile (tests): Add tst-cancel.
1094 * tst-cancel.c: New file.
1096 2001-04-08 Hans-Peter Nilsson <hp@axis.com>
1098 * sysdeps/cris/pt-machine.h: New file.
1099 * sysdeps/cris/pspinlock.c: New file.
1101 2001-04-09 Hans-Peter Nilsson <hp@axis.com>
1103 * shlib-versions: Add case for Linux on CRIS.
1105 2001-03-26 Ulrich Drepper <drepper@redhat.com>
1107 * attr.c (pthread_getattr_np): Correct computation of stack size
1108 for machiens with register stack.
1110 * Examples/ex17.c (main): Correct detection of failed mmap call.
1112 2001-03-21 Jakub Jelinek <jakub@redhat.com>
1114 * pthread.c (__pthread_initialize_manager): Fix a typo.
1116 2001-03-21 Jakub Jelinek <jakub@redhat.com>
1118 * attr.c (__pthread_attr_setstack): Fix alignment check.
1119 (pthread_getattr_np): __stackaddr is top of stack, not bottom.
1120 * Makefile (tests): Add ex17 test.
1121 * Examples/ex17.c: New test.
1123 2001-03-20 Ulrich Drepper <drepper@redhat.com>
1125 * Makefile: Define -D_RPC_THREAD_SAFE_ for cancel.c.
1126 * cancel.c (__pthread_perform_cleanup): Call __rpc_thread_destroy.
1127 * sysdeps/pthread/bits/libc-tsd.h: Define _LIBC_TSD_KEY_VARS.
1129 2001-03-18 Ulrich Drepper <drepper@redhat.com>
1131 * Makefile: When generating DSO link with libc_nonshared.a.
1133 2001-02-26 Jakub Jelinek <jakub@redhat.com>
1135 * signals.c (pthread_sighandler): Use CALL_SIGHANDLER.
1137 2001-02-23 Jakub Jelinek <jakub@redhat.com>
1139 * internals.h (__pthread_init_max_stacksize): New prototype.
1140 * attr.c (__pthread_attr_setstacksize): Call
1141 __pthread_init_max_stacksize if not yet initialized.
1142 * pthread.c (__pthread_init_max_stacksize): New function.
1143 (__pthread_initialize_manager): Call it.
1144 Patch by <dtc@cmucl.cons.org>.
1146 2001-03-16 Ulrich Drepper <drepper@redhat.com>
1148 * attr.c (pthread_getattr_np): Fix __stacksize computation for IA-64.
1150 2001-03-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
1152 * shlib-versions: Add rule for Linux on 64 bit S/390.
1153 * sysdeps/s390/s390-64/pt-machine.h: New file.
1154 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
1156 2001-03-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
1158 * sysdeps/s390/pt-machine.h: Move to...
1159 * sysdeps/s390/s390-32/pt-machine.h: ...here.
1160 Add defines for FLOATING_STACK and ARCH_STACK_MAX_SIZE.
1162 2001-03-15 Ulrich Drepper <drepper@redhat.com>
1164 * Versions [libpthread] (GLIBC_2.2.3): Add pthread_getattr_np.
1165 * attr.c: Implement pthread_getattr_np.
1166 * sysdeps/pthread/pthread.h: Add prototype for pthread_getattr_np.
1167 * internals.h (struct _pthread_descr_struct): Add p_inheritsched.
1168 * manager.c (pthread_handle_create): Initialize p_inheritsched.
1170 2001-03-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
1172 * sysdeps/unix/sysv/linux/s390/pt-initfini.c: Use 0x07 padding for
1175 2001-02-20 Hans Boehm <hans_boehm@hp.com>
1177 * manager.c (manager_mask): Removed static vesion. Now always local
1178 to __pthread_manager().
1179 (manager_mask_all): Removed completely.
1180 (__pthread_manager): Remove manager_mask_all initialization.
1181 (pthread_handle_create): Remove code to set and reset signal mask
1182 around __clone2() calls.
1184 2001-02-17 Jakub Jelinek <jakub@redhat.com>
1186 * spinlock.c (__pthread_lock): Force lock->__status to be read from
1187 memory on every spin.
1189 2001-02-10 Andreas Jaeger <aj@suse.de>
1191 * Makefile (extra-objs): New.
1193 2001-02-09 Jakub Jelinek <jakub@redhat.com>
1195 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Add
1196 __pthread_initialize_minimal prototype.
1198 2001-02-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
1200 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
1202 2001-02-06 Martin Schwidefsky <schwidefsky@de.ibm.com>
1204 * sysdeps/unix/sysv/linux/s390/pt-initfini.c: New file.
1206 2001-02-06 Ulrich Drepper <drepper@redhat.com>
1208 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: First attempt to fix the
1209 broken code. Patch by Jes Sorensen.
1211 2001-02-06 Andreas Jaeger <aj@suse.de>
1213 * sysdeps/pthread/pthread.h: Move __pthread_initialize from here
1215 * internals.h: ...here.
1217 2001-02-05 Jes Sorensen <jes@linuxcare.com>
1219 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
1221 2001-02-02 Ulrich Drepper <drepper@redhat.com>
1223 * Versions: Remove __pthread_initialize_minimal.
1225 2001-02-01 Ulrich Drepper <drepper@redhat.com>
1227 * Makefile: Add rules to build crti.o and make it being used in
1228 building libpthread.so.
1229 * sysdeps/i386/Makefile: New file.
1230 * sysdeps/pthread/pt-initfini.c: New file.
1232 * pthread.c: Cleanups.
1234 2001-01-28 Andreas Jaeger <aj@suse.de>
1236 * oldsemaphore.c (__old_sem_init): Adjust for last change.
1237 * sysdeps/pthread/bits/libc-lock.h: Likewise.
1238 * spinlock.c: Likewise.
1240 2001-01-28 Ulrich Drepper <drepper@redhat.com>
1242 * sysdeps/pthread/bits/initspin.h: Make all names namespace clean.
1243 * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: Likewise.
1244 * manager.c: Adjust for namespace cleanup in bits/initspin.h.
1245 * pthread.c: Likewise.
1246 * spinlock.h: Likewise.
1247 * sysdeps/pthread/pthread.h: Likewise.
1249 2001-01-26 Ulrich Drepper <drepper@redhat.com>
1251 * sysdeps/pthread/bits/pthreadtypes.h: Define pthread_attr_t also
1252 as struct __pthread_attr_s.
1254 * semaphore.h (sem_t): Cleanup namespace, rename status and
1257 2001-01-13 Jakub Jelinek <jakub@redhat.com>
1259 * pthread.c (pthread_onexit_process): Clear
1260 __pthread_manager_thread_bos after freeing it.
1261 * Makefile (tests): Add ex16.
1262 * Examples/ex16.c: New file.
1264 2001-01-11 Jakub Jelinek <jakub@redhat.com>
1266 * Makefile (CFLAGS-pthread.c): Pass -DHAVE_Z_NODELETE if ld supports
1268 * pthread.c (pthread_exit_process): Rename to...
1269 (pthread_onexit_process): ...this.
1270 (pthread_atexit_process, pthread_atexit_retcode): New.
1271 (pthread_initialize): Call __cxa_atexit instead of __cxa_on_exit
1272 and only if HAVE_Z_NODELETE is not defined.
1273 (__pthread_initialize_manager): Register pthread_atexit_retcode
1276 2001-01-11 Ulrich Drepper <drepper@redhat.com>
1278 * pthread.c (pthread_initialize): Use __cxs_on_exit not __cxa_atexit.
1280 2001-01-11 Jakub Jelinek <jakub@redhat.com>
1282 * Makefile (tests): Add ex15.
1283 * Examples/ex15.c: New test.
1285 2001-01-08 Ulrich Drepper <drepper@redhat.com>
1287 * pthread.c (pthread_exit_process): Free memory allocated for
1290 2000-12-31 Ulrich Drepper <drepper@redhat.com>
1292 * manager.c (pthread_alloca_stack): Remove MAP_FIXED from mmap calls.
1293 (pthread_free): Always unmap the stack. It's safe now that we don't
1294 use MAP_FIXED to allocate stacks.
1296 2000-12-31 Ulrich Drepper <drepper@redhat.com>
1298 * sysdeps/powerpc/pspinlock.c: Don't include pt-machine.h here.
1300 * manager.c (pthread_allocate_stack): Prepare for removal of MAP_FIXED.
1302 2000-11-15 Wolfram Gloger <wg@malloc.de>
1304 * manager.c (pthread_free): [!FLOATING_STACKS]: Only remap the
1305 stack to PROT_NONE, don't unmap it, avoiding collisions with malloc.
1307 2000-12-27 Andreas Jaeger <aj@suse.de>
1309 * Examples/ex13.c: Make local functions static.
1310 * ecmutex.c: Likewise.
1311 * joinrace.c: Likewise.
1312 * Examples/ex14.c: Likewise.
1314 * Examples/ex2.c: Make local functions static; reformat.
1315 * Examples/ex1.c: Likewise.
1316 * Examples/ex4.c: Likewise.
1317 * Examples/ex5.c: Likewise.
1318 * Examples/ex7.c: Likewise.
1320 * oldsemaphore.c: Add prototypes to shut up GCC.
1321 * pt-machine.c: Likewise.
1323 * weaks.c: Add prototype for pthread_exit.
1325 * internals.h: Add some prototypes, format prototypes and add
1327 Move __libc_waitpid prototype to include/sys/wait.h.
1329 * rwlock.c: Include <bits/libc-lock.h> for prototypes.
1330 * mutex.c: Likewise.
1331 * specific.c: Likewise.
1332 * ptfork.c: Likewise.
1334 * lockfile.c: Include internals.h to get prototypes.
1335 * events.c: Likewise.
1336 * sysdeps/alpha/pspinlock.c: Likewise.
1337 * sysdeps/arm/pspinlock.c: Likewise.
1338 * sysdeps/hppa/pspinlock.c: Likewise.
1339 * sysdeps/i386/pspinlock.c: Likewise.
1340 * sysdeps/ia64/pspinlock.c: Likewise.
1341 * sysdeps/m68k/pspinlock.c: Likewise.
1342 * sysdeps/mips/pspinlock.c: Likewise.
1343 * sysdeps/powerpc/pspinlock.c: Likewise.
1344 * sysdeps/s390/pspinlock.c: Likewise.
1345 * sysdeps/sh/pspinlock.c: Likewise.
1346 * sysdeps/sparc/sparc32/pspinlock.c: Likewise.
1347 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: Likewise.
1348 * sysdeps/sparc/sparc64/pspinlock.c: Likewise.
1350 2000-12-27 Ulrich Drepper <drepper@redhat.com>
1352 * attr.c (__pthread_attr_setstack): Fix setting of __stackaddr element.
1353 (__pthread_attr_getstack): Return correct address.
1354 Add warnings for using pthread_attr_getstackaddr and
1355 pthread_attr_setstackaddr.
1357 2000-12-26 Ulrich Drepper <drepper@redhat.com>
1359 * Examples/ex6.c (test_thread): Make static.
1360 * Examples/ex12.c (test_thread): Make static and add noreturn
1363 2000-12-18 Jes Sorensen <jes@linuxcare.com>
1365 * linuxthreads/sysdeps/ia64/pt-machine.h: __compare_and_swap
1366 and compare_and_swap_with_release_semantics returns int not long.
1368 2000-12-17 Andreas Jaeger <aj@suse.de>
1370 * sysdeps/s390/pt-machine.h (testandset): Use long int as return
1372 * sysdeps/arm/pt-machine.h (testandset): Likewise.
1373 * sysdeps/hppa/pt-machine.h (testandset): Likewise.
1374 * sysdeps/m68k/pt-machine.h (testandset): Likewise.
1375 * sysdeps/sh/pt-machine.h (testandset): Likewise.
1376 * sysdeps/sparc/sparc32/pt-machine.h (testandset): Likewise.
1377 * sysdeps/sparc/sparc64/pt-machine.h (testandset): Likewise.
1379 2000-12-17 Ulrich Drepper <drepper@redhat.com>
1381 * sysdeps/i386/pt-machine.h (testandset): Adjust for prototype change.
1382 * sysdeps/i386/i686/pt-machine.h (testandset): Likewise.
1384 2000-12-17 Andreas Jaeger <aj@suse.de>
1386 * internals.h: Add prototypes for testandset and
1387 __compare_and_swap to shut up gcc warnings.
1389 2000-12-06 Wolfram Gloger <wg@malloc.de>
1391 * join.c (pthread_detach): Allow case where the thread has already
1394 2000-12-05 Andreas Jaeger <aj@suse.de>
1396 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Don't set mips2.
1397 * sysdeps/mips/pt-machine.h (testandset): Likewise.
1398 (__compare_and_swap): Likewise.
1399 Patches by Maciej W. Rozycki <macro@ds2.pg.gda.pl>.
1401 2000-11-20 Jakub Jelinek <jakub@redhat.com>
1403 * Examples/ex3.c (main): Cast int to long before casting to void *.
1404 (search): Cast void * to long, not int.
1405 * Examples/ex8.c (main, thread): Similarly.
1406 * Examples/ex11.c (main): Similarly.
1407 * Examples/ex14.c (worker, do_test): Similarly.
1408 * ecmutex.c (worker, do_test): Similarly.
1409 (nlocks): Cast to int.
1411 2000-11-08 Bruce Mitchener <bruce@cubik.org>
1413 * linuxthreads.texi: Add documentation for pthreads attributes
1414 guardsize, stackaddr, stacksize, and stack. Fix typo in previous
1415 patch. Document pthread_[sg]etconcurrency(). Mark
1416 pthread_mutexattr_[sg]ettype() as POSIX rather than GNU.
1418 2000-11-07 Ulrich Drepper <drepper@redhat.com>
1420 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
1422 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1423 Reported by Christopher Yeoh <cyeoh@linuxcare.com.au>.
1425 2000-11-06 Ulrich Drepper <drepper@redhat.com>
1427 * cancel.c (pthread_cancel): Always set p_canceled, even if we are
1428 not doing it right now.
1429 Reported by Kaz Kylheku <kaz@ashi.footprints.net>.
1431 2000-10-30 Ulrich Drepper <drepper@redhat.com>
1433 * Examples/ex4.c (main): Don't use exit() to avoid warning with
1436 2000-10-29 Ulrich Drepper <drepper@redhat.com>
1438 * attr.c (__pthread_attr_setguardsize): Don't round guardsize
1439 here. Reported by Bruce Mitchener <bruce@cubik.org>.
1441 * linuxthreads.texi: Changes terminology to 'type' from 'kind' when
1442 discussing mutexes. (As per the Unix98 name for the API.)
1443 Changes documentation for pthread_mutexattr_setkind_np() and
1444 pthread_mutexattr_getkind_np() over to the Unix98 APIs for the
1445 same: pthread_mutexattr_settype() and pthread_mutexattr_gettype().
1446 Changes references to PTHREAD_MUTEXATTR_FAST_NP to
1447 PTHREAD_MUTEXATTR_ADAPTIVE_NP.
1448 Begins to introduce discussion of the ``timed'' mutex type. This
1449 discussion is currently incomplete.
1450 Patch by Bruce Mitchener <bruce@cubik.org>.
1452 2000-10-26 Kazumoto Kojima <kkojima@rr.iij4u.or.jp>
1453 Yutaka Niibe <gniibe@chroot.org>
1455 * sysdeps/sh/pt-machine.h (testandset): Since the operand of TAS.B
1456 has restrictions, use register.
1458 2000-10-23 Andreas Schwab <schwab@suse.de>
1460 * Examples/ex14.c (TIMEOUT): Override default timeout.
1462 2000-10-16 Ulrich Drepper <drepper@redhat.com>
1464 * specific.c: Protect tsd array modification in thread data
1465 structures by getting the thread lock in pthread_key_delete and
1466 __pthread_destroy_specifics.
1467 Patch by Wolfram Gloger <Wolfram.Gloger@dent.med.uni-muenchen.de>.
1469 2000-10-12 Alan Modra <alan@linuxcare.com.au>
1471 * sysdeps/pthread/bits/initspin.h: New file.
1472 * spinlock.h: Move LOCK_INITIALIZER definition to <bits/initspin.h>.
1473 (__pthread_init_lock): Initialize lock with LT_SPINLOCK_INIT.
1474 (__pthread_alt_init_lock): Likewise.
1475 (__pthread_alt_trylock): Release lock with LT_SPINLOCK_INIT.
1477 2000-10-12 David Huggins-Daines <dhd@linuxcare.com>
1479 * oldsemaphore.c (__old_sem_init): Release lock with
1480 LT_SPINLOCK_INIT, not zero.
1481 * spinlock.c (__pthread_unlock): Likewise.
1482 (__pthread_alt_lock): Likewise.
1483 (__pthread_alt_timedlock): Likewise.
1484 (__pthread_alt_unlock): Likewise.
1485 * sysdeps/pthread/bits/libc-lock.h: Initialize locks with
1486 LT_SPINLOCK_INIT if it is non-zero. Likewise for init-once flags.
1487 * sysdeps/pthread/pthread.h: Include bits/initspin.h. Use
1488 LT_SPINLOCK_INIT do initialize spinlocks not 0.
1490 2000-10-12 David Huggins-Daines <dhd@linuxcare.com>
1492 * shlib-versions: Add version definitions for hppa-linux.
1494 2000-10-12 Alan Modra <alan@linuxcare.com.au>
1496 * sysdeps/hppa/pspinlock.c: New file.
1497 * sysdeps/hppa/pt-machine.h: New file.
1498 * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: New file.
1500 2000-10-05 Jakub Jelinek <jakub@redhat.com>
1502 * mutex.c (__pthread_mutex_destroy): Correct test of
1503 busy mutex for mutexes using alternate fastlocks.
1504 Patch by dtc@cmucl.cons.org.
1506 2000-09-28 Martin Schwidefsksy <schwidefsky@de.ibm.com>
1508 * sysdeps/s390/pt-machine.h: Make %a0 the thread register.
1510 2000-09-28 Ulrich Drepper <drepper@redhat.com>
1512 * mutex.c (__pthread_mutex_unlock): For PTHREAD_MUTEX_RECURSIVE_NP
1513 test for owner first.
1514 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1516 * cancel.c (pthread_cancel): Don't do anything if cancelation is
1519 2000-09-26 Ulrich Drepper <drepper@redhat.com>
1521 * spinlock.h (__pthread_set_own_extricate_if): Optimize a bit.
1522 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1524 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
1525 _POSIX_MONOTONIC_CLOCK.
1527 * spinlock.h (__pthread_set_own_extricate_if): Add back locking
1530 2000-09-20 Andreas Jaeger <aj@suse.de>
1532 * pthread.c [!__ASSUME_REALTIME_SIGNALS]: Make inclusion of
1533 "testrtsig.h" conditional.
1535 2000-09-11 Ulrich Drepper <drepper@redhat.com>
1537 * sysdeps/pthread/pthread.h: Declare pthread_attr_getstack and
1538 pthread_attr_setstack.
1539 * Versions [libpthread] (GLIBC_2.2): Export pthread_attr_getstack and
1540 pthread_attr_setstack.
1541 * attr.c (pthread_attr_getstack, pthread_attr_setstack): New functions.
1543 2000-09-05 Ulrich Drepper <drepper@redhat.com>
1545 * Examples/ex14.c: New file.
1546 * Makefile (tests): Add ex14.
1548 * mutex.c (__pthread_mutex_unlock): Correct test for already unlocked
1549 mutex. Patch by dtc@cmucl.cons.org.
1551 * ecmutex.c: New file.
1552 * Makefile (tests): Add ecmutex.
1554 2000-09-04 H.J. Lu <hjl@gnu.org>
1556 * attr.c (__pthread_attr_setguardsize): Use page_roundup
1557 instead of roundup to round up to the page size.
1559 2000-09-03 Mark Kettenis <kettenis@gnu.org>
1561 * manager.c (pthread_exited): Correctly report event as TD_REAP
1562 instead of TD_DEATH. Fix comments.
1564 2000-09-03 Ulrich Drepper <drepper@redhat.com>
1566 * spinlock.h (testandset): Add cast to avoid warning.
1567 Patch by Franz Sirl <Franz.Sirl-kernel@lauterbach.com>.
1569 2000-09-02 Andreas Jaeger <aj@suse.de>
1571 * sysdeps/pthread/timer_routines.c: Include stdlib.h for abort
1574 2000-09-01 Ulrich Drepper <drepper@redhat.com>
1576 * sysdeps/pthread/bits/stdio-lock.h (_IO_cleanup_region_start):
1577 Fix typo in last patch (_mode -> _flags).
1579 * sysdeps/pthread/bits/stdio-lock.h (_IO_cleanup_region_start):
1580 Provide definition which respects _IO_USER_LOCK flag.
1582 2000-08-30 Ulrich Drepper <drepper@redhat.com>
1584 * manager.c (pthread_allocate_stack): Clear descriptor only if not
1587 2000-08-25 Ulrich Drepper <drepper@redhat.com>
1589 * Makefile: Add rules to build and run unload.
1590 * unload.c: New file.
1592 * pthread.c (pthread_exit_process): Move thread_self use inside `if'.
1594 * sysdeps/pthread/pthread.h
1595 (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Defined.
1596 (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: Defined.
1598 2000-08-24 Andreas Jaeger <aj@suse.de>
1600 * Examples/ex13.c: Include <string.h> for strerror prototype and
1601 <stdlib.h> for abort prototype.
1602 (pthr_cond_signal_mutex): Rewrite to silence GCC.
1603 (thread_start): Remove unused variable err.
1604 (main): Silence GCC warnings.
1606 2000-08-22 Andreas Jaeger <aj@suse.de>
1608 * Examples/ex13.c: New test by Kurt Garloff <garloff@suse.de>.
1610 * Makefile (tests): Add ex13.
1612 2000-08-20 Ulrich Drepper <drepper@redhat.com>
1614 * semaphore.h: Add restrict where required by AGd4.
1615 * sysdeps/pthread/pthread.h: Likewise.
1616 * sysdeps/pthread/unix/sysv/linux/bits/sigthread.h: Likewise.
1618 2000-08-15 Ulrich Drepper <drepper@redhat.com>
1620 * Makefile (tests): Add ex12. Add rule to build it.
1621 * Examples/ex12.c: New file.
1623 2000-08-13 Ulrich Drepper <drepper@redhat.com>
1625 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_SEMAPHORES
1626 even though the implementation is not quite complete (but it reports
1627 it). Define _POSIX_MESSAGE_PASSING to -1.
1628 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1630 2000-08-12 Andreas Jaeger <aj@suse.de>
1632 * sysdeps/mips/pt-machine.h (testandset): Add .set mips2 for
1634 (__compare_and_swap): Likewise.
1635 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Likewise.
1637 2000-08-10 Ulrich Drepper <drepper@redhat.com>
1639 * pthread.c (__pthread_initial_thread): Initialize p_errnop and
1640 p_h_errnop correctly and not to NULL.
1642 2000-08-05 Ulrich Drepper <drepper@redhat.com>
1644 * Banner: Bump version number to 0.9.
1646 2000-08-04 Ulrich Drepper <drepper@redhat.com>
1648 * Makefile (tests): Add tststack. Add rule to build the program.
1649 * tststack.c: New file.
1651 * internals.h: Declare __pthread_max_stacksize.
1652 * pthread.c (__pthread_max_stacksize): New variable.
1653 (__pthread_initialize_manager): Determine __pthread_initialize_manager
1655 * manager.c (thread_segment): Return always NULL if FLOATING_STACKS.
1656 (pthread_allocate_stack): Allow kernel to choose stack address if
1657 FLOATING_STACKS. This also handles variable-sized stacks.
1658 Always allocate stack and guardpage together. Use mprotect to
1659 change guardpage access.
1660 * sysdeps/i386/useldt.h: Define FLOATING_STACKS and
1661 ARCH_STACK_MAX_SIZE.
1663 * attr.c (__pthread_attr_setstacksize): Also test value against
1666 * manager.c (__pthread_nonstandard_stacks): Define only if
1667 THREAD_SELF is not defined.
1668 (pthread_allocate_stack): Always initialize gardaddr to a correct
1670 (pthread_handle_create): Unmap thread with one call.
1671 (pthread_free): Remove test for initial thread before removing stack.
1672 Unmap stack with one call.
1674 * pthread.c (__pthread_initial_thread): Initialize p_userstack to
1675 1 to avoid removing the stack.
1677 2000-07-27 Jes Sorensen <jes@linuxcare.com>
1679 * sysdeps/ia64/pspinlock.c (__pthread_spin_lock): Add
1680 load of spin lock to prime the cache before the atomic compare and
1681 exchange operation (cmpxchg4). This avoids the spinning on the
1682 cmpxchg4 instruction and reduces movement of the cache line back
1683 and forth between the processors (explanation by Asis K. Mallick
1684 from Intel). This basically makes the implementation operate the
1685 same as the Linux kernel implementation.
1687 * shlib-versions: Use GLIBC_2_2 for Linux/ia64.
1688 * sysdeps/ia64/pspinlock.c: New file.
1690 2000-08-03 Ulrich Drepper <drepper@redhat.com>
1692 * pthread.c: Move definition of __pthread_set_own_extricate_if...
1693 * spinlock.h: ...here. Remove locking.
1694 * internals.h: Remove __pthread_set_own_extricate_if prototype.
1696 * rwlock.c: Use THREAD_GETMEM And THREAD_SETMEM.
1697 (rwlock_rd_extricate_func): Don't determine self, let
1698 __pthread_lock do it.
1699 (rwlock_wr_extricate_func): Likewise.
1700 (rwlock_have_already): Optimize *pself handling a bit.
1702 * mutex.c: Use __builtin_expect.
1703 * pthread.c: Likewise.
1705 2000-08-02 Andreas Jaeger <aj@suse.de>
1707 * sysdeps/s390/pspinlock.c: New file.
1708 * sysdeps/s390/pt-machine.h: New file.
1709 Patches by Martin Schwidefsky <schwidefsky@de.ibm.com>.
1711 2000-07-12 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
1713 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Implement for
1715 * sysdeps/mips/pt-machine.h (testandset): Likewise.
1717 2000-07-26 Andreas Jaeger <aj@suse.de>
1719 * pthread.c: Initialize p_sem_avail.
1721 2000-07-25 Ulrich Drepper <drepper@redhat.com>
1723 * internals.h (struct __pthread_descr_struct): Add p_sem_avail.
1724 * semaphore.c: Handle spurious wakeups.
1726 * sysdeps/pthread/pthread.h: Add back PTHREAD_MUTX_FAST_NP as an alias
1727 for PTHREAD_MUTEX_ADAPTIVE_NP for source code compatibility.
1729 * pthread.c (__pthread_set_own_extricate): Use THREAD_GETMEM.
1730 (__pthread_wait_for_restart): Likewise.
1732 * condvar.c (pthread_cond_wait): Also check whether thread is
1733 cancelable before aborting loop.
1734 (pthread_cond_timedwait): Likewise.
1736 * signals.c (pthread_sighandler): Remove special code to restrore
1738 (pthread_sighandler_t): Likewise.
1740 2000-07-25 Mark Kettenis <kettenis@gnu.org>
1742 * internals.h (__RES_PTHREAD_INTERNAL): Remove define.
1743 * pthread.c: Include <resolv.h>.
1744 (_res): Undefine. Add extern declaration.
1746 2000-07-24 Ulrich Drepper <drepper@redhat.com>
1748 * pthread.c (__pthread_initial_thread): Update initializer.
1749 (__pthread_manager_thread): Likewise.
1750 (pthread_initialize): Move setrlimit call to...
1751 (__pthread_initialize_manager): ...here.
1752 (__pthread_reset_main_thread): Reset also soft limit on stack size.
1754 * condvar.c: Handle spurious wakeups. [PR libc/1749].
1755 * internals.h (struct _pthread_descr_struct): Add p_condvar_avail.
1757 2000-07-21 Ulrich Drepper <drepper@redhat.com>
1759 * spinlock.h: If IMPLEMENT_TAS_WITH_CAS is defined use
1760 __compare_and_swap to define testandset.
1761 * sysdeps/powerpc/pt-machine.h: Add volatile to asms.
1762 Define IMPLEMENT_TAS_WITH_CAS.
1764 2000-07-20 Ulrich Drepper <drepper@redhat.com>
1766 * Makefile: Pass -z nodelete to linker for libpthread.so
1767 generation if it understand this option.
1769 2000-07-18 Mark Kettenis <kettenis@gnu.org>
1771 * manager.c (pthread_handle_create): Remove initialization of
1772 new_thread->p_res._sock.
1774 2000-07-19 Kaz Kylheku <kaz@ashi.footprints.net>
1776 Bugfixes to the variant of the code for machines with no compare
1779 * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Wait
1780 node was not being properly enqueued, due to failing to update
1781 the lock->__status field.
1783 * spinlock.c (__pthread_alt_timedlock): The oldstatus variable was
1784 being set inappropriately, causing the suspend function to be called
1785 with a null self pointer and crash.
1787 2000-07-18 Ulrich Drepper <drepper@redhat.com>
1789 * spinlock.h (__pthread_alt_trylock): Fix code used if no
1790 compare&swap is available.
1792 * spinlock.h (__pthread_trylock): Use __compare_and_swap, not
1795 * pthread.c (pthread_initialize): Don't use sysconf to determine
1796 whether the machine has more than one processor.
1798 * spinlock.c (__pthread_alt_timedlock): Add back one of the
1799 removed thread_self calls.
1801 2000-07-18 Kaz Kylheku <kaz@ashi.footprints.net>
1803 * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Changed
1804 __compare_and_swap to compare_and_swap in code which assumes
1805 compare swap is available.
1807 2000-07-18 Kaz Kylheku <kaz@ashi.footprints.net>
1809 * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Fixed
1810 bug whereby thr field of waitnode structure would not be correctly
1811 set unless a null self pointer is passed to the functions.
1812 Eliminated redundant calls to thread_self().
1814 2000-07-18 Jakub Jelinek <jakub@redhat.com>
1816 * pthread.c (__pthread_initialize_manager): Lock
1817 __pthread_manager_thread.p_lock before calling clone.
1819 2000-05-05 H.J. Lu <hjl@gnu.org>
1821 * sysdeps/ia64/pt-machine.h (__compare_and_swap): Change it to
1822 have acquire semantics.
1823 (__compare_and_swap_with_release_semantics): New inline
1825 (HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS): New macro.
1827 2000-01-28 Hans Boehm <hboehm@exch.hpl.hp.com>
1829 * manager.c: Fix the problem with signals at startup.
1830 Change the way that thread stacks are allocated on IA64.
1831 Clean up some of the guard page allocation stuff.
1833 1999-12-19 H.J. Lu <hjl@gnu.org>
1835 * internals.h (page_roundup): New.
1836 * attr.c (__pthread_attr_setguardsize); Use page_roundup
1838 * manager.c (pthread_allocate_stack): Make sure guardaddr is
1839 page aligned with page_roundup if NEED_SEPARATE_REGISTER_STACK
1842 1999-12-17 Hans Boehm <hboehm@exch.hpl.hp.com>
1844 * manager.c (pthread_allocate_stack): Unmap the stack top
1845 if failed to map the stack bottom.
1847 (pthread_free): Fix the guard page.
1849 * pthread.c (pthread_initialize): Set rlimit correctly for
1850 NEED_SEPARATE_REGISTER_STACK.
1852 1999-12-16 H.J. Lu <hjl@gnu.org>
1854 * pthread.c (__pthread_initialize_manager): Pass
1855 __pthread_manager_thread_bos instead of
1856 __pthread_manager_thread_tos to __clone2.
1858 1999-12-16 H.J. Lu <hjl@gnu.org>
1860 * manager.c (pthread_allocate_stack): Correct the calculation
1861 of "new_thread_bottom". Remove MAP_GROWSDOWN from mmap for
1864 1999-12-13 H.J. Lu <hjl@gnu.org>
1866 * sysdeps/ia64/pt-machine.h (__compare_and_swap): Added a stop
1867 bit after setting ar.ccv.
1869 1999-12-12 H.J. Lu <hjl@gnu.org>
1871 * manager.c (pthread_allocate_stack): Make the starting
1872 address of the stack bottom page aligned. FIXME: it may
1873 need changes in other places.
1874 (pthread_handle_create): Likewise.
1876 1999-12-11 Hans Boehm <hboehm@exch.hpl.hp.com>
1878 * manager.c (pthread_allocate_stack): Handle
1879 NEED_SEPARATE_REGISTER_STACK.
1880 (pthread_handle_create): Likewise.
1881 * pthread.c (__pthread_initialize_manager): Likewise.
1883 * sysdeps/ia64/pt-machine.h: Use r13 for thread pointer.
1885 1999-12-02 H.J. Lu <hjl@gnu.org>
1887 * sysdeps/ia64/pt-machine.h: New.
1889 2000-07-13 Ulrich Drepper <drepper@redhat.com>
1891 * wrapsyscall.c: Mark non-__ protected names as weak.
1894 2000-07-12 Bruno Haible <haible@clisp.cons.org>
1896 * Examples/ex8.c: Include <sys/wait.h>, not <wait.h>.
1898 2000-07-12 Ulrich Drepper <drepper@redhat.com>
1900 * spinlock.c: Fix code for TEST_FOR_COMPARE_AND_SWAP being defined.
1901 Add tests also to new alternative spinlock implementation.
1902 * spinlock.h: Likewise.
1903 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1905 2000-07-06 Ulrich Drepper <drepper@redhat.com>
1907 * Version: Export __sigaction.
1908 * signals.c: Define __sigaction alias. Use __libc_sigaction instead
1910 * pthread.c: Use __libc_sigaction instead of __sigaction.
1912 * condvar.c: Implement pthread_condattr_getpshared and
1913 pthread_condattr_setpshared.
1914 * mutex.c: Implement pthread_mutexattr_getpshared and
1915 pthread_mutexattr_setpshared.
1916 * Versions: Export new functions.
1917 * sysdeps/pthread/pthread.h: Add prototypes for new functions.
1919 * rwlock.c (pthread_rwlockattr_init): Use PTHREAD_PROCESS_PRIVATE.
1920 (pthread_rwlockattr_setpshared): Fail if PTHREAD_PROCESS_PRIVATE
1923 2000-07-04 Greg McGary <greg@mcgary.org>
1925 * sysdeps/pthread/bits/libc-lock.h: Remove BP_SYM from
1926 pragmas. Include bp-sym.h only if _LIBC.
1928 2000-07-04 Ulrich Drepper <drepper@redhat.com>
1930 * spinlock.c (__pthread_unlock): Properly place write barrier.
1931 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1933 2000-07-03 Ulrich Drepper <drepper@redhat.com>
1935 * spinlock.c: Replace fast spinlocks by adaptive spinlocks which are
1936 faster on SMP systems. No more emulation of compare&swap for adaptive
1938 * spinlock.h: Likewise.
1939 * sysdeps/pthread/pthread.h: Shuffle PTHREAD_MUTEX_* values around.
1940 Replace fast with adaptive mutex.
1941 * mutex.c: Rewrite for replacement of fast by adaptive mutex.
1942 * condvar.c: Likewise.
1943 * pthread.c: Define and initialize __pthread_smp_kernel variable.
1944 * internals.h: Declare __pthread_smp_kernel.
1945 * sysdeps/pthread/bits/pthreadtypes.h: Update comment of
1946 _pthread_fastlock structure.
1947 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1949 * pthread.c: Remove initialization to zero from global variables.
1951 2000-06-29 Jakub Jelinek <jakub@redhat.com>
1953 * shlib-versions: Make sparc64 GLIBC_2.2+ only.
1955 2000-06-28 Greg McGary <greg@mcgary.org>
1957 * weaks.c: Wrap BP_SYM () around weak extern declarations of
1958 pthread functions that have pointers in their return+arg signatures.
1960 2000-06-27 Greg McGary <greg@mcgary.org>
1962 * sysdeps/pthread/bits/libc-lock.h: Wrap BP_SYM () around weak
1963 extern declarations of pthread functions that have pointers in
1964 their return+arg signatures.
1966 2000-06-26 Ulrich Drepper <drepper@redhat.com>
1968 * Makefile (tests): Add ex11. Add rules to build it.
1969 * Examples/ex11.c: New file.
1970 * rwlock.c: Fix complete braindamaged previous try to implement
1973 * spinlock.c: Pretty print.
1975 2000-06-25 Ulrich Drepper <drepper@redhat.com>
1977 * Makefile (tests): Add ex10. Add rules to build it.
1978 * Versions [GLIBC_2.2] (libpthread): Add pthread_mutex_timedlock,
1979 pthread_rwlock_timedrdlock, and pthread_rwlock_timedwrlock.
1980 * condvar.c (pthread_cond_wait): Allow mutex of kind
1981 PTHREAD_MUTEX_TIMED_NP.
1982 (pthread_cond_timedwait_relative): Likewise.
1983 * mutex.c (__pthread_mutex_init): Default is PTHREAD_MUTEX_TIMED_NP.
1984 (__pthread_mutex_trylock): Use __pthread_alt_trylock for
1985 PTHREAD_MUTEX_ERRORCHECK_NP. Handle PTHREAD_MUTEX_TIMED_NP.
1986 (__pthread_mutex_lock): Use __pthread_alt_lock for
1987 PTHREAD_MUTEX_ERRORCHECK_NP. Handle PTHREAD_MUTEX_TIMED_NP.
1988 (__pthread_mutex_timedlock): New function.
1989 (__pthread_mutex_unlock): Use __pthread_alt_unlock for
1990 PTHREAD_MUTEX_ERRORCHECK_NP. Handle PTHREAD_MUTEX_TIMED_NP.
1991 (__pthread_mutexattr_init): Use PTHREAD_MUTEX_TIMED_NP.
1992 (__pthread_mutexattr_settype): Allow PTHREAD_MUTEX_TIMED_NP.
1993 * spinlock.c: Implement alternate fastlocks.
1994 * spinlock.h: Add prototypes.
1995 * Examples/ex10.c: New file.
1996 * sysdeps/pthread/pthread.h: Add prototypes for new functions.
1997 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1999 * rwlock.c (__pthread_rwlock_rdlock): Optimize loop a bit.
2000 (__pthread_rwlock_timedrdlock): New function.
2001 (__pthread_rwlock_timedwrlock): New function.
2002 Use laternate fastlock function everywhere.
2004 2000-06-21 Andreas Jaeger <aj@suse.de>
2006 * sysdeps/pthread/timer_routines.c: Include <string.h> for memset
2009 * join.c: Include <stdlib.h> for exit prototype.
2011 2000-06-20 Ulrich Drepper <drepper@redhat.com>
2013 * sysdeps/i386/useldt.h: Include <stdlib.h>.
2015 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_BARRIERS.
2016 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
2018 * Makefile (libpthread-routines): Add barrier.
2019 (tests): Add ex9. Add rule to build ex9.
2020 * Versions: Export barrier functions.
2021 * barrier.c: New file.
2022 * Examples/ex9.c: New file.
2023 * sysdeps/pthread/pthread.h: Add barrier data types and declarations.
2024 * sysdeps/pthread/bits/pthreadtypes.h: Likewise.
2025 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2027 2000-06-19 H.J. Lu <hjl@gnu.org>
2029 * spinlock.h (HAS_COMPARE_AND_SWAP): Defined if
2030 HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS is defined.
2031 (compare_and_swap_with_release_semantics): New. Default to
2032 compare_and_swap if HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS
2035 * spinlock.c (__pthread_unlock): Call
2036 compare_and_swap_with_release_semantics () instead of
2037 compare_and_swap ().
2039 2000-06-19 Ulrich Drepper <drepper@redhat.com>
2041 * sysdeps/pthread/timer_create.c: Use _set_errno instead of assigning
2043 * sysdeps/pthread/timer_delete.c: Likewise.
2044 * sysdeps/pthread/timer_getoverr.c: Likewise.
2045 * sysdeps/pthread/timer_gettime.c: Likewise.
2046 * sysdeps/pthread/timer_settime.c: Likewise.
2048 2000-06-13 Kaz Kylheku <kaz@ashi.footprints.net>
2050 Timer nodes are now reference counted, and can be marked
2051 as deleted. This allows for the safe release of the global mutex
2052 in the middle without losing the timer being operated on.
2054 * sysdeps/pthread/posix-timer.h (struct timer_node): The inuse
2055 member is now an enum with three values, so that an intermediate
2056 state can be represented (deleted but not free for reuse yet).
2057 New refcount member added.
2058 * sysdeps/pthread/timer_routines.c: Likewise.
2060 * sysdeps/pthread/posix-timer.h (timer_addref, timer_delref,
2061 timer_valid): New inline functions added.
2063 * sysdeps/pthread/timer_gettime.c (timer_gettime): Function
2064 restructured, recursive deadlock bug fixed.
2066 * sysdeps/pthread/timer_gettime.c (timer_gettime): Uses new
2067 timer_addref to ensure that timer won't be deleted while mutex is not
2068 held. Also uses timer_invalid to perform validation of timer handle.
2069 * sysdeps/pthread/timer_settime.c (timer_settime): Likewise.
2070 * sysdeps/pthread/timer_getoverr.c (timer_getoverrun): Likewise.
2072 2000-06-14 Ulrich Drepper <drepper@redhat.com>
2074 * shlib-versions: Add entry for SH.
2075 Patch by Kaz Kojima <kkojima@rr.iij4u.or.jp>.
2077 2000-06-13 Kaz Kylheku <kaz@ashi.footprints.net>
2079 A few optimizations. Got rid of unnecessary wakeups of timer threads,
2080 tightened up some critical regions and micro-optimized some list
2083 * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
2084 Returns int value now to indicate whether timer was queued at head.
2085 * sysdeps/pthread/posix-timer.h: Likewise.
2086 * sysdeps/pthread/timer_settime.c (timer_settime): Takes advantage of
2087 new return value from __timer_thread_queue_timer to avoid waking
2088 up timer thread unnecessarily.
2090 * sysdeps/pthread/posix-timer.h (timer_id2ptr): No longer checks
2091 inuse flag, because this requires mutex to be held. Callers updated
2092 to do the check when they have the mutex.
2093 * sysdeps/pthread/timer_getoverr.c: Add check for inuse here.
2095 * sysdeps/pthread/timer_settime.c (timer_settime): Tighter critical
2096 regions: avoids making system calls while holding timer mutex, and
2097 a few computations were moved outside of the mutex as well.
2098 * sysdeps/pthread/timer_gettime.c (timer_gettime): Likewise.
2100 * sysdeps/pthread/posix-timer.h (list_unlink_ip): Function name changed
2101 to list_unlink_ip, meaning idempotent. Pointer manipulation
2102 changed to get better better code out of gcc.
2103 * sysdeps/pthread/timer_routines.c (list_unlink): Non-idempotent
2104 version of list_unlink added here.
2105 * sysdeps/pthread/timer_delete.c: Use appropriate list unlink
2106 function in all places: idempotent one for timers, non-idempotent
2107 one for thread nodes.
2108 * sysdeps/pthread/timer_settime: Likewise.
2109 * sysdeps/pthread/timer_routines.c: Likewise.
2111 2000-06-13 Ulrich Drepper <drepper@redhat.com>
2113 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_TIMERS): Define.
2114 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
2116 * sysdeps/pthread/Makefile: Remove tests definition.
2118 2000-06-12 Kazumoto Kojima <kkojima@rr.iij4u.or.jp>
2119 Yutaka Niibe <gniibe@chroot.org>
2121 * sysdeps/sh/pspinlock.c: New file.
2122 * sysdeps/sh/pt-machine.h: New file.
2124 2000-06-12 Ulrich Drepper <drepper@redhat.com>
2126 * Makefile (tests): Add joinrace.
2128 * Examples/ex6.c: Test return value of pthread_join.
2130 2000-06-11 Geoff Keating <geoffk@cygnus.com>
2132 * sysdeps/powerpc/pspinlock.c (__pthread_spin_lock): Implement.
2133 (__pthread_spin_trylock): Implement.
2134 (__pthread_spin_unlock): Implement.
2135 (__pthread_spin_init): Implement.
2136 (__pthread_spin_destroy): Implement.
2138 2000-06-10 Ulrich Drepper <drepper@redhat.com>
2140 * sysdeps/pthread/timer_routines.c (list_append): Little fix to
2141 really append the entry.
2143 2000-06-10 Andreas Jaeger <aj@suse.de>
2145 * lockfile.c (__fresetlockfiles): Remove unused variable fp.
2147 2000-06-10 Kaz Kylheku <kaz@ashi.footprints.net>
2149 * sysdeps/pthread/timer_create.c: Thread matching now done on
2150 clock type as well as thread attributes.
2151 There are individual global signal-delivering threads for
2152 different clock types.
2153 * sysdeps/pthread/posix-timer.h: Likewise.
2154 * sysdeps/pthread/timer_routines.c: Likewise.
2156 * sysdeps/pthread/timer_routines.c: Thread allocation and
2157 deallocation function now remembers to put thread on active
2158 list and remove from active list.
2159 Thus now the feature of binding multiple timers
2160 to a single thread actually works.
2162 2000-06-10 Ulrich Drepper <drepper@redhat.com>
2164 * pthread.c (__pthread_create_2_1): Optimize a bit.
2166 * internals.h (invalid_handle): Also test for p_terminated != 0.
2167 (nonexisting_handle): New function. Same as old invalid_handle.
2168 * join.c (pthread_join): Use nonexisting_handle instead of
2169 invalid_handle to test for acceptable thread handle.
2170 * manager.c (pthread_handle_free): Likewise.
2171 * joinrace.c: New file.
2172 Reported by Permaine Cheung <pcheung@cygnus.com>.
2174 2000-06-08 Ulrich Drepper <drepper@redhat.com>
2176 * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
2177 Correct handling of matching variable.
2179 * sysdeps/pthread/tst-timer.c (main): Rewrite initializers to
2182 * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
2183 Be prepared for empty timer list.
2185 * sysdeps/pthread/timer_create.c (timer_create): Correct names of
2186 CPUTIME clock ID. Add support for thread clocks.
2188 * sysdeps/pthread/posix-timer.h (timer_ptr2id): Operands in
2189 subtraction were switched.
2191 * sysdeps/pthread/timer_routines.c (init_module): Use
2192 THREAD_MAXNODES threads.
2194 * sysdeps/pthread/posix-timer.h (struct timer_node): Add creator_pid.
2195 * sysdeps/pthread/timer_create.c: Fill in creator_pid.
2196 * sysdeps/pthread/timer_routines.c (thread_expire_timer): Send signal
2197 with sigqueueinfo is this system call is available.
2199 * sysdeps/pthread/timer_create.c (timer_create): Allow
2200 CLOCK_CPUTIME if _POSIX_CPUTIME is defined.
2202 * sysdeps/pthread/Makefile: New file. Add rules to build timer
2204 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add TIMER_MAX.
2206 2000-06-04 Kaz Kylheku <kaz@ashi.footprints.net>
2208 * sysdeps/pthread/posix-timer.h: New file.
2209 * sysdeps/pthread/timer_create.c: New file.
2210 * sysdeps/pthread/timer_delete.c: New file.
2211 * sysdeps/pthread/timer_getoverr.c: New file.
2212 * sysdeps/pthread/timer_gettime.c: New file.
2213 * sysdeps/pthread/timer_routines.c: New file.
2214 * sysdeps/pthread/timer_settime.c: New file.
2215 * sysdeps/pthread/tst-timer.c: New file.
2217 2000-06-08 Ulrich Drepper <drepper@redhat.com>
2219 * sysdeps/unix/sysv/linux/bits/local_lim.h: Remove OPEN_MAX and
2220 LINK_MAX definitions if necessary.
2222 2000-06-04 Kaz Kylheku <kaz@ashi.footprints.net>
2224 Added missing fork time handling of global libio lock.
2226 * lockfile.c (__fresetlockfiles): Now also resets the list lock,
2227 not just the individual stream locks. Rewritten to use new
2228 iterator interface provided by libio rather than accessing
2231 * lockfile.c (__flockfilelist, _funlockfilelist): New functions
2232 which lock and unlock the stream list using the new interface
2234 * internals.h: Likewise.
2236 * ptfork.c (__fork): Now calls __flockfilelist before fork,
2237 and __funlockfilelist in the parent after the fork.
2238 Child still calls __fresetlockfiles as before.
2240 * linuxthreads.texi: Now explains what happens to streams at
2241 fork time. Also whole new section on forking and thread added.
2242 Definition of pthread_atfork moved out of Miscellaneous Functions
2243 to this new section.
2245 2000-06-04 Jakub Jelinek <jakub@redhat.com>
2247 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c (__pthread_spin_lock):
2248 Add missing register.
2249 * sysdeps/sparc/sparc64/pspinlock.c (__pthread_spin_lock): Likewise.
2251 2000-06-02 Jakub Jelinek <jakub@redhat.com>
2253 * sysdeps/sparc/sparc32/pspinlock.c: Implement spinlocks.
2254 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: New.
2255 * sysdeps/sparc/sparc64/pspinlock.c: Implement spinlocks.
2257 2000-05-31 Andreas Jaeger <aj@suse.de>
2259 * sysdeps/mips/pspinlock.c: Implement spinlocks.
2261 2000-05-28 Ulrich Drepper <drepper@redhat.com>
2263 * spinlock.c (__pthread_lock): Remove ASSERT.
2265 * Makefile (tests): Add ex8.
2266 * Examples/ex8.c: New file.
2268 2000-05-12 Kaz Kylheku <kaz@ashi.footprints.net>
2270 Bugfix: The pthread_atfork mechanism now takes care of its
2271 own internal mutex at fork time.
2273 * ptfork.c (__fork): Revised so that the mutex is held across
2274 the fork operation and while the handlers are called, and so that
2275 the child resets the mutex.
2277 * linuxthreads.texi: Updated pthread_atfork documentation to make
2278 it clear that fork and pthread_atfork can't be reentered from
2279 atfork handlers, that pthread_atfork and fork are mutually atomic,
2280 and that the handlers are inherited by the child process.
2282 2000-05-24 Ulrich Drepper <drepper@redhat.com>
2284 * Makefile (libpthread-routines): Add pspinlock.
2285 * cancel.c: Rename __pthread_spin_unlock back to __pthread_unlock.
2286 Use struct _pthread_fastlock instead of pthread_spinlock_t.
2287 * condvar.c: Likewise.
2288 * internals.h: Likewise.
2290 * manager.c: Likewise.
2291 * mutex.c: Likewise.
2292 * pthread.c: Likewise.
2293 * rwlock.c: Likewise.
2294 * semaphore.c: Likewise.
2295 * signals.c: Likewise.
2296 * spinlock.h: Likewise.
2297 * spinlock.c: Likewise. Remove pthread_spin_lock functions.
2298 * sysdeps/alpha/pspinlock.c: New file.
2299 * sysdeps/arm/pspinlock.c: New file.
2300 * sysdeps/i386/pspinlock.c: New file.
2301 * sysdeps/m68k/pspinlock.c: New file.
2302 * sysdeps/mips/pspinlock.c: New file.
2303 * sysdeps/powerpc/pspinlock.c: New file.
2304 * sysdeps/sparc/sparc32/pspinlock.c: New file.
2305 * sysdeps/sparc/sparc64/pspinlock.c: New file.
2306 * sysdeps/pthread/bits/pthreadtypes.h: Remove pthread_spinlock_t
2307 back to _pthread_fastlock. Define new pthread_spinlock_t.
2309 2000-05-24 Andreas Jaeger <aj@suse.de>
2311 * sysdeps/i386/i686/pt-machine.h: Only use LDT on newer kernels.
2313 2000-05-21 Jakub Jelinek <jakub@redhat.com>
2315 * manager.c (pthread_handle_create): Initialize p_res._sock to -1.
2317 2000-05-13 Jakub Jelinek <jakub@redhat.com>
2319 * internals.h (__RES_PTHREAD_INTERNAL): Define.
2321 2000-05-06 Kaz Kylheku <kaz@ashi.footprints.net>
2323 * mutex.c (pthread_once): IN_PROGRESS state of pthread_once_t
2324 object state is represented with additional bits which distinguish
2325 whether that state was set up in the current process, or
2326 in an ancestor process. If that state was set in an ancestor,
2327 it means that a fork happened while thread was executing the init
2328 function. In that case, the state is reset to NEVER.
2329 * mutex.c (__pthread_once_fork_prepare): New function.
2330 (__pthread_once_fork_child): Likewise
2331 (__pthread_once_fork_parent): Likewise
2332 (__pthread_reset_pthread_once): Removed.
2333 * ptfork.c (__fork): Call new handlers in mutex.c.
2334 * internals.h: Declarations of new mutex.c functions added.
2335 Declaration of removed function deleted.
2336 * linuxthreads.texi: Updated documentation about pthread_once
2337 to clarify what happens under cancellation and forking.
2339 2000-05-06 Kaz Kylheku <kaz@ashi.footprints.net>
2341 * internals.h: New thread manager request type, REQ_KICK.
2342 * join.c (pthread_exit): main thread now calls exit() instead
2343 of _exit() in order to proper process cleanup.
2344 * manager.c (__pthread_manager): Do not terminate manager
2345 after unblocking main thread; wait for main thread's
2346 REQ_PROCESS_EXIT request instead.
2347 Also, added REQ_KICK case to handle new request; this just does
2349 * manager.c (pthread_exited): Do not terminate manager after
2350 unblocking main thread.
2351 * manager.c (__pthread_manager_sighandler): If the main thread
2352 is waiting for all other threads to die, send a REQ_KICK into
2353 the thread manager request pipe to get it to clean out the threads
2354 and unblock the main thread as soon as possible. This fixes
2355 the 2000 millisecond hang on shutdown bug.
2356 * Examples/ex7.c: New file, tests shutdown behavior when all threads
2357 including the main one call pthread_exit(), or implicitly do so.
2358 * Makefile (tests): Add ex7.
2360 2000-05-05 Andreas Jaeger <aj@suse.de>
2362 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
2363 (pthread_getcpuclockid): Correct test for ourselves.
2365 2000-05-05 Ulrich Drepper <drepper@redhat.com>
2367 * internals.h (struct _pthread_descr_struct): Reorganization.
2368 Allocate room for 16 pointers at head of the structure for future
2369 thread-local data handling. Move p_self member in this area.
2370 * manager.c (pthread_handle_create): Adjust use of p_self.
2371 * sysdeps/i386/useldt.h (THREAD_SELF): Likewise.
2372 * pthread.c (__pthread_initial_thread): Adjust initialization.
2373 (__pthread_manager_thread): Likewise.
2375 2000-04-29 Bruno Haible <haible@clisp.cons.org>
2377 * join.c (pthread_exit): Use THREAD_GETMEM_NC instead of THREAD_GETMEM
2378 for eventmask larger than 1 word.
2380 2000-04-27 Ulrich Drepper <drepper@redhat.com>
2382 * Versions [libpthread] (GLIBC_2.2): Add __pthread_initialize_minimal.
2383 * pthread.c (__pthread_initialize_minimal): New function. Perform
2384 minimal initialization.
2385 (pthread_initialize): Remove this code here.
2386 * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h" again. We
2387 are working around the problem in glibc.
2389 2000-04-25 Ulrich Drepper <drepper@redhat.com>
2391 * sysdeps/i386/i686/pt-machine.h: Do not use "../useldt.h" for
2392 now. First gcc must be fixed (more concrete: libgcc).
2394 2000-04-24 Ulrich Drepper <drepper@redhat.com>
2396 * pthread.c: Remove special treatement for interrupt handlers on x86.
2397 * manager.c (pthread_free): Use FREE_THREAD not FREE_THREAD_SELF.
2398 * sysdeps/i386/useldt.h: Use "q" constraint instead of "r" where
2400 * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h".
2402 2000-04-24 Mark Kettenis <kettenis@gnu.org>
2404 * join.c (pthread_exit): Set p_terminated after reporting the
2405 termination event instead of before.
2407 2000-04-20 Jakub Jelinek <jakub@redhat.com>
2409 * sysdeps/pthread/bits/libc-lock.h: Only declare __pthread_rwlock_*
2412 2000-04-18 Andreas Jaeger <aj@suse.de>
2414 * Versions: Use ld instead of ld.so.
2416 2000-04-18 Jakub Jelinek <jakub@redhat.com>
2418 * sysdeps/unix/sysv/linux/sparc/bits/sigcontext.h (struct sigcontext):
2419 Remove the typedef keyword.
2421 2000-04-18 Jakub Jelinek <jakub@redhat.com>
2423 * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Use membar,
2425 (READ_MEMORY_BARRIER): Define.
2426 * spinlock.c (__pthread_spin_unlock): Use READ_MEMORY_BARRIER, not
2428 * internals.h (READ_MEMORY_BARRIER): Define if not defined in sysdep
2431 2000-04-17 Ulrich Drepper <drepper@redhat.com>
2433 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
2434 (pthread_getcpuclockid): Don't compare thread_id with thread_self,
2435 use thread_handle().
2437 2000-04-16 Ulrich Drepper <drepper@redhat.com>
2439 * condvar.c (pthread_cond_timedwait_relative): Don't test for owner
2440 if fast mutex is used. Don't initialize `already_canceled' twice.
2441 Correctly test for return value of timedsuspend.
2443 * pthread.c: Correct long-time braino. We never set SA_SIGINFO and
2444 therefore don't need the _rt versions of the signal handlers.
2446 2000-04-15 Ulrich Drepper <drepper@redhat.com>
2448 * pthread.c (pthread_yield): New function.
2449 * sysdeps/pthread/pthread.h (pthread_yield): Add prototype.
2450 * Versions [libpthread] (GLIBC_2.2): Add pthread_yield.
2451 * internals.h: Declare __pthread_yield.
2453 * pthread.c (pthread_initialize): Avoid a bit more code if
2454 realtime signals are known to exist.
2456 * pthread.c: Is __ASSUME_REALTIME_SIGNALS then avoid generating code
2457 to dynamically detect RT signals and avoid generating compatibility
2458 functions with old kernel.
2459 * restart.h (restart) [__ASSUME_REALTIME_SIGNALS]: Use
2460 __pthread_restart_new directly.
2461 (suspend) [__ASSUME_REALTIME_SIGNALS]: Use
2462 __pthread_wait_for_restart_signal directly.
2463 (timedsuspend) [__ASSUME_REALTIME_SIGNALS]: Use
2464 __pthread_timedsuspend_new directly.
2466 2000-04-15 Ulrich Drepper <drepper@redhat.com>
2468 * condvar.c: Remove all the special code to handle cond_timedwait.
2469 Use timedsuspend instead.
2470 * internals.h: Declare __pthread_timedsuspend_old,
2471 __pthread_timedsuspend_new, and __pthread_timedsuspend.
2472 Remove declaration of __pthread_init_condvar.
2473 * pthread.c: Define __pthread_timedsuspend variable.
2474 (__pthread_timedsuspend_old): New function. Timed suspension
2475 implementation for old Linux kernels.
2476 (__pthread_timedsuspend_new): New function. Timed suspension
2477 implementation for new Linux kernels.
2478 * restart.h (timedsuspend): New function. Call appropriate
2479 suspension function through __pthread_timedsuspend.
2480 * semaphore.c (sem_timedwait): Use timedsuspend, don't duplicate
2482 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2484 * internals.h (WRITE_MEMORY_BARRIER): Define as MEMORY_BARRIER if
2486 * spinlock.c: Use WRITE_MEMORY_BARRIER instead of MEMORY_BARRIER
2488 * sysdeps/alpha/pt-machine.h: Define WRITE_MEMORY_BARRIER.
2489 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
2491 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _POSIX_SPAWN.
2492 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
2494 2000-04-14 Andreas Jaeger <aj@suse.de>
2496 * weaks.c: Fix typo.
2498 * shlib-versions (mips.*-.*-linux.*): Support only GLIBC 2.0 and
2499 2.2 for linuxthreads.
2501 2000-04-13 Ulrich Drepper <drepper@redhat.com>
2503 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
2504 (pthread_getcpuclockid): Fix typo.
2506 2000-04-12 Ulrich Drepper <drepper@redhat.com>
2508 * Makefile (libpthread-routines): Add getcpuclockid.
2509 * Versions [libpthread] (GLIBC_2.2): Add pthread_getcpuclockid.
2510 * sysdeps/pthread/getcpuclockid.c: New file.
2511 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c: New file.
2512 * sysdeps/pthread/pthread.h: Add prototype for pthread_getcpuclockid.
2514 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_SPIN_LOCKS):
2516 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
2518 * sysdeps/pthread/pthread.h: Add prototypes for pthread_spin_init,
2519 pthread_spin_destroy, pthread_spin_lock, pthread_spin_trylock,
2520 and pthread_spin_unlock.
2521 * sysdeps/pthread/bits/pthreadtypes.h: Change struct _pthread_fastlock
2522 into pthread_spinlock_t. Change all uses.
2523 * spinlock.c: Implement pthread_spin_lock.
2524 Rename __pthread_unlock to __pthread_spin_unlock and define weak
2525 alias for real name.
2526 Define pthread_spin_trylock, pthread_spin_init, and
2527 pthread_spin_destroy.
2528 Change all uses of _pthread_fastlock to pthread_spinlock_t.
2529 * spinlock.h: Rename __pthread_unlock to __pthread_spin_unlock.
2530 Change all uses of _pthread_fastlock to pthread_spinlock_t.
2531 * Versions [libpthread] (GLIBC_2.2): Add pthread_spin_init,
2532 pthread_spin_destroy, pthread_spin_lock, pthread_spin_trylock,
2533 and pthread_spin_unlock.
2534 * cancel.c: Use __pthread_spin_unlock instead of __pthread_unlock.
2535 Change all uses of _pthread_fastlock to pthread_spinlock_t.
2536 * condvar.c: Likewise.
2537 * internals.h: Likewise.
2539 * manager.c: Likewise.
2540 * mutex.c: Likewise.
2541 * pthread.c: Likewise.
2542 * rwlock.c: Likewise.
2543 * semaphore.c: Likewise.
2544 * signals.c: Likewise.
2546 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add various new POSIX
2548 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
2550 2000-04-11 Ulrich Drepper <drepper@redhat.com>
2552 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add
2553 _POSIX_SHARED_MEMORY_OBJECTS.
2555 2000-04-11 Andreas Jaeger <aj@suse.de>
2557 * sysdeps/mips/pt-machine.h (MEMORY_BARRIER): Define.
2558 (__compare_and_swap): Mark as modifying memory.
2560 2000-04-11 Geoff Keating <geoffk@cygnus.com>
2562 * sysdeps/powerpc/pt-machine.h (MEMORY_BARRIER): Don't be
2564 (__compare_and_swap): Replace other 'sync' with MEMORY_BARRIER.
2565 Don't have the 'asm' __volatile__.
2567 2000-04-11 Ulrich Drepper <drepper@redhat.com>
2569 * internals.h: Define MEMORY_BARRIER as empty if not defined already.
2570 * spinlock.c (__pthread_lock): Add memory barriers.
2571 (__pthread_unlock): Likewise.
2572 * sysdeps/alpha/pt-machine.h (MEMORY_BARRIER): Define using mb
2574 (RELEASE): Not needed anymore.
2575 (__compare_and_swap): Mark asm as modifying memory.
2576 * sysdeps/powerpc/pt-machine.h (sync): Remove. Replace with definition
2578 (__compare_and_swap): Use MEMORY_BARRIER instead of sync.
2579 * sysdeps/sparc/sparc32/pt-machine.h (RELEASE): Not needed anymore.
2580 (MEMORY_BARRIER): Define using stbar.
2581 * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Define using
2583 (__compare_and_swap): Use MEMORY_BARRIER to ensure ordering.
2584 Patch by Xavier Leroy <Xavier.Leroy@inria.fr> based on comments by
2585 Mike Burrows <m3b@pa.dec.com>.
2587 2000-04-09 Ulrich Drepper <drepper@redhat.com>
2589 * signals.c (sigaction): Fix return value for the case SIG is one
2590 of the signals the implementation uses.
2591 Patch by Xavier.Leroy@inria.fr.
2593 2000-04-01 Andreas Jaeger <aj@suse.de>
2595 * attr.c: Use shlib-compat macros.
2596 * oldsemaphore.c: Likewise.
2597 * pthread.c: Likewise.
2598 * weaks.c: Likewise.
2600 2000-03-26 Ulrich Drepper <drepper@redhat.com>
2602 * semaphore.c (sem_timedwait): New function.
2603 Patch by Carl Mailloux <carlm@oricom.ca>.
2604 * semaphore.h: Declare sem_timedwait.
2605 * Versions [libpthread] (GLIBC_2.2): Add sem_timedwait.
2607 2000-03-26 Roland McGrath <roland@baalperazim.frob.com>
2609 * sysdeps/pthread/Makefile: File removed.
2611 2000-03-23 Ulrich Drepper <drepper@redhat.com>
2613 * mutex.c (__pthread_reset_pthread_once): Reset once_masterlock.
2614 * internals.h (__pthread_reset_pthread_once): Add prototype.
2615 * ptfork.c (__fork): Call __pthread_reset_pthread_once.
2617 * manager.c (pthread_handle_create): Store ID of new thread before
2620 2000-03-21 Ulrich Drepper <drepper@redhat.com>
2622 * attr.c: Use new macros from shlib-compat.h to define versions.
2623 * oldsemaphore.c: Likewise.
2624 * semaphore.c: Likewise.
2625 * weaks.c: Likewise.
2627 * pthread.c: Update for new SHLIB_COMPAT definition.
2629 * manager.c (__pthread_manager): Unmask debug signal.
2631 * pthread.c (pthread_initialize): Test for address of __dso_handle
2632 being NULL, not value. Use __on_exit, not on_exit.
2633 Patch by Andreas Jaeger <aj@suse.de>.
2635 * pthread.c: Use new macros from shlib-compat.h to define versions.
2637 2000-03-19 Ulrich Drepper <drepper@redhat.com>
2639 * pthread.c (pthread_initialize): Instead of on_exit use
2640 __cxa_atexit if __dso_label is available to allow unloading the
2641 libpthread shared library.
2643 2000-03-16 Ulrich Drepper <drepper@redhat.com>
2645 * condvar.c: Make tests for ownership of mutex less strict.
2647 2000-03-14 Ulrich Drepper <drepper@redhat.com>
2649 * condvar.c (pthread_cond_wait): Check whether mutex is owned by
2650 current thread and return error if not.
2651 (pthread_cond_timedwait_relative_old): Likewise.
2652 (pthread_cond_timedwait_relative_new): Likewise.
2654 * mutex.c (__pthread_once): Handle cancelled init function correctly.
2655 (pthread_once_cancelhandler): New function.
2656 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2658 2000-03-14 Andreas Jaeger <aj@suse.de>
2660 * pthread.c (pthread_handle_sigcancel_rt): GS has been renamed to
2662 (pthread_handle_sigrestart_rt): Likewise.
2663 * signals.c (pthread_sighandler_rt): Likewise.
2665 2000-03-02 Andreas Jaeger <aj@suse.de>
2667 * sysdeps/pthread/bits/libc-lock.h: Fix typo.
2668 Reported by Sean Chen <sean.chen@turbolinux.com>.
2670 2000-02-28 Andreas Jaeger <aj@suse.de>
2672 * rwlock.c: Fix typo.
2674 2000-02-27 Ulrich Drepper <drepper@redhat.com>
2676 * rwlock.c: Define __* variants of the functions and make old names
2678 * Versions [GLIBC_2.2]: Export the __pthread_rwlock_* functions.
2679 * sysdeps/pthread/bits/libc-lock.h: Define __libc_rwlock_* macros.
2681 2000-02-25 Andreas Jaeger <aj@suse.de>
2683 * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
2684 pwrite64, lseek64, open64, and __open64 with version 2.2.
2686 2000-02-22 Ulrich Drepper <drepper@redhat.com>
2688 * semaphore.h (SEM_FAILED): Use 0 not NULL.
2690 2000-02-14 Ulrich Drepper <drepper@redhat.com>
2692 * condvar.c (pthread_cond_timedwait_relative_old): Tight loop with
2693 nanosleep does not work either. Get absolute time inside the
2695 (pthread_cond_timedwait_relative_new): Likewise.
2696 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2698 2000-02-13 Andreas Jaeger <aj@suse.de>
2700 * condvar.c (pthread_cond_timedwait_relative_new): Fix last patch.
2701 (pthread_cond_timedwait_relative_old): Likewise.
2703 2000-02-13 Ulrich Drepper <drepper@redhat.com>
2705 * condvar.c (pthread_cond_timedwait_relative_old): Undo last patch
2706 but keep the code around. A bug in the kernel prevent us from
2708 (pthread_cond_timedwait_relative_new): Likewise.
2709 (PR libc/1597 and libc/1598).
2711 2000-02-01 Kaz Kylheku <kaz@ashi.footprints.net>
2713 * condvar.c (pthread_cond_timedwait_relative_old): Do tight
2714 loop around nanosleep calls instead of around most of the function
2715 (pthread_cond_timedwait_relative_new): Likewise.
2716 body. Got rid of backwards goto and one local.
2718 2000-01-31 Ulrich Drepper <drepper@redhat.com>
2720 * condvar.c (pthread_cond_timedwait_relative_old): Recompute time
2721 before every nanosleep call to account for time spent in the rest
2723 (pthread_cond_timedwait_relative_new): Likewise.
2724 Patch by khendricks@ivey.uwo.ca (PR libc/1564).
2726 2000-01-29 Ulrich Drepper <drepper@redhat.com>
2728 * condvar.c (pthread_cond_timedwait_relative_old): Get remaining time
2729 from nanosleep call so that in case we restart we only wait for the
2731 (pthread_cond_timedwait_relative_new): Likewise.
2732 Patch by khendricks@ivey.uwo.ca (PR libc/1561).
2734 2000-01-18 Ulrich Drepper <drepper@cygnus.com>
2736 * manager.c (pthread_allocate_stack): Compute guard page address
2737 correctly. Patch by HJ Lu.
2739 * sysdeps/pthread/pthread.h: Define
2740 PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP.
2742 2000-01-16 Ulrich Drepper <drepper@cygnus.com>
2744 * rwlock.c (pthread_rwlock_unlock): Correct one more problem with
2745 preference handling.
2746 (pthread_rwlockattr_setkind_np): Allow
2747 PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP.
2748 Patches by Kaz Kylheku <kaz@ashi.footprints.net>.
2750 2000-01-12 Ulrich Drepper <drepper@cygnus.com>
2752 * internals.h (pthread_readlock_info): New structure.
2753 (_pthread_descr_struct): Add p_readlock_list, p_readlock_free, and
2754 p_untracked_readlock_count.
2755 * pthread.c (__pthread_initial_thread, pthread_manager_thread):
2756 Add initializers for new fields.
2757 * manager.c (pthread_free): Free read/write lock lists.
2758 * queue.h (queue_is_empty): New function.
2759 * rwlock.c: Implement requirements about when readers should get
2761 * sysdeps/pthread/pthread.h
2762 (PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP): New definition.
2763 * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_rwlock_t):
2764 Define this name as well.
2765 Patches by Kaz Kylheku <kaz@ashi.footprints.net>.
2767 2000-01-05 Ulrich Drepper <drepper@cygnus.com>
2769 * pthread.c (__pthread_initial_thread, pthread_manager_thread):
2770 Adjust initializers for struct _pthread_descr_struct change.
2771 * internals.h (struct _pthread_descr_struct): Move new elements to
2774 2000-01-03 Kaz Kylheku <kaz@ashi.footprints.net>
2776 Redesigned how cancellation unblocks a thread from internal
2777 cancellation points (sem_wait, pthread_join,
2778 pthread_cond_{wait,timedwait}).
2779 Cancellation won't eat a signal in any of these functions
2780 (*required* by POSIX and Single Unix Spec!).
2781 * condvar.c: Spontaneous wakeup on pthread_cond_timedwait won't eat a
2782 simultaneous condition variable signal (not required by POSIX
2783 or Single Unix Spec, but nice).
2784 * spinlock.c: __pthread_lock queues back any received restarts
2785 that don't belong to it instead of assuming ownership of lock
2786 upon any restart; fastlock can no longer be acquired by two threads
2788 * restart.h: Restarts queue even on kernels that don't have
2789 queued real time signals (2.0, early 2.1), thanks to atomic counter,
2790 avoiding a rare race condition in pthread_cond_timedwait.
2792 1999-12-31 Andreas Jaeger <aj@suse.de>
2794 * internals.h: Remove duplicate prototype declarations.
2796 * weaks.c: Remove __THROW from prototypes since the file is not
2797 compiled by a C++ compiler.
2798 * internals.h: Likewise.
2800 1999-12-30 Andreas Jaeger <aj@suse.de>
2802 * sysdeps/pthread/pthread.h: Move internal functions to...
2803 * sysdeps/pthread/bits/libc-lock.h: ...here.
2805 1999-12-29 Andreas Jaeger <aj@suse.de>
2807 * sysdeps/pthread/pthread.h: Fix typos, reformat comments.
2809 1999-12-28 Ulrich Drepper <drepper@cygnus.com>
2811 * sysdeps/alpha/pt-machine.h: Move stack_pointer definition to the
2814 * manager.c (__pthread_start): Add one more cast to prevent
2815 warning on 64bit machines.
2817 1999-12-21 Ulrich Drepper <drepper@cygnus.com>
2819 * manager.c (pthread_handle_create): Set p_pid of new thread
2820 before calling the callback function to report a new thread.
2822 1999-12-20 Andreas Jaeger <aj@suse.de>
2824 * pthread.c (pthread_initialize): Move getrlimit call after
2827 1999-12-18 Ulrich Drepper <drepper@cygnus.com>
2829 * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
2830 pwrite64, lseek64, open64, and __open64.
2831 * wrapsyscall.c: Define pread, __pread64, pread64, pwrite, __pwrite64,
2832 pwrite64, lseek64, open64, and __open64.
2834 * manager.c (pthread_allocate_stack): Correct computation of
2835 new_thread_bottom. Correct handling of stack size and when the
2836 rlimit method to guard for stack growth is used.
2837 * pthread.c (pthread_initialize): Stack limit must be STACK_SIZE
2838 minus one pagesize (not two).
2840 1999-12-03 Andreas Jaeger <aj@suse.de>
2842 * Versions: Add __res_state with version GLIBC_2.2.
2844 * errno.c (__res_state): New function to return thread specific
2847 * pthread.c (pthread_initialize): Initialize p_resp.
2848 (__pthread_reset_main_thread): Also set p_resp.
2850 * manager.c (pthread_handle_create): Initialize p_resp.
2852 * internals.h: Add thread specific resolver state.
2853 Based on patches by Adam D. Bradley <artdodge@cs.bu.edu>.
2855 1999-12-01 Ulrich Drepper <drepper@cygnus.com>
2857 * sysdeps/i386/pt-machine.h: Move stack_pointer definition to the
2859 * sysdeps/i386/i686/pt-machine.h: Likewise.
2860 Patches by Alan Modra <alan@SPRI.Levels.UniSA.Edu.Au>.
2862 1999-11-23 Ulrich Drepper <drepper@cygnus.com>
2864 * manager.c (pthread_start_thread_event): Initialize p_pid already
2867 1999-11-22 Ulrich Drepper <drepper@cygnus.com>
2869 * internals.h: Add prototype for __pthread_manager_event.
2870 * manager.c (__pthread_manager_event): New function.
2871 (pthread_start_thread_event): Correct computation of self.
2872 Use INIT_THREAD_SELF.
2873 * pthread.c (__pthread_manager_thread): Initialize p_lock.
2874 (__pthread_initialize_manager): Respect event flags also for creation
2875 of the manager thread.
2877 1999-11-08 Ulrich Drepper <drepper@cygnus.com>
2879 * pthread.c (__pthread_initialize_manager): Initialize
2880 __pthread_manager_thread.p_tid.
2882 1999-11-02 Ulrich Drepper <drepper@cygnus.com>
2884 * internals.h: Declare __pthread_last_event.
2885 * manager.c: Define __pthread_last_event.
2886 (pthread_handle_create): Set __pthread_last_event.
2887 (pthread_exited): Likewise.
2888 * join.c (pthread_exit): Likewise.
2890 * Makefile (libpthread-routines): Add events.
2891 * events.c: New file.
2892 * internals.h: Protect against multiple inclusion.
2893 Include thread_dbP.h header.
2894 (struct _pthread_descr_struct): Add new fields p_report_events and
2896 Declare event reporting functions.
2897 * join.c (pthread_exit): Signal event if this is wanted.
2898 * manager.c (__pthread_threads_events): New variable.
2899 (pthread_handle_create): Take new parameters with event information.
2900 Signal TD_CREATE event if wanted.
2901 (__pthread_manager): Adjust pthread_handle_create call.
2902 (pthread_start_thread_event): New function. Block until manager is
2903 finished and then call pthread_start_thread.
2904 (pthread_exited): Signal TD_REAP event if wanted.
2906 1999-10-26 Ulrich Drepper <drepper@cygnus.com>
2908 * restart.h (suspend_with_cancellation): Rewrite as a macro.
2910 * condvar.c (pthread_cond_timedwait_relative): Don't mark as inline.
2912 1999-10-25 Andreas Jaeger <aj@suse.de>
2914 * internals.h: Remove K&R compatibility.
2915 * no-tsd.c: Likewise.
2916 * semaphore.h: Likewise.
2917 * signals.c: Likewise.
2918 * sysdeps/pthread/bits/libc-tsd.h: Likewise.
2919 * sysdeps/unix/sysv/linux/bits/sigthread.h: Likewise.
2920 * weaks.c: Likewise.
2922 1999-10-21 Xavier Leroy <Xavier.Leroy@inria.fr>
2924 * pthread.c: For i386, wrap pthread_handle_sigrestart and
2925 pthread_handle_sigcancel with functions that restore %gs from the
2926 signal context. For each signal handling function, two wrappers
2927 are required, one for a non-RT signal and one for a RT signal.
2928 * signal.c: For i386, add code to restore %gs from the signal
2929 context in pthread_sighandler and pthread_sighandler_rt.
2931 1999-10-17 Ulrich Drepper <drepper@cygnus.com>
2933 * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add cast.
2935 1999-10-14 Ulrich Drepper <drepper@cygnus.com>
2937 * pthread.c (__pthread_initial_thread): Pass argument to
2938 PTHREAD_START_ARGS_INITIALIZER.
2939 (__pthread_manager_thread): Likewise.
2941 * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add parameter to
2942 initialize function.
2944 * manager.c (pthread_handle_create): Remove p_startfct initialization.
2946 * internals.h (_pthread_descr_struct): We don't need p_startfct field.
2948 1999-10-12 Ulrich Drepper <drepper@cygnus.com>
2950 * internals.h: Correct return types for __libc_read and __libc_write.
2952 1999-10-09 Andreas Jaeger <aj@suse.de>
2954 * internals.h: Add __new_sem_post to get prototype in
2955 manager.c; include semaphore.h for needed types.
2957 1999-10-08 Ulrich Drepper <drepper@cygnus.com>
2959 * manager.c (__pthread_manager) [REQ_POST]: Use __new_sem_post
2960 directly instead of calling sem_post which should not be necessary
2961 but is faster and might help in some case to work around problems.
2962 Patch by khendricks@ivey.uwo.ca [libc/1382].
2964 1999-10-08 Andreas Schwab <schwab@suse.de>
2966 * sysdeps/pthread/Subdirs: New file.
2969 1999-10-07 Ulrich Drepper <drepper@cygnus.com>
2971 * Implies: New file.
2972 * internals.h (struct _pthread_descr_struct): Add p_startfct.
2973 * manager.c (pthread_handle_create): Initialize p_startfct.
2974 * pthread.c: Define __linuxthread_pthread_sizeof_descr variable.
2976 1999-09-25 Ulrich Drepper <drepper@cygnus.com>
2978 * manager.c (__linuxthreads_pthread_threads_max): New variable.
2979 * specific.c (__linuxthreads_pthread_keys_max): New variable.
2980 (__linuxthreads_pthread_key_2ndlevel_size): New variable.
2982 * condvar.c (pthread_cond_timedwait_relative): Never return with
2983 EINTR. Patch by Andreas Schwab.
2985 1999-09-19 Ulrich Drepper <drepper@cygnus.com>
2987 * signals.c (sigaction): Correct last patch. Don't select
2988 pthread_sighandler_rt based on the signal number but instead of
2989 the SA_SIGINFO flag.
2991 1999-09-23 Ulrich Drepper <drepper@cygnus.com>
2993 * specific.c: Move definitions of struct pthread_key_struct and
2994 destr_function to ...
2995 * internals.h: ...here.
2997 1999-09-18 Ulrich Drepper <drepper@cygnus.com>
2999 * pthread.c (pthread_handle_sigrestart_rt): New function. Use
3000 this instead of pthread_handle_sigrestart if the signal is an RT
3003 * signals.c: Handle passing through of sighandler arguments also
3004 for real-time signals.
3006 1999-09-03 Andreas Schwab <schwab@suse.de>
3008 * ptfork.c (__fork): Renamed from fork and use __libc_fork. Add
3010 (__vfork): New function, alias vfork.
3011 * Versions: Export __fork, vfork, and __vfork in libpthread.
3013 1999-08-23 Andreas Schwab <schwab@suse.de>
3015 * signals.c (pthread_sighandler): Add SIGCONTEXT_EXTRA_ARGS to
3016 call to signal handler.
3018 1999-08-20 Ulrich Drepper <drepper@cygnus.com>
3020 * pthread.c (__pthread_reset_main_thread): Undo last change.
3021 (__pthread_kill_other_threads_np): Reset signal handlers for the
3022 signals we used in the thread implementation here.
3024 1999-08-19 Ulrich Drepper <drepper@cygnus.com>
3026 * pthread.c (__pthread_reset_main_thread): Reset signal handlers
3027 for the signals we used in the thread implementation [PR libc/1234].
3029 * Versions: Export __pthread_kill_other_threads_np from libpthread
3032 * signals.c: Pass sigcontext through wrapper to the user function.
3034 1999-08-01 Ulrich Drepper <drepper@cygnus.com>
3036 * Versions [ld.so] (GLIBC_2.0): Export __libc_internal_tsd_get and
3037 __libc_internal_tsd_set.
3039 1999-07-29 Andreas Jaeger <aj@arthur.rhein-neckar.de>
3041 * manager.c: Remove inclusion of <linux/tasks.h> since it's not
3044 1999-07-16 Andreas Jaeger <aj@arthur.rhein-neckar.de>
3046 * internals.h: Align _pthread_descr_struct to 32 bytes.
3047 Reported by Tim Hockin <thockin@cobaltnet.com>, close PR
3050 1999-07-09 Ulrich Drepper <drepper@cygnus.com>
3052 * oldsemaphore.c (sem_compare_and_swap): Fix use of compare and
3055 1999-07-09 Cristian Gafton <gafton@redhat.com>
3057 * Makefile (libpthread-routines): Add oldsemaphore routine.
3058 * Versions: Add sem_destroy, sem_getvalue, sem_init, sem_post,
3059 sem_trywait, and sem_wait to GLIBC_2.1.
3060 * oldsemaphore.c: New file.
3061 * semaphore.c: Add default_symbol_versions for the changed functions.
3062 (__new_sem_init): Rename from sem_init.
3063 (__new_sem_post): Rename from sem_post.
3064 (__new_sem_wait): Rename from sem_wait.
3065 (__new_sem_trywait): Rename from sem_trywait.
3066 (__new_sem_getvalue): Rename from sem_getvalue.
3067 (__new_sem_destroy): Rename from sem_destroy.
3069 1999-06-23 Robey Pointer <robey@netscape.com>
3071 * internals.h: Added p_nextlock entry to separate queueing for a
3072 lock from queueing for a CV (sometimes a thread queues on a lock
3073 to serialize removing itself from a CV queue).
3074 * pthread.c: Added p_nextlock to initializers.
3075 * spinlock.c: Changed to use p_nextlock instead of p_nextwaiting.
3077 1999-07-09 Ulrich Drepper <drepper@cygnus.com>
3079 * manager.c (pthread_handle_create): Free mmap region after stack
3080 if clone failed. Patch by Kaz Kylheku <kaz@ashi.FootPrints.net>.
3082 1999-05-23 Andreas Jaeger <aj@arthur.rhein-neckar.de>
3084 * man/pthread_cond_init.man: Correct example.
3085 Reported by Tomas Berndtsson <tomas@nocrew.org>.
3087 * linuxthreads.texi (Condition Variables): Likewise.
3089 1999-05-18 Jakub Jelinek <jj@ultra.linux.cz>
3091 * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): Use
3092 casx not cas, also successful casx returns the old value in rd
3093 and not the new value.
3095 1999-05-16 Xavier Leroy <Xavier.Leroy@inria.fr>
3097 * manager.c: If pthread_create() is given a NULL attribute
3098 and the thread manager runs with a realtime policy, set the
3099 scheduling policy of the newly created thread back to SCHED_OTHER.
3100 * manager.c: If the PTHREAD_INHERIT_SCHED attribute is given,
3101 initialize the schedpolicy field of new_thread->p_start_args
3102 to that of the calling thread.
3104 1999-04-29 Ulrich Drepper <drepper@cygnus.com>
3106 * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): cas
3107 instruction does not allow memory element to use offset.
3109 1999-04-28 Ulrich Drepper <drepper@cygnus.com>
3111 * manager.c (pthread_allocate_stack): Optimize initialization of new
3114 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_define_initialized):
3115 Don't use initializer since it is all zeroes.
3116 (__libc_once_define): Likewise.
3118 1999-04-16 Andreas Jaeger <aj@arthur.rhein-neckar.de>
3120 * sysdeps/arm/Implies: Removed since cmpxchg/no-cmpxchg
3121 doesn't exist anymore.
3122 * sysdeps/i386/Implies: Likewise.
3123 * sysdeps/m68k/Implies: Likewise.
3124 * sysdeps/mips/Implies: Likewise.
3125 * sysdeps/powerpc/Implies: Likewise.
3126 * sysdeps/sparc/sparc32/Implies: Likewise.
3127 * sysdeps/sparc/sparc64/Implies: Likewise.
3129 1999-04-15 Ulrich Drepper <drepper@cygnus.com>
3131 * sysdeps/alpha/bits/semaphore.h: Removed.
3132 * sysdeps/powerpc/bits/semaphore.h: Removed.
3133 * sysdeps/pthread/cmpxchg/bits/semaphore.h: Removed.
3134 * sysdeps/pthread/no-cmpxchg/bits/semaphore.h: Removed.
3135 * Makefile (headers): Remove bits/semaphore.h.
3137 * semaphore.h: Define _pthread_descr if necessary.
3138 Don't include limits.h. Define SEM_VALUE_MAX directly.
3140 (sem_t): Protect element names with leading __.
3141 Add declarations for sem_close, sem_open, and sem_unlink.
3142 * semaphore.c: Adjust all functions for new element names.
3143 Define sem_close, sem_open, and sem_unlink.
3144 * Versions (libthread): Add sem_close, sem_open, and sem_unlink for
3146 * sysdeps/pthread/bits/pthreadtypes.h: Define _pthread_descr only if
3149 1999-03-16 H.J. Lu <hjl@gnu.org>
3151 * specific.c (pthread_key_delete): Check th->p_terminated to see
3152 if the thread is running.
3154 * Versions (__libc_internal_tsd_get, __libc_internal_tsd_set):
3155 Added to GLIBC_2.0 for libc.so.
3157 1999-02-12 H.J. Lu <hjl@gnu.org>
3159 * Versions (__libc_current_sigrtmin, __libc_current_sigrtmax,
3160 __libc_allocate_rtsig): Added to GLIBC_2.1.
3162 * internals.h (DEFAULT_SIG_RESTART): Removed.
3163 (DEFAULT_SIG_CANCEL): Removed.
3165 * pthread.c (init_rtsigs, __libc_current_sigrtmin,
3166 __libc_current_sigrtmax, __libc_allocate_rtsig): New functions.
3167 (__pthread_sig_restart, __pthread_sig_cancel,
3168 __pthread_sig_debug): Initialized.
3169 (pthread_initialize): Call init_rtsigs () to initialize
3172 1999-02-03 H.J. Lu <hjl@gnu.org>
3174 * manager.c (__pthread_manager): Do block __pthread_sig_debug.
3175 Don't restart the thread which sent REQ_DEBUG.
3176 (pthread_start_thread): Check if __pthread_sig_debug > 0
3179 * pthread.c (__pthread_initialize_manager): Suspend ourself
3180 after sending __pthread_sig_debug to gdb instead of
3181 __pthread_sig_cancel.
3183 1999-01-24 H.J. Lu <hjl@gnu.org>
3185 * manager.c (__pthread_manager): Delete __pthread_sig_debug
3186 from mask if __pthread_sig_debug > 0.
3187 (pthread_handle_create): Increment __pthread_handles_num.
3189 * manager.c (pthread_handle_create): Don't pass CLONE_PTRACE to clone.
3190 * pthread.c (__pthread_initialize_manager): Likewise.
3192 * pthread.c (pthread_initialize): Use __libc_allocate_rtsig (1)
3193 instead of __libc_allocate_rtsig (2).
3194 (__pthread_initialize_manager): Send __pthread_sig_debug to gdb
3195 instead of __pthread_sig_cancel.
3196 (pthread_handle_sigdebug): Fix comments.
3198 1999-01-21 Ulrich Drepper <drepper@cygnus.com>
3200 * manager.c (pthread_allocate_stack): Set
3201 __pthread_nonstandard_stacks if user-specified stack is used.
3203 1999-01-16 Ulrich Drepper <drepper@cygnus.com>
3205 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _LFS_ASYNCHRONOUS_IO,
3206 _LFS_LARGEFILE, _LFS64_LARGEFILE, and _LFS64_STDIO from Unix98.
3208 1999-01-07 Xavier Leroy <Xavier.Leroy@inria.fr>
3210 * pthread.c: Use a third signal __pthread_sig_debug distinct
3211 from __pthread_sig_cancel to notify gdb when a thread is
3213 * manager.c: Likewise.
3214 * internals.h: Likewise.
3215 * signals.c: The implementation of sigwait(s) assumed that
3216 all signals in s have signal handlers already attached.
3217 This is not required by the standard, so make it work
3218 also if some of the signals have no handlers.
3220 1999-01-05 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
3222 * linuxthreads.texi: Remove pointers from first @node. Move old
3223 @node spec inside comment.
3225 1998-12-31 Ulrich Drepper <drepper@cygnus.com>
3227 * sysdeps/pthread/bits/stdio-lock.h: Define _IO_lock_lock and
3230 1998-12-29 Ulrich Drepper <drepper@cygnus.com>
3232 * semaphore.c (sem_trywait): Don't forget to unlock the semaphore
3233 lock. Patch by Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>.
3235 1998-12-21 Ulrich Drepper <drepper@cygnus.com>
3237 * manager.c: Threads now send __pthread_sig_cancel on termination.
3238 Change clone call and signal masks.
3239 * thread.c (pthread_handle_sigrestart): Remove special code for
3241 (pthread_handle_sigcancel): In manager thread call
3242 __pthread_manager_sighandler.
3243 * sysdeps/i386/pt-machine.h (__compare_and_swap): Add memory clobber.
3244 * sysdeps/i386/i686/pt-machine.h: Likewise.
3245 Patches by Xavier Leroy.
3247 1998-12-14 Ulrich Drepper <drepper@cygnus.com>
3249 * spinlock.c (__pthread_unlock): Don't crash if called for an
3250 untaken mutex. Reported by Ruslan V. Brushkoff <rus@Snif.Te.Net.UA>.
3252 * Examples/ex6.c: Unbuffer stdout and reduce sleep time to reduce
3255 1998-12-13 Ulrich Drepper <drepper@cygnus.com>
3257 * Examples/ex3.c: Wait until all threads are started before
3258 searching for the number to avoid race condition on very fast
3261 1998-12-08 Andreas Jaeger <aj@arthur.rhein-neckar.de>
3263 * sysdeps/pthread/pthread.h: Remove __pthread_setcanceltype
3264 declaration since it's not needed.
3266 * sysdeps/pthread/pthread.h: Move internal functions to ...
3267 * internals.h: ...here.
3269 1998-12-02 H.J. Lu <hjl@gnu.org>
3271 * pthread.c (__pthread_sig_restart): Initiliaze to 0 if
3272 SIGRTMIN is defined.
3273 (__pthread_sig_cancel): Likewise.
3275 1998-12-01 Andreas Jaeger <aj@arthur.rhein-neckar.de>
3277 * wrapsyscall.c: Include <sys/mman.h> for msync,
3278 <stdlib.h> for system and <termios.h> for tcdrain prototype.
3279 Correct msync declaration.
3281 1998-11-29 Roland McGrath <roland@baalperazim.frob.com>
3283 * sysdeps/pthread/bits/libc-tsd.h (__libc_tsd_define, __libc_tsd_get,
3284 __libc_tsd_set): New macros for new interface.
3285 * no-tsd.c: New file, provide uninitialized defns of
3286 __libc_internal_tsd_get and __libc_internal_tsd_set.
3287 * Makefile (routines): Add no-tsd.
3289 1998-10-12 Roland McGrath <roland@baalperazim.frob.com>
3291 * internals.h: Include <bits/libc-tsd.h>, not <bits/libc-lock.h>.
3292 * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
3293 __libc_internal_tsd_set): Move decls to ...
3294 * sysdeps/pthread/bits/libc-tsd.h: New file for __libc_internal_tsd_*
3297 * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
3298 __libc_internal_tsd_set): Make these pointers to functions, not
3299 functions; remove #pragma weak decls for them.
3300 * specific.c (__libc_internal_tsd_get, __libc_internal_tsd_set):
3301 Define static functions and initialized pointers to them.
3303 1998-11-18 Ulrich Drepper <drepper@cygnus.com>
3305 * Makefile (CFLAGS-mutex.c): Define as -D__NO_WEAK_PTHREAD_ALIASES.
3306 (CFLAGS-specific.c): Likewise.
3307 (CFLAGS-pthread.c): Likewise.
3308 (CFLAGS-ptfork.c): Likewise.
3309 (CFLAGS-cancel.c): Likewise.
3310 * sysdeps/pthread/bits/libc-lock.h: Don't mark __pthread_* functions
3311 as weak references if __NO_WEAK_PTHREAD_ALIASES is defined.
3313 * mutex.c (pthread_mutex_init): Define as strong symbol.
3314 (pthread_mutex_destroy): Likewise.
3315 (pthread_mutex_trylock): Likewise.
3316 (pthread_mutex_lock): Likewise.
3317 (pthread_mutex_unlock): Likewise.
3318 (pthread_mutexattr_init): Likewise.
3319 (pthread_mutexattr_destroy): Likewise.
3320 (pthread_once): Likewise.
3321 * ptfork.c (pthread_atfork): Likewise.
3322 * specific.c (pthread_key_create): Likewise.
3323 (pthread_setspecific): Likewise.
3324 (pthread_getspecific): Likewise.
3326 1998-11-15 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
3328 * linuxthreads.texi: Fix punctuation after xref.
3330 1998-11-10 H.J. Lu <hjl@gnu.org>
3332 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine NR_OPEN
3333 if it is defined in <linux/limits.h>.
3335 1998-10-29 14:28 Ulrich Drepper <drepper@cygnus.com>
3337 * spinlock.h (__pthread_trylock): Define inline.
3338 (__pthread_lock): Add extra parameter to declaration. Declare
3339 using internal_function.
3340 (__pthread_unlock): Declare using internal_function.
3341 * spinlock.c (__pthread_lock): Add new parameter. Use it instead
3342 of local variable self. Avoid recomputing self. Define using
3344 (__pthread_trylock): Remove.
3345 (__pthread_unlock): Define using internal_function.
3346 * cancel.c: Adjust for __pthread_lock interface change. Use already
3347 computed self value is possible.
3348 * condvar.c: Likewise.
3350 * manager.c: Likewise.
3351 * mutex.c: Likewise.
3352 * pthread.c: Likewise.
3353 * rwlock.c: Likewise.
3354 * semaphore.c: Likewise.
3355 * signals.c: Likewise.
3357 1998-10-27 13:46 Ulrich Drepper <drepper@cygnus.com>
3359 * sysdeps/pthread/pthread.h (struct _pthread_cleanup_buffer): Prepend
3360 __ to field names of the struct.
3361 * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_fastlock):
3363 (pthread_attr_t): Likewise.
3364 (pthread_cond_t): Likewise.
3365 (pthread_condattr_t): Likewise.
3366 (pthread_mutex_t): Likewise.
3367 (pthread_mutexattr_t): Likewise.
3368 (pthread_rwlock_t): Likewise.
3369 (pthread_rwlockattr_t): Likewise.
3370 * attr.c: Adjust for pthread.h and pthreadtypes.h change.
3371 * cancel.c: Likewise.
3372 * condvar.c: Likewise.
3373 * manager.c: Likewise.
3374 * mutex.c: Likewise.
3375 * pthread.c: Likewise.
3376 * ptlongjmp.c: Likewise.
3377 * rwlock.c: Likewise.
3378 * spinlock.c: Likewise.
3380 1998-10-09 Ulrich Drepper <drepper@cygnus.com>
3382 * sysdeps/i386/pt-machine.h (get_eflags, set_eflags): Mark these
3385 * sysdeps/i386/i686/pt-machine.h: Remove unused inline
3388 * Makefile (libpthread-routines): Add pt-machine.
3389 * pt-machine.c: New file.
3390 * sysdeps/alpha/pt-machine.h: Define PT_EI as extern inline is not
3391 yet defined. Use PT_EI in extern inline definitions.
3392 * sysdeps/arm/pt-machine.h: Likewise.
3393 * sysdeps/i386/pt-machine.h: Likewise.
3394 * sysdeps/i386/i686/pt-machine.h: Likewise.
3395 * sysdeps/m68k/pt-machine.h: Likewise.
3396 * sysdeps/mips/pt-machine.h: Likewise.
3397 * sysdeps/powerpc/pt-machine.h: Likewise.
3398 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
3399 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
3401 1998-10-02 Andreas Jaeger <aj@arthur.rhein-neckar.de>
3403 * semaphore.h: Include <sys/types.h> so that _pthread_descr
3406 1998-09-15 David S. Miller <davem@pierdol.cobaltmicro.com>
3408 * sysdeps/sparc/sparc32/pt-machine.h (INIT_THREAD_SELF): Add nr
3410 * sysdeps/sparc/sparc64/pt-machine.h (INIT_THREAD_SELF): Likewise.
3412 1998-09-12 14:24 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu>
3414 * sysdeps/unix/sysv/linux/bits/sigthread.h: Add multiple inclusion
3417 1998-09-02 11:08 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3419 * signals.c (sigaction): Check that sig is less than NSIG to avoid
3420 array index overflow.
3422 1998-09-06 10:56 Ulrich Drepper <drepper@cygnus.com>
3424 * sysdeps/pthread/semaphore.h: New file.
3426 1998-09-06 09:08 Ulrich Drepper <drepper@cygnus.com>
3428 * sysdeps/pthread/bits/libc-lock.h (enum __libc_tsd_key_t): Add
3429 _LIBC_TSD_KEY_DL_ERROR.
3431 1998-08-31 Ulrich Drepper <drepper@cygnus.com>
3433 * sysdeps/i386/i686/pt-machine.h (testandset): Add memory clobber.
3434 * sysdeps/i386/pt-machine.h: Likewise.
3435 Suggested by Roland McGrath.
3437 1998-08-28 13:58 Ulrich Drepper <drepper@cygnus.com>
3439 * internals.h: Also define THREAD_GETMEM_NC and THREAD_SETMEM_NC to
3440 access thread data with non-constant offsets.
3441 * specific.c: Use THREAD_GETMEM_NC and THREAD_SETMEM_NC where
3444 * sysdeps/i386/useldt.h: Fix typo. Add THREAD_GETMEM_NC and
3445 THREAD_SETMEM_NC definitions.
3447 * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM_NC and
3449 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
3451 1998-08-26 15:46 Ulrich Drepper <drepper@cygnus.com>
3453 * internals.h: Define THREAD_GETMEM and THREAD_SETMEM to default if
3454 not already defined.
3455 (struct _pthread_descr_struct): Add p_self and p_nr field.
3456 * manager.c (__pthread_handles): Define second element to point
3458 (__pthread_handles_num): Initialize to 2.
3459 (__pthread_manager): Use INIT_THREAD_SELF with two arguments.
3460 (pthread_start_thread): Likewise.
3461 (pthread_handle_create): Start search for free slot at entry 2.
3462 Initialize new fields p_self and p_nr.
3463 Call __clone with CLONE_PTRACE if available.
3464 (pthread_free): Call FREE_THREAD_SELF if available.
3465 * pthread.c (__pthread_initial_thread): Initialize new fields.
3466 (__pthread_manager_thread): Likewise.
3467 (__pthread_initialize_manager): Call __clone with CLONE_PTRACE.
3469 * cancel.c: Use THREAD_GETMEM and THREAD_SETMEM to access the
3470 elements of the thread descriptor.
3471 * condvar.c: Likewise.
3472 * errno.c: Likewise.
3474 * manager.c: Likewise.
3475 * pthread.c: Likewise.
3476 * ptlongjmp.c: Likewise.
3477 * semaphore.c: Likewise.
3478 * signals.c: Likewise.
3479 * specific.c: Likewise.
3480 * spinlock.c: Likewise.
3482 * sysdeps/alpha/pt-machine.h (INIT_THREAD_SELF): Add extra parameter.
3484 * sysdeps/i386/useldt.h: New file.
3485 * sysdeps/i386/i686/pt-machine.h: Show how to use this file.
3487 * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM and
3488 THREAD_SETMEM using __thread_self.
3489 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
3491 1998-08-24 Geoff Keating <geoffk@ozemail.com.au>
3493 * spinlock.c (__pthread_lock): Reset p_nextwaiting to NULL if it
3494 turned out that we didn't need to queue after all.
3496 1998-08-22 Geoff Keating <geoffk@ozemail.com.au>
3498 * sysdeps/powerpc/pt-machine.h: Remove testandset, it's not used
3499 and wastes space; correct types.
3501 1998-08-08 11:18 H.J. Lu <hjl@gnu.org>
3503 * signals.c (sigaction): Handle NULL argument.
3505 1998-08-04 Ulrich Drepper <drepper@cygnus.com>
3507 * sysdeps/unix/sysv/linux/bits/sigthread.h: Use __sigset_t instead
3510 1998-08-02 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3512 * Makefile (linuxthreads-version): Extract correct number from
3515 1998-07-29 Xavier Leroy <Xavier.Leroy@inria.fr>
3517 * Banner: Bump version number to 0.8
3518 * FAQ.html: Many updates, in particular w.r.t. debugging.
3519 * manager.c: Support for non-default stacksize for
3520 LinuxThreads-allocated stacks;
3521 don't use guard pages for stacks with default size, rely on
3522 rlimit(RLIMIT_STACK) instead (it's cheaper).
3524 * cancel.c: Use __pthread_sig_cancel and __pthread_sig_restart
3525 everywhere instead of PTHREAD_SIG_CANCEL and PTHREAD_SIG_RESTART.
3526 * condvar.c: Likewise.
3527 * internals.h: Likewise.
3528 * restart.h: Likewise.
3529 * signals.c: Likewise.
3530 * pthread.c: Likewise; set rlimit(RLIMIT_STACK) as we need it.
3532 1998-07-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3534 * weaks.c: Define pthread_mutexattr_[sg]ettype instead of
3535 __pthread_mutexattr_[sg]ettype. Add more weak aliases.
3536 * Versions: Put __pthread_mutexattr_settype under version
3537 GLIBC_2.0. Don't export __pthread_mutexattr_setkind_np and
3538 __pthread_mutexattr_gettype.
3540 1998-07-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3542 * sysdeps/pthread/bits/libc-lock.h: Make
3543 __pthread_mutexattr_settype weak. Don't make
3544 __pthread_mutexattr_setkind_np weak.
3546 1998-07-16 10:52 Ulrich Drepper <drepper@cygnus.com>
3548 * manager.c (pthread_handle_create): Check whether sched_setscheduler
3549 call can succeed here.
3551 * mutex.c: Define __pthread_mutexattr_settype and make
3552 __pthread_mutexattr_setkind_np an alias.
3553 Likewise for __pthread_mutexattr_gettype.
3555 1998-07-15 11:00 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu>
3557 * attr.c (pthread_attr_setschedpolicy): Don't check whether caller
3560 1998-07-14 19:38 Ulrich Drepper <drepper@cygnus.com>
3562 * sysdeps/pthread/bits/libc-lock.h: Define __libc_cleanup_end.
3564 1998-07-11 Andreas Jaeger <aj@arthur.rhein-neckar.de>
3566 * Examples/ex6.c: Include <unistd.h> for usleep.
3568 1998-06-13 11:04 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3570 * Examples/ex4.c (main): Use exit, not pthread_exit.
3572 1998-07-09 13:39 Ulrich Drepper <drepper@cygnus.com>
3574 * Versions: Add __pthread_mutexattr_gettype and
3575 __pthread_mutexattr_settype.
3576 * lockfile.c: Use __pthread_mutexattr_settype instead of
3577 __pthread_mutexattr_setkind_np.
3578 * mutex.c: Define __pthread_mutexattr_gettype and
3579 __pthread_mutexattr_settype.
3581 * sysdeps/pthread/pthread.h: Declare __pthread_mutexattr_gettype and
3582 __pthread_mutexattr_settype.
3583 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_init_recursive):
3584 Use __pthread_mutexattr_settype.
3586 1998-07-08 22:26 Ulrich Drepper <drepper@cygnus.com>
3588 * Versions: Add pthread_mutexattr_gettype, pthread_mutexattr_settype.
3589 * mutex.c: Define weak alias pthread_mutexattr_gettype and
3590 pthread_mutexattr_settype.
3591 * sysdeps/pthread/pthread.h: Declare these functions.
3592 Move pthread_sigmask and pthread_kill declaration in separate header.
3593 * sysdeps/unix/sysv/linux/bits/sigthread.h: New file.
3595 1998-07-07 15:20 Ulrich Drepper <drepper@cygnus.com>
3597 * Makefile: Add rules to compile and run tests.
3598 * Examples/ex1.c: Little changes to fix warnings.
3599 * Examples/ex2.c: Likewise.
3600 * Examples/ex3.c: Likewise.
3601 * Examples/ex4.c: Likewise.
3602 * Examples/ex5.c: Likewise.
3603 * Examples/ex6.c: New file.
3605 1998-07-05 11:54 Ulrich Drepper <drepper@cygnus.com>
3607 * Versions: Add pthread_attr_init to GLIBC_2.1 version in libc.
3609 1998-07-01 Andreas Jaeger <aj@arthur.rhein-neckar.de>
3611 * attr.c: Include <string.h>.
3613 1998-06-30 11:47 Ulrich Drepper <drepper@cygnus.com>
3615 * attr.c: Include errno.h. Use memcpy to copy sched_param.
3616 * internals.h: Include limits.h.
3617 * manager.c: Use memcpy to copy sched_param.
3618 * ptfork.c: Include errno.h.
3619 * pthread.c: Likewise.
3620 * semaphore.c: Likewise.
3621 * specific.c: Likewise.
3622 * spinlock.h: Likewise.
3623 * sysdeps/pthread/pthread.h: Include only allowed headers. Move
3624 type definition to ...
3625 * sysdeps/pthread/bits/pthreadtypes.h: ...here. New file.
3627 1998-06-29 12:34 Ulrich Drepper <drepper@cygnus.com>
3629 * sysdeps/pthread/pthread.h: Use __PMT not __P for function pointers.
3631 * sysdeps/pthread/pthread.h: Define various PTHREAD_* symbols also
3632 as macros as demanded in POSIX.1, Annex C.
3634 1998-06-29 12:29 Ulrich Drepper <drepper@cygnus.com>
3636 * internals.h (struct pthread_request): For free use pthread_t
3637 instead of pthread_descr.
3638 * join.c (pthread_join): Pass thread_id, not th to manager.
3639 (pthread_detach): Likewise.
3640 * manager.c (__pthread_manager): Except thread ID in FREE_REQ case.
3641 (pthread_exited): Remove detached queue code.
3642 (pthread_handle_free): Expect thread ID parameter and use it to
3643 validate the thread decsriptor. Don't use detached queue.
3644 Patches by Xavier Leroy.
3646 1998-06-27 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3648 * libpthread.map: Export accept, longjmp, sigaction, siglongjmp,
3649 _IO_flockfile, _IO_ftrylockfile, _IO_funlockfile,
3650 __pthread_atfork, __pthread_key_create, __pthread_once.
3651 * internals.h: Doc fix.
3652 * pthread.c (__pthread_initialize): Define again.
3654 1998-06-26 Ulrich Drepper <drepper@cygnus.com>
3656 * manager.c (pthread_exited): If thread is not detached put it on
3658 (pthread_handle_free): If thread is not on list with living threads
3659 search on list with detached threads.
3661 * sysdeps/pthread/pthread.h (PTHREAD_RWLOCK_INITIALIZER): Correct
3662 for new definition of pthread_rwlock_t.
3664 * spinlock.c: Correct test whether to compile
3665 __pthread_compare_and_swap or not.
3667 1998-06-25 19:27 Ulrich Drepper <drepper@cygnus.com>
3669 * attr.c: Finish user stack support. Change locking code to be safe
3670 in situations with different priorities.
3671 * cancel.c: Likewise.
3672 * condvar.c: Likewise.
3673 * internals.h: Likewise.
3675 * manager.c: Likewise.
3676 * mutex.c: Likewise.
3677 * pthread.c: Likewise.
3678 * ptlongjmp.c: Likewise.
3679 * queue.h: Likewise.
3680 * rwlock.c: Likewise.
3681 * semaphore.c: Likewise.
3682 * semaphore.h: Likewise.
3683 * signals.c: Likewise.
3684 * spinlock.c: Likewise.
3685 * spinlock.h: Likewise.
3686 * sysdeps/pthread/pthread.h: Likewise.
3687 Patches by Xavier Leroy.
3689 * sysdeps/i386/i686/pt-machine.h: New file.
3691 1998-06-25 Ulrich Drepper <drepper@cygnus.com>
3693 * sysdeps/pthread/pthread.h: Make [sg]et_stacksize and
3694 [sg]et_stackaddr prototypes always available.
3696 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
3697 _POSIX_THREAD_ATTR_STACKSIZE and _POSIX_THREAD_ATTR_STACKADDR.
3699 1998-06-24 Ulrich Drepper <drepper@cygnus.com>
3701 * manager.c (pthread_free): Undo patch from 980430.
3702 Reported by David Wragg <dpw@doc.ic.ac.uk>.
3704 1998-06-09 15:07 Ulrich Drepper <drepper@cygnus.com>
3706 * manager.c: Define __pthread_manager_adjust_prio and use it to
3707 increase priority when needed.
3708 * internals.h: Add prototype for __pthread_manager_adjust_prio.
3709 * mutex.c: Optimize mutexes to wake up only one thread.
3710 * pthread.c: Move PID of manager for global variable in structure
3712 Patches by Xavier Leroy.
3714 1998-06-07 13:47 Ulrich Drepper <drepper@cygnus.com>
3716 * sysdeps/pthread/bits/libc-lock.h: Optimize cleanup handlers a bit.
3718 1998-06-03 Andreas Jaeger <aj@arthur.rhein-neckar.de>
3720 * attr.c: Correct typo.
3722 1998-05-01 Ulrich Drepper <drepper@cygnus.com>
3724 * manager.c (pthread_free): Unmap guard before the stack.
3725 Patch by Matthias Urlichs.
3727 1998-04-30 Ulrich Drepper <drepper@cygnus.com>
3729 * manager.c (pthread_free): Detect already free child.
3730 Patch by Xavier Leroy, reported by Matthias Urlichs.
3732 1998-04-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3734 * Makefile (linuxthreads-version): Renamed back from
3737 1998-04-21 Ulrich Drepper <drepper@cygnus.com>
3739 * ptlongjmp.c: Add prototypes for __libc_siglongjmp and
3742 1998-04-20 14:55 Ulrich Drepper <drepper@cygnus.com>
3744 * Makefile (libpthread-routines): Add ptlongjmp and spinlock.
3745 * internals.h: Add definitions for new spinlock implementation.
3746 * ptlongjmp.c: New file.
3747 * spinlock.c: New file.
3748 * spinlock.h (acquire): Don't reschedule using __sched_yield, use
3749 new function __pthread_acquire to prevent deadlocks with thread
3750 with different priorities.
3751 Patches by Xavier Leroy <Xavier.Leroy@inria.fr>.
3753 1998-03-16 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3755 * manager.c (__pthread_manager): Reduce first argument to select
3756 to include just the needed file descriptor.
3758 1998-03-17 00:06 Ulrich Drepper <drepper@cygnus.com>
3760 * manager.c: Fix last patch which caused core dumps.
3762 * pthread.c: Correctly handle missing SIGRTMIN.
3764 1998-03-15 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3766 * libpthread.map: Add __libc_internal_tsd_get and
3767 __libc_internal_tsd_set. Add missing cancelable functions. Export
3768 libc internal versions of the cancelable functions.
3770 1998-03-13 16:51 Ulrich Drepper <drepper@cygnus.com>
3772 * weaks.c: Define pthread_attr_init as GLIBC_2.0 and GLIBC_2.1.
3774 1998-03-13 00:46 Ulrich Drepper <drepper@cygnus.com>
3776 * attr.c: Implement pthread_attr_[gs]etguardsize,
3777 pthread_attr_[gs]setstackaddr, pthread_attr_[gs]etstacksize.
3778 Change pthread_attr_init to have two interfaces.
3779 * internals.h (struct _pthread_descr_struct): Add new fields for
3781 * libpthread.map: Add names in GLIBC_2.1 section.
3782 * manager.c (pthread_handle_create): Implement guardsize and
3784 (pthread_free): Likewise.
3785 * pthread.c (pthread_create): Add new interface for changed
3787 * sysdeps/pthread/pthread.h: Add prototypes for new functions.
3788 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add definition of
3791 1998-03-11 00:42 Wolfram Gloger <wmglo@dent.med.uni-muenchen.de>
3793 * manager.c: Enable resetting of the thread scheduling policy
3794 to SCHED_OTHER when the parent thread has a different one.
3796 1998-02-01 13:51 Ulrich Drepper <drepper@cygnus.com>
3798 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
3799 _POSIX_ASYNCHRONOUS_IO.
3801 * sysdeps/pthread/pthread.h: Define bits for Unix98 variants of
3803 * mutex.c: Implement new mutex types.
3805 * internals.h: Include <signal.h>.
3807 * libpthread.map: Add __erno_location and __h_errno_location.
3809 * errno.c: Return pointer to variable actually in use. This might
3810 not be the one in the thread structure.
3811 * internals.h (struct _pthread_descr_struct): Add new fields p_errnop
3813 * manager.c (__pthread_manager): Set p_errnop and p_h_errnop member
3814 of manager thread structure.
3815 (pthread_handle_create): Set p_errnop and p_h_errnop members for new
3817 * pthread.c: Adapt initializer for thread structures.
3818 (__pthread_initial_thread): Set p_errnop and p_h_errnop member.
3819 (__pthread_reset_main_thread): Reset p_errnop and p_h_errnop of
3820 current thread to global variables.
3822 1998-01-31 17:27 Ulrich Drepper <drepper@cygnus.com>
3824 * rwlock.c: New file.
3825 * Makefile (libpthread-routines): Add rwlock.
3826 * sysdeps/pthread/pthread.h: Define data structures and declare
3828 * libpthread.map: Add new functions.
3830 1997-12-18 13:50 Philip Blundell <pb@nexus.co.uk>
3832 * sysdeps/arm/pt-machine.h: New file; add ARM support.
3833 * sysdeps/arm/Implies: likewise.
3834 * README: Document it.
3836 1997-12-13 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3838 * signals.c: Remove unneeded initializer for sigwaited, saving a
3841 1997-04-11 01:18 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3843 * semaphore.c (sem_init): Set sem_spinlock only if available.
3845 1997-12-04 01:48 Ulrich Drepper <drepper@cygnus.com>
3847 * mutex.c: Implement PTHREAD_MUTEX_CHECKERROR.
3848 * sysdeps/pthread/pthread.h: Define PTHREAD_MUTEX_CHECKERROR.
3850 * Makefile: Update from LinuxThreads 0.7.
3851 * internals.h. Likewise.
3852 * manager.c: Likewise.
3853 * mutex.c: Likewise.
3854 * pthread.c: Likewise.
3855 * signals.c: Likewise.
3856 * specific.c: Likewise.
3857 * Examples/ex3.c: Likewise.
3859 1997-11-20 18:13 Ulrich Drepper <drepper@cygnus.com>
3861 * pthread.c (__pthread_reset_main_thread): Close pipe only if still
3864 1997-10-29 05:38 Ulrich Drepper <drepper@cygnus.com>
3866 * wrapsyscall.c: Add socket functions which are also cancelation
3869 1997-10-19 21:40 Wolfram Gloger <wg@wolfram.dent.med.uni-muenchen.de>
3871 * specific.c (__libc_internal_tsd_set, __libc_internal_tsd_get):
3872 New functions for fast thread specific data within libc.
3874 * internals.h: Add new array p_libc_specific to struct
3875 _pthread_descr_struct.
3877 * sysdeps/pthread/bits/libc-lock.h: Declare new functions.
3879 1997-10-13 05:39 Ulrich Drepper <drepper@cygnus.com>
3881 * semaphore.h: Add __BEGIN_DECLS/__END_DECLS.
3882 Reported by Ralf Corsepius <corsepiu@faw.uni-ulm.de>.
3884 1997-08-29 03:05 Ulrich Drepper <drepper@cygnus.com>
3886 * internals.h (struct _pthread_descr_struct): Add definitions for
3887 two-level specific key handling.
3888 * manager.c (pthread_handle_create): Initialize specific memory array.
3889 * specific.c: Implement two-level key handling.
3890 * weaks.c: Don't provide dummy key handling.
3891 * sysdeps/pthread/bits/libc-lock.h: Typedef __libc_lock_t (no #define).
3892 Add definition of __libc_key_t.
3893 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define PTHREAD_KEYS_MAX
3895 Add definition of _POSIX_THREAD_DESTRUCTOR_ITERATIONS and
3896 PTHREAD_DESTRUCTOR_ITERATIONS.
3898 * manager.c (pthread_handle_create): Compare mmap result with
3901 * ptfork.c: Rename to __pthread_atfork and make old name a weak alias.
3902 * sysdeps/pthread/bits/pthread.h: Add prototype for __pthread_atfork.
3904 1997-08-22 19:04 Richard Henderson <rth@cygnus.com>
3906 sysdeps/sparc -> sysdeps/sparc/sparc32
3907 sysdeps/sparc64 -> sysdeps/sparc/sparc64
3909 * internals.h: Change definition of THREAD_SELF to be an expression,
3910 not a statement that did a return.
3911 * sysdeps/alpha/pt-machine.h (THREAD_SELF): Update accordingly.
3912 * sysdeps/sparc/sparc32/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF):
3913 Follow Solaris and use a "system reserved" register (%g6) to hold
3914 the thread descriptor.
3915 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
3917 1997-08-03 00:09 Ulrich Drepper <drepper@cygnus.com>
3919 * mutex.c: Correct pthread_once. Patch by Xavier Leroy.
3920 * sysdeps/pthread/pthread.h: Add prototype for __pthread_once.
3921 * sysdeps/pthread/bits/pthread.h: Add macros for __libc_once.
3923 * semaphore.c: Include spinlock.h only when needed.
3925 * specific.c (__pthread_setsepcific, __pthread_getspecific): Reject
3926 keys for entries not in use.
3928 * weaks.c: Implement key handling functions for real.
3930 1997-06-29 01:04 Richard Henderson <richard@gnu.ai.mit.edu>
3932 Initial sparc64-linux support:
3933 * sysdeps/sparc64/Implies: New file.
3934 * sysdeps/sparc64/pt-machine.h: Likewise.
3936 1997-06-29 00:48 Ulrich Drepper <drepper@cygnus.com>
3938 * semaphore.c: Include spinlock.h at correct place.
3941 1997-06-13 10:06 Richard Henderson <rth@tamu.edu>
3943 The Great Bit File Move:
3944 * sysdeps/alpha/semaphorebits.h: -> .../bits/semaphore.h.
3945 * sysdeps/powerpc/semaphorebits.h: Likewise.
3946 * sysdeps/pthread/cmpxchg/semaphorebits.h: Likewise.
3947 * sysdeps/pthread/no-cmpxchg/semaphorebits.h: Likewise.
3948 * sysdeps/pthread/libc-lock.h: -> bits/
3949 * sysdeps/pthread/stdio-lock.h: Likewise.
3950 * sysdeps/unix/sysv/linux/local_lim.h: Likewise.
3951 * sysdeps/unix/sysv/linux/posix_opt.h: Likewise.
3952 * semaphore.h: Likewise.
3953 * sysdeps/pthread/pthread.h: Likewise.
3955 * lockfile.c: <foo.h> -> <bits/foo.h>.
3956 * semaphore.h: Likewise.
3958 * Makefile: (headers): foo.h -> bits/foo.h.
3959 * sysdeps/pthread/Makefile: Likewise.
3961 1997-04-11 01:18 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3963 * semaphore.c (sem_init): Set sem_spinlock only if available.
3965 * sysdeps/m68k/pt-machine.h (testandset, __compare_and_swap): Fix
3968 1997-04-09 03:00 Ulrich Drepper <drepper@cygnus.com>
3970 Update from LinuxThreads 0.6.
3972 * attr.c (pthread_attr_getdetachstate): Use __sched_get_priority_max
3973 and __sched_get_priority_min instead of names without `__'.
3975 * manager.c: Rewrite large parts to implement opaque pthread_t.
3977 * cancel.c: Adapt for opaque pthread_t type.
3978 * condvar.c: Likewise.
3979 * errno.c: Likewise.
3981 * mutex.c: Likewise.
3982 * pthread.c: Likewise.
3983 * signals.c: Likewise.
3984 * specific.c: Likewise.
3985 * restart.h: Likewise.
3986 * queue.h: Likewise.
3987 * Examples/ex3.c: Likewise.
3988 * Examples/ex4.c: Likewise.
3989 * sysdeps/pthread/pthread.h: Likewise.
3991 * pthread.c: Accumulate time for all threads in thread manager.
3993 * semaphore.c: Implement fallback implementation for architectures
3994 sometimes missing compare-exchange operations.
3996 * cancel.c (pthread_cancel): Validate handle argument.
3997 * join.c (pthread_join): Likewise.
3998 (pthread_detach): Likewise.
3999 * signals.c (pthread_kill): Likewise.
4001 * spinlock.h (acquire): Use __sched_yield not sched_yield.
4003 * queue.h (enqueue): Enqueue thread according to priority.
4005 * internals.c (struct pthread_start_args): New struct for passing
4006 args to cloning function.
4007 (struct _pthread): Rename to _pthread_descr_struct and adapt for
4010 * Examples/Makefile (clean): Pass -f option to rm.
4012 * sysdeps/i386/pt-machine.h: Add check for compare-exchange instruction
4013 and define TEST_FOR_COMPARE_AND_SWAP.
4014 * sysdeps/i386/i486/pt-machine.h: Removed.
4016 * sysdeps/unix/sysv/linux/local_lim.h (PTHREAD_THREADS_MAX): Increase
4019 1997-04-04 16:38 Ulrich Drepper <drepper@cygnus.com>
4021 * restart.h (suspend): Clear p_signal before suspending.
4022 (suspend_with_cancellation): Likewise.
4023 Patch by Xavier Leroy <Xavier.Leroy@inria.fr>.
4025 * weaks.c: Make __pthread_key_create return 1.
4026 * sysdeps/pthread/libc-lock.h: Define __libc_key_create,
4027 __libc_getspecific, __libc_setspecific, and __libc_key_t.
4028 * sysdeps/pthread/stdio-lock.h: Don't care for implementation not
4031 1997-03-19 15:13 Miguel de Icaza <miguel@nuclecu.unam.mx>
4033 * sysdeps/sparc/pt-machine (RELEASE): Fix.
4035 1997-03-01 07:55 Geoff Keating <geoffk@ozemail.com.au>
4037 * sysdeps/powerpc/Implies: Added.
4038 * sysdeps/powerpc/pt-machine.h: Added.
4039 * sysdeps/powerpc/semaphorebits.h: Added.
4041 1997-01-22 01:22 Ulrich Drepper <drepper@cygnus.com>
4043 * pthread.c (__pthread_initial_thread): Correct
4045 (__pthread_manager_thread): Likewise.
4046 Reported by Andreas Jaeger.
4048 1997-01-18 22:15 Richard Henderson <rth@tamu.edu>
4050 Since sigset_t no longer fits in a register, we can't pass in the
4051 thread's initial mask so easily. Take this opportunity to simplify
4052 the clone implementation by only accepting a single void* argument.
4054 * manager.c (__pthread_manager): Put thread vitals in the thread
4055 struct instead of as arguments through clone.
4056 (pthread_start_thread): Look for them there.
4057 * internals.h (struct _pthread): Add p_initial_fn,
4058 p_initial_fn_arg, p_initial_mask. Fix __pthread_manager proto.
4059 * pthread.c (pthread_initialize_manager): Revise clone invocation.