1 2002-09-29 Ulrich Drepper <drepper@redhat.com>
3 * sysdeps/i386/useldt.h (DO_SET_THREAD_AREA): Don't use
4 INLINE_SYSCALL for set_thread_area syscall.
6 2002-09-28 Roland McGrath <roland@redhat.com>
8 * pthread.c (__pthread_reset_main_thread) [FLOATING_STACKS]:
9 Don't call setrlimit, since we did no prior bogon we need to undo.
11 2002-09-27 Roland McGrath <roland@redhat.com>
13 * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Don't include <pt-machine.h>.
15 2002-09-24 Roland McGrath <roland@redhat.com>
17 * sysdeps/x86_64/tls.h: New file.
19 2002-09-23 Roland McGrath <roland@redhat.com>
21 * Examples/ex13.c (dump_mut): int -> size_t for counter.
23 2002-09-18 Bruno Haible <bruno@clisp.org>
25 * Examples/ex10.c (thread): Fail if pthread_mutex_timedlock() returns
26 an unexpected error code.
28 * internals.h (__pthread_message): Add const to first parameter type.
29 * pthread.c (__pthread_message): Likewise.
31 * sysdeps/unix/sysv/linux/configure: Moved to ../sysdeps/pthread.
33 2002-09-17 Roland McGrath <roland@redhat.com>
35 * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT, TLS_DO_SET_THREAD_AREA):
36 Set the descriptor limit to the full 4GB, so %gs:OFFSET works for any
37 offset (positive or negative) relative to the thread struct.
38 * sysdeps/i386/useldt.h (DO_MODIFY_LDT, DO_SET_THREAD_AREA): Likewise.
40 2002-09-12 Jakub Jelinek <jakub@redhat.com>
42 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: Move...
43 * sysdeps/unix/sysv/linux/sparc/Makefile: ...here.
44 Replace /usr/lib/crt[in].o with crt[in].o too.
46 2002-09-11 Steven Munroe <sjmunroe@us.ibm.com>
48 * sysdeps/powerpc/powerpc64/pt-machine.h: New file.
50 2002-09-04 Bruno Haible <bruno@clisp.org>
52 * pthread.c: Include <sys/time.h>.
53 (is_smp_system): Move to sysdeps/unix/sysv/linux/smp.h.
54 * sysdeps/unix/sysv/linux/smp.h: New file, extracted from pthread.c.
55 * Makefile (distribute): Add smp.h to the list.
57 2002-09-04 Bruno Haible <bruno@clisp.org>
59 * sysdeps/alpha/pt-machine.h: Choose different include file location
60 on non-Linux platforms.
62 * wrapsyscall.c (PROMOTE_INTEGRAL_TYPE): New macro.
63 (open, open64): Change va_arg argument type to the integral type to
64 which mode_t promotes.
66 * sysdeps/pthread/tst-timer.c (main): Don't assume anything about
67 the structure of 'struct sigevent'.
69 * errno.c (__errno_location, __h_errno_location, __res_state):
70 Use prototype function definitions.
72 2002-07-29 Steven Munroe <sjmunroe@us.ibm.com>
74 * shlib-versions: Set libpthread version to 2.3 for powerpc64.
75 * sysdeps/powerpc/pt-machine.h: moved to...
76 * sysdeps/powerpc/powerpc32/pt-machine.h: ...here
77 * sysdeps/powerpc/powerpc64/pt-machine.h: New file.
79 2002-09-02 Roland McGrath <roland@redhat.com>
81 * sysdeps/powerpc/Makefile (CFLAGS-pt-initfini.s): New variable.
83 2002-09-01 Roland McGrath <roland@redhat.com>
85 * sysdeps/pthread/bits/libc-tsd.h (enum __libc_tsd_key_t): Add new keys
86 CTYPE_B, CTYPE_TOLOWER, CTYPE_TOUPPER.
88 * sysdeps/pthread/bits/libc-tsd.h (__libc_tsd_address): New macro.
89 (__libc_internal_tsd_address): Declare it.
90 * Versions (libc, ld, libpthread: GLIBC_PRIVATE): Add
91 __libc_internal_tsd_address.
92 * specific.c (libc_internal_tsd_address): New function.
93 (__libc_internal_tsd_address): New variable.
94 * no-tsd.c (__libc_internal_tsd_address): New variable.
96 2002-08-31 Ulrich Drepper <drepper@redhat.com>
98 * Makefile: Don't use rule for crt%.o, spell it out as rules for
101 2002-08-30 Roland McGrath <roland@redhat.com>
103 * Makefile (extra-objs, omit-deps): Add crtn.
104 ($(objpfx)libpthread.so): Depend on $(objpfx)crtn.o.
105 ($(objpfx)libpthread.so: +postinit): Append $(objpfx)crtn.o.
106 ($(objpfx)crtn.S): New target.
107 ($(objpfx)crt%.o): Pattern rule replaces crti.o target.
108 (generated): Add crtn.S.
110 * sysdeps/unix/sysv/linux/x86_64/Makefile ($(objpfx)specs): Massage
113 2002-08-30 Jakub Jelinek <jakub@redhat.com>
115 * pthread.c (__pthread_initialize_minimal): Call __uselocale even
118 2002-08-30 Roland McGrath <roland@redhat.com>
120 * tst-static-locale.c: New file.
121 * Makefile (tests, tests-static): Add it.
123 2002-04-24 Steven Munroe <sjmunroe@us.ibm.com>
125 * spinlock.c (__pthread_lock): Fix spurious wakeup
126 handling. Don't clear lowest bit of list pointer as sign the thread
127 is still on the wait list. Don't restart after spurious wakeup
128 with spinning to get the lock.
129 (__pthread_unlock): Take set lowest bit into account when handling
130 pointer to list elements.
131 Patch by Steve Munroe <sjmunroe@us.ibm.com>.
133 2002-08-28 Roland McGrath <roland@redhat.com>
135 * sysdeps/pthread/timer_routines.c (thread_func): Fix type in cast.
137 2002-08-28 Jakub Jelinek <jakub@redhat.com>
139 * sysdeps/unix/sysv/linux/hppa/aio_cancel.c: New file.
140 * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
141 * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
143 2002-08-28 Ulrich Drepper <drepper@redhat.com>
145 * sysdeps/pthread/timer_routines.c (thread_func): Change return
146 type to void and add casts in use to avoid warnings with all gcc
149 2002-08-08 Jakub Jelinek <jakub@redhat.com>
151 * sysdeps/unix/sysv/linux/bits/local_lim.h (PTHREAD_THREADS_MAX):
153 * manager.c (__pthread_handles): Remove.
154 * pthandles.c: New file.
155 * pthread.c (__pthread_initialize_minimal): Initialize
156 __pthread_handles[0] and __pthread_handles[1].
157 * Makefile (libpthread-routines): Add pthandles (must be last).
159 2002-08-26 Brian Youmans <3diff@gnu.org>
161 * Examples/ex10.c: Corrected version number in Lesser GPL copying
162 permission notice from 2 to 2.1.
163 * Examples/ex11.c: Likewise.
164 * Examples/ex13.c: Likewise.
165 * Examples/ex8.c: Likewise.
166 * Examples/ex9.c: Likewise.
167 * barrier.c: Likewise.
168 * events.c: Likewise.
169 * lockfile.c: Likewise.
170 * no-tsd.c: Likewise.
171 * pt-machine.c: Likewise.
172 * ptclock_gettime.c: Likewise.
173 * ptclock_settime.c: Likewise.
174 * rwlock.c: Likewise.
175 * sysdeps/alpha/pspinlock.c: Likewise.
176 * sysdeps/alpha/pt-machine.h: Likewise.
177 * sysdeps/arm/pspinlock.c: Likewise.
178 * sysdeps/arm/pt-machine.h: Likewise.
179 * sysdeps/cris/pspinlock.c: Likewise.
180 * sysdeps/cris/pt-machine.h: Likewise.
181 * sysdeps/hppa/pspinlock.c: Likewise.
182 * sysdeps/hppa/pt-machine.h: Likewise.
183 * sysdeps/i386/i686/pt-machine.h: Likewise.
184 * sysdeps/i386/pspinlock.c: Likewise.
185 * sysdeps/i386/pt-machine.h: Likewise.
186 * sysdeps/i386/useldt.h: Likewise.
187 * sysdeps/ia64/pspinlock.c: Likewise.
188 * sysdeps/ia64/pt-machine.h: Likewise.
189 * sysdeps/m68k/pspinlock.c: Likewise.
190 * sysdeps/m68k/pt-machine.h: Likewise.
191 * sysdeps/mips/pspinlock.c: Likewise.
192 * sysdeps/mips/pt-machine.h: Likewise.
193 * sysdeps/powerpc/pspinlock.c: Likewise.
194 * sysdeps/powerpc/pt-machine.h: Likewise.
195 * sysdeps/pthread/bits/initspin.h: Likewise.
196 * sysdeps/pthread/bits/libc-lock.h: Likewise.
197 * sysdeps/pthread/bits/libc-tsd.h: Likewise.
198 * sysdeps/pthread/getcpuclockid.c: Likewise.
199 * sysdeps/pthread/posix-timer.h: Likewise.
200 * sysdeps/pthread/timer_create.c: Likewise.
201 * sysdeps/pthread/timer_delete.c: Likewise.
202 * sysdeps/pthread/timer_getoverr.c: Likewise.
203 * sysdeps/pthread/timer_gettime.c: Likewise.
204 * sysdeps/pthread/timer_routines.c: Likewise.
205 * sysdeps/pthread/timer_settime.c: Likewise.
206 * sysdeps/pthread/tst-timer.c: Likewise.
207 * sysdeps/s390/pspinlock.c: Likewise.
208 * sysdeps/s390/s390-32/pt-machine.h: Likewise.
209 * sysdeps/s390/s390-64/pt-machine.h: Likewise.
210 * sysdeps/sh/pspinlock.c: Likewise.
211 * sysdeps/sh/pt-machine.h: Likewise.
212 * sysdeps/sparc/sparc32/pspinlock.c: Likewise.
213 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
214 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: Likewise.
215 * sysdeps/sparc/sparc64/pspinlock.c: Likewise.
216 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
217 * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
218 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
219 * sysdeps/unix/sysv/linux/bits/sigthread.h: Likewise.
220 * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: Likewise.
221 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
222 * tststack.c: Likewise.
223 * unload.c: Likewise.
225 * wrapsyscall.c: Likewise.
227 * sysdeps/pthread/pt-initfini.c: Changed copying
228 permission notice to Lesser GPL from Library GPL, including the
229 references in the special exception.
230 * sysdeps/unix/sysv/linux/hppa/pt-initfini.c: Likewise.
231 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Likewise.
232 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c:
234 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c:
236 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: Likewise.
238 2002-08-26 Ulrich Drepper <drepper@redhat.com>
240 * Examples/ex10.c (thread): tv_nsec == 1000000000 is already
241 overflow [PR libc/4244].
243 2002-08-25 Ulrich Drepper <drepper@redhat.com>
245 * sysdeps/pthread/timer_routines.c (thread_func): Make the
246 compiler happy by adding a return statement which will never be
249 * tst-context.c (main): Cast to long before casting to pointer.
251 * Examples/ex17.c (main): Use correct format string.
253 * Examples/ex9.c (thread): Remove incorrect return statement.
255 2002-08-23 Ulrich Drepper <drepper@redhat.com>
257 * pthread.c (__linuxthreads_version): New global constant.
259 2002-08-23 Andreas Jaeger <aj@suse.de>
261 * sysdeps/x86_64/pt-machine.h: Use %fs instead of %gs
262 as thread specific register.
263 (testandset): Fix inline asm.
264 (THREAD_GETMEM): Fix inline asm.
266 2002-08-22 Roland McGrath <roland@redhat.com>
268 * sysdeps/i386/useldt.h (INIT_THREAD_SELF): Remove [HAVE_TLS_SUPPORT]
270 (INIT_THREAD_SELF): Pass second arg to DO_SET_THREAD_AREA.
271 (DO_SET_THREAD_AREA): Take second arg, pass to DO_SET_THREAD_AREA_REUSE
272 macro. That chooses whether to reuse %gs value or let kernel set it.
273 [USE_TLS] (DO_SET_THREAD_AREA_REUSE): New macro, always 1.
274 [!USE_TLS] (DO_SET_THREAD_AREA_REUSE): New macro, true if arg is
277 2002-08-21 Ulrich Drepper <drepper@redhat.com>
279 * sysdeps/i386/tls.h (TLS_SETUP_GS_SEGMENT): Add new parameter
280 also to the third definition of this macro.
282 2002-06-17 Andreas Jaeger <aj@suse.de>
284 * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
287 2002-08-20 Ulrich Drepper <drepper@redhat.com>
289 * sysdeps/i386/useldt.h: Go back to using 16-bit instructions when
290 loading/reading segment registers. Some old hardware doesn't
291 handle the 32-bit instructions as expected.
292 * sysdeps/i386/tls.h: Likewise.
294 * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Second parameter is
295 renamed to secondcall and use is negated.
296 (TLS_SETUP_GS_SEGMENT): Likewise.
297 (TLS_INIT_TP): Likewise.
298 * sysdeps/sh/tls.h (TLS_INIT_TP): Second parameter is renamed to
301 * sysdeps/i386/tls.h: Use 32-bit operations when handling segment
302 registers. No need to mask upper 16 bits in this case.
303 * sysdeps/i386/useldt.h: Likewise.
304 (DO_SET_THREAD_AREA): We have to load %gs again even if the value
305 is the same since the GDT content changed.
307 * sysdeps/i386/tls.h (TLS_INIT_TP): Add new parameter and pass it on
308 to TLS_SETUP_GS_SEGMENT.
309 (TLS_SETUP_GS_SEGMENT): Add new parameter and pass it on to
310 TLS_DO_SET_THREAD_AREA.
311 (TLS_DO_SET_THREAD_AREA): If new parameter is zero determine
312 entry number from %gs value.
313 * sysdeps/sh/tls.h (TLS_INIT_TP): Add new parameter and simply
316 * manager.c (pthread_handle_create): Pass NULL to _dl_allocate_tls.
317 Pass true to _dl_deallocate_tls.
318 (pthread_free): Likewise.
319 * pthread.c (__pthread_initialize_manager): Likewise.
321 2002-08-19 Ulrich Drepper <drepper@redhat.com>
323 * sysdeps/i386/useldt.h (DO_SET_THREAD_AREA): Use correct shift when
324 computing index from %gs value.
326 2002-08-16 Roland McGrath <roland@redhat.com>
328 * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Calculate segment
329 register value from entry number properly.
331 * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT): Rewrite asm to use %ebx
332 optimally conditional on [__PIC__].
333 (TLS_DO_SET_THREAD_AREA): New macro, implement inline syscall
334 without touching errno, and use latest modify_ldt-like interface.
335 (TLS_SETUP_GS_SEGMENT): Use that instead of INLINE_SYSCALL.
336 * sysdeps/i386/useldt.h (DO_MODIFY_LDT): Set %gs in this macro.
337 (DO_SET_THREAD_AREA): New macro, uses current syscall interface with
338 existing %gs value as the segment to set.
339 (INIT_THREAD_SELF): Rewritten using those. Use set_thread_area only
340 under [HAVE_TLS_SUPPORT] so we can rely on the initialization done
341 by the first thread's early TLS setup.
343 2002-08-15 Roland McGrath <roland@redhat.com>
345 * sysdeps/i386/tls.h (TLS_INIT_TP): Use statement expression and
346 return a value as callers now expect.
348 2002-08-11 Roland McGrath <roland@redhat.com>
350 * pthread.c (__pthread_initialize_manager): Initialize
351 p_header.data.tcb field of manager thread's descriptor.
352 (__pthread_initialize_minimal): Don't initialize p_header.data.self
353 field, already done by TLS_INIT_TP.
355 * manager.c (pthread_handle_create): Move p_header field initializers
358 2002-08-08 Ulrich Drepper <drepper@redhat.com>
360 * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Removed.
362 2002-08-07 Ulrich Drepper <drepper@redhat.com>
364 * pthread.c (__linuxthreads_initial_report_events): New variable.
365 (__pthread_initialize_manager): Use it to initialize p_report_events
367 [TLS]: Store pointer to descriptor of manager in __pthread_handles.
369 2002-08-07 Roland McGrath <roland@redhat.com>
371 * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT): Add an extra argument with
372 an "m" constraint to the asm so the compiler knows LDT_ENTRY was used.
374 2002-08-02 Roland McGrath <roland@redhat.com>
376 * sysdeps/pthread/bits/libc-tsd.h (enum __libc_tsd_key_t):
377 Add _LIBC_TSD_KEY_LOCALE.
378 * manager.c (pthread_start_thread) [!(USE_TLS && HAVE___THREAD)]:
379 Call __uselocale to initialize our per-thread locale pointer to
381 * pthread.c (__pthread_initialize_minimal): Likewise.
383 * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Add missing \s.
385 2002-08-02 Ulrich Drepper <drepper@redhat.com>
387 * pthread.c: Declare _errno, _h_errno, and _res unless we use TLS
390 * cancel.c (__pthread_perform_cleanup) [USE_TLS && HAVE___THREAD]:
391 Don't use p_libc_specific element in thread descriptor.
393 2002-07-30 Roland McGrath <roland@redhat.com>
395 * sysdeps/pthread/bits/libc-tsd.h: Include <tls.h>.
396 [USE_TLS && HAVE___THREAD]: Just include the sysdeps/generic file,
397 which does the right thing when __thread support is available.
398 * descr.h (struct _pthread_descr_struct) [USE_TLS && HAVE___THREAD]:
399 Omit `p_libc_specific', `p_errnop', `p_errno', `p_h_errnop',
400 `p_h_errno', `p_resp', and `p_res' members.
401 * pthread.c (__pthread_initialize_minimal) [USE_TLS && HAVE___THREAD]:
402 Don't initialize `p_errnop' and `p_h_errnop' members.
403 (__pthread_reset_main_thread): Likewise.
404 (__pthread_initialize_manager): Likewise.
405 * manager.c (__pthread_manager, pthread_handle_create): Likewise.
406 * pthread.c (pthread_initialize) [USE_TLS && HAVE___THREAD]:
407 Don't initialize `p_resp' member.
408 (__pthread_reset_main_thread): Likewise.
409 * manager.c (pthread_handle_create): Likewise.
410 * specific.c (libc_internal_tsd_set, libc_internal_tsd_get):
411 Conditionalize these on [!(USE_TLS && HAVE___THREAD)].
412 * no-tsd.c: Conditionalize contents on [!(USE_TLS && HAVE___THREAD)].
413 * errno.c [USE_TLS && HAVE___THREAD]
414 (__h_errno_location, __res_state): Don't define these at all.
416 * sysdeps/i386/tls.h (INSTALL_DTV): Add parens around arguments!
417 (INSTALL_NEW_DTV, GET_DTV): Likewise.
418 * sysdeps/sh/tls.h (INSTALL_DTV, INSTALL_NEW_DTV, GET_DTV): Likewise.
420 * weaks.c: Don't include <errno.h> here.
422 2002-08-01 Roland McGrath <roland@redhat.com>
424 * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT): New macro, broken out of
426 (TLS_DO_SET_THREAD_AREA): New macro, uses thread_set_area syscall.
427 (TLS_SETUP_GS_SEGMENT): New macro, try one or the other or both.
428 (TLS_INIT_TP): Use that.
430 2002-08-02 Jakub Jelinek <jakub@redhat.com>
432 * sysdeps/i386/useldt.h (DO_MODIFY_LDT): Move from INIT_THREAD_SELF.
433 (INIT_THREAD_SELF): Use sys_thread_area syscall instead if available.
434 (FREE_THREAD): Avoid modify_ldt if using GDT.
435 * sysdeps/i386/pspinlock.c (__have_no_set_thread_area): New variable.
437 2002-07-25 Jakub Jelinek <jakub@redhat.com>
439 * sysdeps/i386/tls.h: Use __ASSEMBLER__ test macro not ASSEMBLER.
440 * sysdeps/i386/pt-machine.h: Likewise.
441 * sysdeps/i386/useldt.h: Likewise.
443 2002-07-22 Ulrich Drepper <drepper@redhat.com>
445 * pthread.c (__pthread_initialize_minimal): If !SHARED and TLS
446 call __libc_setup_tls first.
447 * Makefile: Actually create tst-signal.out file when running the test.
448 (tests): Add tststatic.
449 * Examples/tststatic.c: New file.
451 2002-07-19 Ulrich Drepper <drepper@redhat.com>
453 * errno.c (__errno_location): Don't define unless !USE_TLS
455 * sysdeps/i386/pt-machine.c: Protect C code with #ifndef ASSEMBLER.
456 * sysdeps/i386/tls.h: Likewise.
457 * sysdeps/i386/useldt.h: Likewise.
458 * sysdeps/i386/i686/pt-machine.h: Likewise.
460 2002-07-02 H.J. Lu <hjl@gnu.org>
462 * sysdeps/mips/pspinlock.c: Don't include <sgidefs.h>. Always
464 * sysdeps/mips/pt-machine.h: Likewise.
466 2002-07-14 Ulrich Drepper <drepper@redhat.com>
468 * manager.c (pthread_handle_create): Initialize self-reference in
471 2002-07-01 Jakub Jelinek <jakub@redhat.com>
473 * Examples/ex9.c (main): Remove unused th variable.
475 2002-07-10 Ulrich Drepper <drepper@redhat.com>
477 * wrapsyscall.c: Add __nanosleep alias.
478 * Versions (GLIBC_2.2.6): Add __nanosleep.
479 * bug-sleep.c: New file.
480 * Makefile (tests): Add bug-sleep.
482 2002-06-19 Steven Munroe <sjmunroe@vnet.ibm.com>
484 * Examples/ex9.c (main): Use list of children and join them.
485 (thread): Do not call exit.
487 2002-06-20 Ulrich Drepper <drepper@redhat.com>
489 * spinlock.c (wait_node_alloc): We cannot use compare-and-exchange.
490 Unconditionally use the code using spinlock. Use __pthread_release
492 (wait_node_free): Likewise.
493 (__pthread_acquire, __pthread_release): Unconditionally define.
495 2002-06-07 Jakub Jelinek <jakub@redhat.com>
497 * sysdeps/ia64/pt-machine.h (MEMORY_BARRIER): Fix typo.
499 2002-05-24 Ulrich Drepper <drepper@redhat.com>
501 * sysdeps/ia64/pt-machine.h (MEMORY_BARRIER): Use __sync_synchronize.
503 2002-05-21 Ulrich Drepper <drepper@redhat.com>
505 * sysdeps/pthread/pthread.h (pthread_create): Rename first
507 (pthread_cancel): Likewise.
508 * internals.h (__pthread_create_2_1): Likewise.
509 * sysdeps/unix/sysv/linux/bits/sigthread.h (pthread_kill): Likewise.
511 2002-05-20 Ulrich Drepper <drepper@redhat.com>
513 * sysdeps/alpha/pt-machine.c (THREAD_SELF): Remove clobber.
514 Patch by Glen Nakamura <gen@flex.com>.
516 2002-05-03 Ulrich Drepper <drepper@redhat.com>
518 * signals.c: Move sighandler functions to...
519 * sighandler.c: ...here. New file.
520 * signals.c: Move signal handler related type definitions to...
521 * internals.h: ...here. Add prototypes for signal handlers.
522 * Makefile (libpthread-routines): Add sighandler.
523 (CFLAGS-sighandler.c): Add $(exceptions).
525 2002-04-30 Jakub Jelinek <jakub@redhat.com>
527 * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
529 2002-04-08 Ulrich Drepper <drepper@redhat.com>
531 * sysdeps/pthread/timer_getoverr.c: Return real overrun.
532 * sysdeps/pthread/posix-timer.h (struct timer_node): Add overrun_count.
533 * sysdeps/pthread/timer_routines.c (thread_func): Schedule next timeout
534 based on previous one and not on current time. Count overruns.
535 Patch by Eric F. Sorton <eric@cctcorp.com>.
537 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add DELAYTIMER_MAX.
539 2002-04-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
541 * sysdeps/sh/pt-machine.h: Define _PT_MACHINE_H
542 if it isn't defined yet.
543 (FLOATING_STACKS, ARCH_STACK_MAX_SIZE): Defined.
544 (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
546 * sysdeps/sh/tls.h: New file.
548 2002-04-08 Jakub Jelinek <jakub@redhat.com>
550 * manager.c (__pthread_manager_event): Use self instead of arg
551 for INIT_THREAD_SELF.
552 * sysdeps/i386/useldt.h (INIT_THREAD_SELF): Use sizeof (struct
553 _pthread_descr_struct) instead of sizeof (*descr).
555 2002-04-05 Ulrich Drepper <drepper@redhat.com>
557 * sysdeps/ia64/pt-machine.h: Protect against multiple inclusion.
558 * sysdeps/alpha/pt-machine.h: Likewise.
559 * sysdeps/arm/pt-machine.h: Likewise.
560 * sysdeps/cris/pt-machine.h: Likewise.
561 * sysdeps/hppa/pt-machine.h: Likewise.
562 * sysdeps/m68k/pt-machine.h: Likewise.
563 * sysdeps/mips/pt-machine.h: Likewise.
564 * sysdeps/powerpc/pt-machine.h: Likewise.
565 * sysdeps/s390/s390-32/pt-machine.h: Likewise.
566 * sysdeps/s390/s390-64/pt-machine.h: Likewise.
567 * sysdeps/sh/pt-machine.h: Likewise.
568 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
569 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
570 * sysdeps/x86_64/pt-machine.h: Likewise.
572 2002-04-05 Jakub Jelinek <jakub@redhat.com>
574 * man/pthread_mutexattr_init.man (pthread_mutexattr_settype): Document
575 instead of pthread_mutexattr_setkind_np.
576 (pthread_mutexattr_gettype): Similarly.
577 * man/pthread_mutexattr_setkind_np.man: New.
578 * man/Makefile (SOURCES): Add pthread_mutexattr_setkind_np.man.
580 2002-04-02 Ulrich Drepper <drepper@redhat.com>
582 * sysdeps/ia64/pt-machine.h (MEMORY_BARRIER): Define.
584 2002-03-22 Jakub Jelinek <jakub@redhat.com>
586 * sysdeps/mips/pt-machine.h (MEMORY_BARRIER): Remove.
588 2002-03-22 Ulrich Drepper <drepper@redhat.com>
590 * internals.h (MEMORY_BARRIER): Define as asm with memory as clobber.
592 2002-03-17 Andreas Jaeger <aj@suse.de>
594 * sysdeps/i386/pt-machine.h: Add testandset and __compare_and_swap
596 * sysdeps/alpha/pt-machine.h: Likewise.
597 * sysdeps/arm/pt-machine.h: Likewise.
598 * sysdeps/cris/pt-machine.h: Likewise.
599 * sysdeps/hppa/pt-machine.h: Likewise.
600 * sysdeps/i386/i686/pt-machine.h: Likewise.
601 * sysdeps/ia64/pt-machine.h: Likewise.
602 * sysdeps/m68k/pt-machine.h: Likewise.
603 * sysdeps/mips/pt-machine.h: Likewise.
604 * sysdeps/powerpc/pt-machine.h: Likewise.
605 * sysdeps/s390/s390-32/pt-machine.h: Likewise.
606 * sysdeps/s390/s390-64/pt-machine.h: Likewise.
607 * sysdeps/sh/pt-machine.h: Likewise.
608 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
609 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
610 * sysdeps/x86_64/pt-machine.h: Likewise.
612 * internals.h: Move testandset and __compare_and_swap prototypes
615 2002-03-03 Andreas Jaeger <aj@suse.de>
617 * errno.c: Include resolv.h to avoid warning.
619 2002-02-27 Ulrich Drepper <drepper@redhat.com>
621 * pthread.c [USE_TLS] (thread_self_stack): Correct check for upper
624 2002-02-23 Ulrich Drepper <drepper@redhat.com>
626 * attr.c (pthread_getattr_np): Don't take thread descriptor size
627 into account if USE_TLS.
628 * manager.c (pthread_handle_create): Free TLS data structures if call
629 failed. Pass correct stack to clone if USE_TLS.
630 * sysdeps/i386/pt-machine.h: Handle multiple inclusion.
631 * sysdeps/i386/i686/pt-machine.h: Likewise.
632 * sysdeps/i386/tls.h: Unconditionally include <pt-machine.h>.
634 * descr.h (struct _pthread_descr_struct): Update p_header for TLS.
635 Add p_stackaddr element #if USE_TLS.
636 * internals.c: Include <tls.h>.
637 * manager.c: Integrate creating and handling of thread descriptor
639 * pthread.c: Likewise.
640 * sysdeps/i386/tls.h (tcbhead_t): Add self pointer.
641 Include <linuxthreads/descr.h> only if TLS is really used.
642 (GET_DTV): New macro.
643 (TLS_INIT_TP): Initialize self pointer.
645 2002-02-17 Andreas Schwab <schwab@suse.de>
647 * signals.c (sigwait): Check for old sighandler being SIG_ERR,
650 2002-02-12 Ulrich Drepper <drepper@redhat.com>
652 * sysdeps/i386/tls.c (INSTALL_NEW_DTV): Define.
653 (INSTALL_DTV): Adjust for being passed pointer to element with length.
655 2002-02-08 Ulrich Drepper <drepper@redhat.com>
657 * sysdeps/i386/tls.h (TLS_INIT_TP): Also initialize %gs.
659 2002-02-08 Richard Henderson <rth@redhat.com>
661 * sysdeps/alpha/elf/pt-initfini.c: Use \n\ for multiline string.
663 2002-02-08 Ulrich Drepper <drepper@redhat.com>
665 * sysdeps/i386/tls.h: TLS cannot be supported with FLOATING_STACKS
668 2002-02-07 H.J. Lu <hjl@gnu.org>
670 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Silence the
672 (__pthread_spin_lock): Remove ".set noreorder".
673 * sysdeps/mips/pt-machine.h (__compare_and_swap): Liekwise.
675 2002-02-05 H.J. Lu <hjl@gnu.org>
677 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Not use
679 * sysdeps/mips/pt-machine.h (testandset): Likewise.
680 (__compare_and_swap): Likewise.
682 2002-02-07 Ulrich Drepper <drepper@redhat.com>
684 * internals.h: Move declarations/definitions of
685 __pthread_initial_thread_bos, __pthread_initial_thread,
686 __pthread_manager_thread_bos, __pthread_manager_thread_tos,
687 __pthread_manager_thread, __pthread_nonstandard_stacks, STACK_SIZE,
688 CURRENT_STACK_FRAME, __pthread_find_self, and thread_self...
690 * sysdeps/i386/tls.h: Add TLS definitions also for !FLOATING_STACKS.
691 Define THREAD_GETMEM accordingly.
693 2002-02-06 Ulrich Drepper <drepper@redhat.com>
695 * sysdeps/i386/tls.h: Include <stddef.h> for size_t.
697 * sysdeps/i386/tls.h: Define THREAD_DTV.
699 2002-02-04 Ulrich Drepper <drepper@redhat.com>
701 * internals.h: Move thread descriptor definition...
702 * descr.h.: ...here. New file.
703 * sysdeps/i386/tls.h: New file.
705 2002-02-01 H.J. Lu <hjl@gnu.org>
707 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Use a
708 different register in the delayed slot. Use branch likely.
710 * sysdeps/mips/pt-machine.h (testandset): Call _test_and_set.
711 (__compare_and_swap): Return 0 only when failed to compare. Use
714 2002-02-01 Jakub Jelinek <jakub@redhat.com>
716 * Versions (__libc_internal_tsd_get, __libc_internal_tsd_set,
717 __pthread_kill_other_threads_np): Move to GLIBC_PRIVATE.
718 * sysdeps/i386/i586/Versions: Move all symbols to GLIBC_PRIVATE.
719 * sysdeps/i386/i686/Versions: Move all symbols to GLIBC_PRIVATE.
720 * sysdeps/sparc/sparc32/sparcv9/Versions: New file.
721 * sysdeps/sparc/sparc64/Versions: New file.
722 * sysdeps/ia64/Versions: Move all symbols to GLIBC_PRIVATE.
724 2002-01-31 Ulrich Drepper <drepper@redhat.com>
726 * pthread.c: _dl_cpuclock_offset is not any longer a global variable
727 in SHARED code, use GL(dl_cpuclock_offset).
729 2002-01-28 Andreas Jaeger <aj@suse.de>
731 * sysdeps/mips/pspinlock.c (__pthread_spin_init): Clear *LOCK to
732 0. Patch by Machida Hiroyuki <machida@sm.sony.co.jp>.
734 2002-01-16 Martin Schwidefsky <schwidefsky@de.ibm.com>
736 * sysdeps/s390/s390-32/pt-machine.h (MEMORY_BARRIER): Define.
737 (CURRENT_STACK_FRAME): Remove duplicate definition.
738 * sysdeps/s390/s390-64/pt-machine.h: Likewise.
740 2002-01-14 Martin Schwidefsky <schwidefsky@de.ibm.com>
742 * Makefile (CFLAGS-tst-cancel.c): Add -fno-inline-functions to prevent
745 2002-01-12 Andreas Schwab <schwab@suse.de>
747 * Makefile (test-srcs): Add tst-signal.
748 (tests): Run tst-signal.
749 (distribute): Add tst-signal.sh.
750 * tst-signal.c, tst-signal.sh: New files.
752 2002-01-14 Andreas Jaeger <aj@suse.de>
754 * sysdeps/x86_64/pt-machine.h (INIT_THREAD_SELF): Avoid warning.
756 2002-01-11 Andreas Schwab <schwab@suse.de>
758 * signals.c (sighandler): Initialize all elements to SIG_ERR.
759 (__sigaction): Don't use value from sighandler if it is SIG_ERR.
761 2002-01-06 Richard Henderson <rth@redhat.com>
763 * sysdeps/alpha/elf/pt-initfini.c: New file.
765 2001-12-29 Andreas Jaeger <aj@suse.de>
767 * Examples/ex9.c: Add noreturn attribute for thread.
768 * Examples/ex10.c: Likewise.
769 * Examples/ex13.c (thread_start): Likewise.
770 * Examples/ex15.c (worker): Likewise.
772 * Examples/ex18.c: Include unistd.h for prototype of sleep.
774 2001-12-14 Ulrich Drepper <drepper@redhat.com>
776 * man/pthread_atfork.man: Adjust description of mutex handling
777 after fork for current implementation.
778 * linuxthreads.texi: Likewise [PR libc/2519].
780 2001-12-13 Andreas Schwab <schwab@suse.de>
782 * specific.c (pthread_key_delete): Don't contact the thread
783 manager if no threads have been created yet.
785 2001-12-12 NIIBE Yutaka <gniibe@m17n.org>
787 * sysdeps/sh/pt-machine.h (INIT_THREAD_SELF): Added __volatile__
788 qualifier to be safe.
790 2001-11-30 Andreas Schwab <schwab@suse.de>
792 * pthread.c (pthread_handle_sigcancel) [THREAD_SELF]: Double check
793 that self is the manager thread, and initialize the thread
795 (thread_self_stack) [THREAD_SELF]: New function to find self via
797 * manager.c (pthread_handle_create): Don't block cancel signal any
800 2001-11-29 Andreas Jaeger <aj@suse.de>
802 * sysdeps/x86_64/pt-machine.h: Use %gs as thread specific register.
804 (INIT_THREAD_SELF): New.
805 (THREAD_GETMEM): New.
807 (THREAD_SETMEM): New.
808 (THREAD_SETMEM_NC): New.
809 (FLOATING_STACKS): Define.
810 (ARCH_STACK_MAX_SIZE): Define.
812 2001-11-28 Kaz Kylheku <kaz@ashi.footprints.net>
814 Bugfix to pthread_key_delete. It was iterating over the thread
815 manager's linked list of threads, behind the thread manager's
816 back causing a race. The fix is to have the manager iterate over
817 the threads instead, using a new request type for doing so.
818 * internals.h (struct pthread_request): New manager request type
820 * manager.c (pthread_for_each_thread): New function.
821 (__pthread_manager): Handle new REQ_FOR_EACH_THREAD request.
822 * specific.c (struct pthread_key_delete_helper_args): New type.
823 (pthread_key_delete_helper): New static function.
824 (pthread_key_delete): Use the new thread manager
825 REQ_FOR_EACH_THREAD function to iterate over the threads and set
826 the delete key slot to a null value in each thread.
827 * Examples/ex18.c: New test.
828 * Makefile (tests): Add ex18.
830 2001-11-22 Wolfram Gloger <wg@malloc.de>
832 * pthread.c (pthread_onexit_process): Don't call free
833 after threads have been asynchronously terminated.
835 * manager.c (pthread_handle_exit): Surround cancellation
836 of threads with __flockfilelist()/__funlockfilelist().
838 2001-11-26 Andreas Schwab <schwab@suse.de>
840 * manager.c (pthread_handle_create): Start the child thread with
841 the cancel signal blocked, so that it does not handle it before
842 the thread register is set up. Save errno from failed clone call.
844 2001-11-15 Ulrich Drepper <drepper@redhat.com>
846 * sysdeps/i386/i686/Implies: Removed.
847 * sysdeps/i386/i686/Versions: New file.
849 2001-10-31 Andreas Jaeger <aj@suse.de>
851 * sysdeps/x86_64/Makefile: Remove, we do not need it anymore.
853 2001-10-05 Kevin Buettner <kevinb@cygnus.com>
855 * pthread.c (__linuxthread_pthread_sizeof_descr): Change name
856 to __linuxthreads_pthread_sizeof_descr to match name used by
857 symbol_list_arr[LINUXTHREADS_PTHREAD_SIZEOF_DESCR] in
858 linuxthreads_db/td_symbol_list.c.
860 2001-09-22 Andreas Jaeger <aj@suse.de>
862 * linuxthreads/tst-context.c: Avoid compile warning.
864 2001-09-20 Andreas Jaeger <aj@suse.de>
866 * shlib-versions: Add x86-64.
868 2001-09-19 Andreas Jaeger <aj@suse.de>
870 * sysdeps/x86_64/Makefile: New file.
871 * sysdeps/x86_64/pspinlock.c: New file.
872 * sysdeps/x86_64/pt-machine.h: New file.
874 2001-09-12 Jakub Jelinek <jakub@redhat.com>
876 * sysdeps/pthread/timer_delete.c (timer_delete): Thread may be NULL
878 * sysdeps/pthread/timer_settime.c (timer_settime): Likewise.
880 2001-09-11 Ulrich Drepper <drepper@redhat.com>
881 Wolfram Gloger <wg@malloc.de>
883 * join.c: Protect all communications from and to manager with
885 * manager.c: Likewise.
886 * pthread.c: Likewise.
887 * smeaphore.c: Likewise.
889 2001-08-29 Ulrich Drepper <drepper@redhat.com>
891 * spinlock.c (__pthread_lock): Top max_count value with
892 MAX_ADAPTIVE_SPIN_COUNT.
893 * internals.h (MAX_ADAPTIVE_SPIN_COUNT): Define if not already done.
895 * sysdeps/i386/i686/pt-machine.h (BUSY_WAIT_NOP): New macro to
898 2001-08-27 Jakub Jelinek <jakub@redhat.com>
900 * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_t): Only define to
901 non-opaque type if __USE_UNIX98.
903 2001-08-26 Jakub Jelinek <jakub@redhat.com>
905 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_t): Define
906 non-opaque lock types also if _IO_MTSAFE_IO is defined.
908 2001-08-23 Roland McGrath <roland@frob.com>
910 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start): Take
911 new first argument, skip the cleanup handler if it's zero.
912 (_LIBC_LOCK_RECURSIVE_INITIALIZER): New macro.
913 (__libc_lock_define_initialized_recursive): Use it.
914 * sysdeps/pthread/bits/stdio-lock.h: File removed.
915 The sysdeps/generic file from the main tree now suffices.
917 2001-08-22 Roland McGrath <roland@frob.com>
919 * sysdeps/pthread/bits/stdio-lock.h: Include <bits/libc-lock.h>
920 instead of <pthread.h>.
921 (_IO_lock_t): Define this typedef using __libc_lock_define_recursive.
922 (_IO_lock_initializer): Add braces.
923 (_IO_lock_lock): Use __libc_lock_lock_recursive.
924 (_IO_lock_unlock): Use __libc_lock_unlock_recursive.
926 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_recursive_t): New type.
927 (__libc_lock_define_initialized_recursive): Use it.
928 (__libc_lock_init_recursive): Likewise.
929 (__libc_lock_fini_recursive): Likewise.
930 (__libc_lock_lock_recursive): Likewise.
931 (__libc_lock_trylock_recursive): Likewise.
932 (__libc_lock_unlock_recursive): Likewise.
933 (__libc_lock_define_recursive): New macro.
935 2001-08-14 Jakub Jelinek <jakub@redhat.com>
937 * lockfile.c (__pthread_provide_lockfile): New variable.
938 * pthread.c (__pthread_require_lockfile): New variable.
939 * cancel.c (__pthread_require_lockfile): New variable.
941 2001-07-31 Ulrich Drepper <drepper@redhat.com>
943 * tst-context.c (threadfct): Initialize context before calling
946 * Examples/ex17.c: Make sure test thread is around long enough.
948 2001-07-26 kaz Kojima <kkojima@rr.iij4u.or.jp>
950 * sysdeps/sh/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF): Defined.
952 2001-07-24 Ulrich Drepper <drepper@redhat.com>
954 * tst-context.c (main): Print explanation before bailing out
955 because context handling is not supported.
957 2001-07-23 Ulrich Drepper <drepper@redhat.com>
959 * Makefile (tests): Add tst-context.
960 * tst-context.c: New file.
962 * sysdeps/pthread/bits/stdio-lock.h: Define
963 _IO_cleanup_region_start_noarg.
965 2001-07-23 Jakub Jelinek <jakub@redhat.com>
967 * sysdeps/alpha/pt-machine.h (FLOATING_STACKS): Define.
968 (ARCH_STACK_MAX_SIZE): Define.
969 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
970 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
972 2001-07-19 Jakub Jelinek <jakub@redhat.com>
974 * sysdeps/i386/useldt.h: Fix typo in ARCH_STACK_MAX_SIZE comment.
976 * sysdeps/ia64/pt-machine.h (FLOATING_STACKS): Define.
977 (ARCH_STACK_MAX_SIZE): Define.
978 * manager.c (pthread_allocate_stack): Handle FLOATING_STACKS with
979 NEED_SEPARATE_REGISTER_STACK.
981 2001-07-16 Andreas Schwab <schwab@suse.de>
983 * Makefile (before-compile): Don't add $(objpfx)crti.o.
984 (omit-deps): Add crti.
985 ($(objpfx)libpthread.so): Depend on $(objpfx)crti.o, but make sure
986 it is filtered out of the link command.
988 2001-07-16 Ulrich Drepper <drepper@redhat.com>
990 * pthread.c (pthread_initialize): For FLOATING_STACKS don't bother
991 to find the right value for __pthread_initial_thread_bos, it's not
992 used. If not FLOATING_STACKS first run
993 __pthread_init_max_stacksize.
995 2001-06-16 H.J. Lu <hjl@gnu.org>
997 * internals.h: Include <stackinfo.h>.
999 * attr.c: Don't include <stackinfo.h> here.
1000 * cancel.c: Likewise.
1001 * manager.c: Likewise.
1002 * pthread.c: Likewise.
1003 * ptlongjmp.c: Likewise.
1005 2001-03-23 Matthew Wilcox <willy@ldl.fc.hp.com>
1007 * attr.c: Make _STACK_GROWS_UP work.
1008 * internals.h: Likewise.
1009 * manager.c: Likewise.
1010 * pthread.c: Likewise.
1012 2001-06-15 H.J. Lu <hjl@gnu.org>
1014 * pthread.c (__pthread_reset_main_thread): Fix a typo.
1016 2001-02-02 John S. Marvin <jsm@udlkern.fc.hp.com>
1018 * semaphore.h: Use struct _pthread_fastlock as an element of
1019 sem_t instead of an identical struct.
1020 * rwlock.c: Remove casts.
1021 * semaphore.c: Likewise.
1023 2001-04-30 Alan Modra <amodra@one.net.au>
1025 * sysdeps/unix/sysv/linux/hppa/pt-initfini.c: New.
1027 2001-05-25 Bruce Mitchener <bruce@cubik.org>
1029 * linuxthreads.texi: Spelling corrections.
1031 2001-05-25 Ulrich Drepper <drepper@redhat.com>
1033 * oldsemaphore.c (__old_sem_wait): Clear p_nextwaiting before
1034 returning successfully.
1035 Patch by Gene Cooperman <gene@ccs.neu.edu>.
1037 2001-05-24 Ulrich Drepper <drepper@redhat.com>
1039 * spinlock.c (__pthread_lock) [HAS_COMPARE_AND_SWAP]: Before doing any
1040 serious work try once whether the lock is uncontested.
1041 Remove duplicate reading of __status before loop.
1042 Change suggested by Hans Boehm <hans_boehm@hp.com>.
1044 * spinlock.h (__pthread_trylock): Remove need for oldstatus variable.
1045 (__pthread_alt_trylock): Likewise.
1047 2001-05-01 Kaz Kylheku <kaz@ashi.footprints.net>
1049 Memory barrier overhaul following line by line inspection.
1050 * mutex.c (pthread_once): Missing memory barriers added.
1051 * pthread.c (__pthread_wait_for_restart_signal,
1052 __pthread_timedsuspend_new, __pthread_restart_new): Added
1053 memory barriers ``just in case'' and for documentary value.
1054 * spinlock.c (__pthread_release): New inline function for releasing
1055 spinlock, to complement __pthread_acquire. Includes memory
1056 barrier prior to assignment to spinlock, and __asm __volatile
1057 dance to prevent reordering or optimization of the spinlock access.
1058 * spinlock.c (__pthread_unlock, __pthread_alt_lock,
1059 __pthread_alt_timedlock, __pthread_alt_unlock,
1060 __pthread_compare_and_swap): Updated to use new __pthread_release
1061 instead of updating spinlock directly.
1062 * spinlock.c (__pthread_lock, __pthread_unlock, wait_node_alloc,
1063 wait_node_free, wait_node_dequeue, __pthread_alt_lock,
1064 __pthread_alt_timedlock, __pthread_alt_unlock, __pthread_acquire):
1065 Memory barrier overhaul. Lots of missing memory barriers added,
1066 a couple needless ones removed.
1067 * spinlock.c (__pthread_compare_and_swap): testandset optimization
1068 removed, just calls __pthread_acquire, which has the new read
1069 barrier in it before its testandset.
1071 2001-05-20 Roland McGrath <roland@frob.com>
1073 * Makeconfig: New file, variables used to be in main libc Makeconfig.
1075 2001-05-09 Geoff Keating <geoffk@redhat.com>
1077 * sysdeps/powerpc/pt-machine.h
1078 (HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS): Define.
1079 (__compare_and_swap): Remove memory barriers.
1080 (__compare_and_swap_with_release_semantics): New function.
1082 2001-04-24 Andreas Jaeger <aj@suse.de>
1084 * wrapsyscall.c: send* and recv* return ssize_t.
1086 * sysdeps/pthread/timer_getoverr.c (timer_getoverrun): Unlock the
1087 mutex instead of double locking it.
1088 Reported by Pierre Artaud <partaud@sodatec.com>.
1090 2001-04-23 Ulrich Drepper <drepper@redhat.com>
1092 * sysdeps/pthread/getcpuclockid.c: Make function generic, test
1093 using #ifdef whether the clock is available.
1094 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c: Removed.
1096 * sysdeps/ia64/Versions: New file.
1098 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init): We don't
1099 have to call __gmon_start__ in the libpthread DSO.
1100 * sysdeps/pthread/pt-initfini.c (_init): Likewise.
1102 * Makefile (libpthread-routines): Add ptclock_gettime and
1104 * internals.h: Don't use cpuclock-init.h definitions, use
1105 hp-timing.h definitions.
1106 * pthread.c: Likewise.
1107 * manager.c: Likewise.
1108 * ptclock_gettime.c: New file.
1109 * ptclock_settime.c: New file.
1110 * internals.h: Fix parameter type for __pthread_clock_gettime and
1111 __pthread_clock_settime.
1113 * sysdeps/i386/i586/ptclock_gettime.c: Removed.
1114 * sysdeps/i386/i586/ptclock_settime.c: Removed.
1115 * sysdeps/i386/i586/Makefile: Removed.
1117 2001-04-22 Ulrich Drepper <drepper@redhat.com>
1119 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_ASYNCH_IO.
1120 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1122 2001-04-21 Andreas Jaeger <aj@suse.de>
1124 * sysdeps/pthread/timer_routines.c (thread_func): Add noreturn
1125 attribute, remove statements that will never be executed.
1126 (thread_func): Remove mutex_unlock call since it's never executed.
1127 (thread_func): Fix comment as suggested by Jakub Jelinek.
1129 * manager.c (__pthread_manager): Add noreturn
1131 (pthread_start_thread): Likewise, remove return statement.
1132 (pthread_start_thread_event): Likewise.
1133 Add noreturn attribute for pthread_handle_exit.
1134 * weaks.c: Add noreturn attribute for pthread_exit.
1136 * internals.h: Add __pthread_clock_gettime and
1137 __pthread_clock_settime prototypes.
1139 2001-04-21 Ulrich Drepper <drepper@redhat.com>
1141 * internals.h: Include <cpuclock-init.h>.
1142 (struct _pthread_descr_struct): Add p_cpuclock_offset field if
1143 CPUCLOCK_VARDEF is defined.
1144 * pthread.c (__pthread_initialize_minimal): Initialize
1145 p_cpuclock_offset field for main thread if CPUCLOCK_INIT is defined.
1146 * manager.c (pthread_start_thread): Set p_cpuclock_offset field
1147 for new thread to current CPU clock value.
1149 * sysdeps/i386/useldt.h: Extend all the macros to handle 8-byte values.
1151 * sysdeps/i386/i586/Makefile: New file.
1152 * sysdeps/i386/i586/Versions: New file.
1153 * sysdeps/i386/i586/ptclock_gettime.c: New file.
1154 * sysdeps/i386/i586/ptclock_settime.c: New file.
1155 * sysdeps/i386/i686/Implies: New file.
1157 2001-04-18 Jakub Jelinek <jakub@redhat.com>
1159 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: Put specs into
1160 $generated, not $postclean-generated.
1162 2001-04-18 Andreas Jaeger <aj@suse.de>
1164 * Makefile (otherlibs): Added.
1166 2001-04-18 Jakub Jelinek <jakub@redhat.com>
1168 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
1170 2001-04-16 Ulrich Drepper <drepper@redhat.com>
1172 * signals.c (sigwait): NSIG is no signal number. Block all
1173 signals while in signal handler for signals in SET.
1174 Patch by Manfred Spraul <manfred@colorfullife.com>.
1176 2001-04-12 Ulrich Drepper <drepper@redhat.com>
1178 * tst-cancel.c: Disable most tests. Add new test where all
1179 cleanup handlers must run.
1180 * Makefile (tests): Add tst-cancel again.
1182 * cancel.c (__pthread_perform_cleanup): Correct condition for
1183 leaving cleanup loop early.
1185 * sysdeps/i386/Makefile: Make sure gcc uses a frame pointer for
1186 all the files which use CURRENT_STACK_FRAME.
1187 * sysdeps/i386/pt-machine.h (CURRENT_STACK_FRAME): Define using
1188 __builtin_frame_address.
1189 * sysdeps/i386/i686/pt-machine.h: Likewise.
1191 2001-04-11 Ulrich Drepper <drepper@redhat.com>
1193 * Makefile (tests): Comment out tst-cancel for now.
1195 * tst-cancel.c (main): Cleanup 4 is supposed to run. Create
1196 temporary file in object directory.
1197 * Makefile: Don't allow inlining when compiling tst-cancel.c.
1198 Pass $(objpfx) to tst-cancel.
1200 2001-04-11 David S. Miller <davem@redhat.com>
1202 * sysdeps/sparc/sparc32/pt-machine.h (stack_pointer): Advance
1203 up closer to user local variables so that new cleanup heuristics work.
1204 * sysdeps/sparc/sparc64/pt-machine.h (stack_pointer): Likewise.
1206 2001-04-11 Ulrich Drepper <drepper@redhat.com>
1208 * cancel.c (_pthread_cleanup_push): Catch invalid __prev buffer
1210 (_pthread_cleanup_push_defer): Likewise.
1212 * tst-cancel.c (main): Fix loop printing cleanup output.
1214 2001-04-10 kaz Kojima <kkojima@rr.iij4u.or.jp>
1216 * sysdeps/sh/pspinlock.c (__pthread_spin_lock): Fix a reverse
1218 (__pthread_spin_trylock): Likewise.
1219 * sysdeps/sh/pt-machine.h (testandset): Likewise.
1221 2001-04-10 Ulrich Drepper <drepper@redhat.com>
1223 * join.c (pthread_exit): Move code to new function __pthread_do_exit
1224 which takes an extra parameter with the current frame pointer.
1225 Call new function with CURRENT_STACK_FRAME.
1226 (__pthread_do_exit): New function. Call __pthread_perform_cleanup
1227 with the new parameter.
1228 (pthread_join): Call __pthread_do_exit instead of pthread_exit.
1229 * cancel.c (__pthread_perform_cleanup): Takes extra parameter. Use
1230 this parameter as the initial value the cleanup handler records are
1231 compared against. No active cleanup handler record must have an
1232 address lower than the previous one and the initial record must be
1233 above (below on PA) the frame address passed in.
1234 (pthread_setcancelstate): Call __pthread_do_exit instead of
1236 (pthread_setcanceltype): Likewise.
1237 (pthread_testcancel): Likewise.
1238 (_pthread_cleanup_pop_restore): Likewise.
1239 * condvar.c (pthread_cond_wait): Likewise.
1240 (pthread_cond_timedwait_relative): Likewise.
1241 * manager.c (pthread_start_thread): Likewise.
1242 * oldsemaphore.c (__old_sem_wait): Likewise.
1243 * pthread.c (pthread_handle_sigcancel): Likewise.
1244 * semaphore.c (__new_sem_wait): Likewise.
1245 (sem_timedwait): Likewise.
1246 * ptlongjmp.c (pthread_cleanup_upto): Also use current stack frame
1247 to limit the cleanup handlers which get run.
1248 * internals.h: Add prototype for __pthread_do_exit. Adjust prototype
1249 for __pthread_perform_cleanup.
1251 * Makefile (tests): Add tst-cancel.
1252 * tst-cancel.c: New file.
1254 2001-04-08 Hans-Peter Nilsson <hp@axis.com>
1256 * sysdeps/cris/pt-machine.h: New file.
1257 * sysdeps/cris/pspinlock.c: New file.
1259 2001-04-09 Hans-Peter Nilsson <hp@axis.com>
1261 * shlib-versions: Add case for Linux on CRIS.
1263 2001-03-26 Ulrich Drepper <drepper@redhat.com>
1265 * attr.c (pthread_getattr_np): Correct computation of stack size
1266 for machiens with register stack.
1268 * Examples/ex17.c (main): Correct detection of failed mmap call.
1270 2001-03-21 Jakub Jelinek <jakub@redhat.com>
1272 * pthread.c (__pthread_initialize_manager): Fix a typo.
1274 2001-03-21 Jakub Jelinek <jakub@redhat.com>
1276 * attr.c (__pthread_attr_setstack): Fix alignment check.
1277 (pthread_getattr_np): __stackaddr is top of stack, not bottom.
1278 * Makefile (tests): Add ex17 test.
1279 * Examples/ex17.c: New test.
1281 2001-03-20 Ulrich Drepper <drepper@redhat.com>
1283 * Makefile: Define -D_RPC_THREAD_SAFE_ for cancel.c.
1284 * cancel.c (__pthread_perform_cleanup): Call __rpc_thread_destroy.
1285 * sysdeps/pthread/bits/libc-tsd.h: Define _LIBC_TSD_KEY_VARS.
1287 2001-03-18 Ulrich Drepper <drepper@redhat.com>
1289 * Makefile: When generating DSO link with libc_nonshared.a.
1291 2001-02-26 Jakub Jelinek <jakub@redhat.com>
1293 * signals.c (pthread_sighandler): Use CALL_SIGHANDLER.
1295 2001-02-23 Jakub Jelinek <jakub@redhat.com>
1297 * internals.h (__pthread_init_max_stacksize): New prototype.
1298 * attr.c (__pthread_attr_setstacksize): Call
1299 __pthread_init_max_stacksize if not yet initialized.
1300 * pthread.c (__pthread_init_max_stacksize): New function.
1301 (__pthread_initialize_manager): Call it.
1302 Patch by <dtc@cmucl.cons.org>.
1304 2001-03-16 Ulrich Drepper <drepper@redhat.com>
1306 * attr.c (pthread_getattr_np): Fix __stacksize computation for IA-64.
1308 2001-03-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
1310 * shlib-versions: Add rule for Linux on 64 bit S/390.
1311 * sysdeps/s390/s390-64/pt-machine.h: New file.
1312 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
1314 2001-03-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
1316 * sysdeps/s390/pt-machine.h: Move to...
1317 * sysdeps/s390/s390-32/pt-machine.h: ...here.
1318 Add defines for FLOATING_STACK and ARCH_STACK_MAX_SIZE.
1320 2001-03-15 Ulrich Drepper <drepper@redhat.com>
1322 * Versions [libpthread] (GLIBC_2.2.3): Add pthread_getattr_np.
1323 * attr.c: Implement pthread_getattr_np.
1324 * sysdeps/pthread/pthread.h: Add prototype for pthread_getattr_np.
1325 * internals.h (struct _pthread_descr_struct): Add p_inheritsched.
1326 * manager.c (pthread_handle_create): Initialize p_inheritsched.
1328 2001-03-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
1330 * sysdeps/unix/sysv/linux/s390/pt-initfini.c: Use 0x07 padding for
1333 2001-02-20 Hans Boehm <hans_boehm@hp.com>
1335 * manager.c (manager_mask): Removed static vesion. Now always local
1336 to __pthread_manager().
1337 (manager_mask_all): Removed completely.
1338 (__pthread_manager): Remove manager_mask_all initialization.
1339 (pthread_handle_create): Remove code to set and reset signal mask
1340 around __clone2() calls.
1342 2001-02-17 Jakub Jelinek <jakub@redhat.com>
1344 * spinlock.c (__pthread_lock): Force lock->__status to be read from
1345 memory on every spin.
1347 2001-02-10 Andreas Jaeger <aj@suse.de>
1349 * Makefile (extra-objs): New.
1351 2001-02-09 Jakub Jelinek <jakub@redhat.com>
1353 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Add
1354 __pthread_initialize_minimal prototype.
1356 2001-02-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
1358 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
1360 2001-02-06 Martin Schwidefsky <schwidefsky@de.ibm.com>
1362 * sysdeps/unix/sysv/linux/s390/pt-initfini.c: New file.
1364 2001-02-06 Ulrich Drepper <drepper@redhat.com>
1366 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: First attempt to fix the
1367 broken code. Patch by Jes Sorensen.
1369 2001-02-06 Andreas Jaeger <aj@suse.de>
1371 * sysdeps/pthread/pthread.h: Move __pthread_initialize from here
1373 * internals.h: ...here.
1375 2001-02-05 Jes Sorensen <jes@linuxcare.com>
1377 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
1379 2001-02-02 Ulrich Drepper <drepper@redhat.com>
1381 * Versions: Remove __pthread_initialize_minimal.
1383 2001-02-01 Ulrich Drepper <drepper@redhat.com>
1385 * Makefile: Add rules to build crti.o and make it being used in
1386 building libpthread.so.
1387 * sysdeps/i386/Makefile: New file.
1388 * sysdeps/pthread/pt-initfini.c: New file.
1390 * pthread.c: Cleanups.
1392 2001-01-28 Andreas Jaeger <aj@suse.de>
1394 * oldsemaphore.c (__old_sem_init): Adjust for last change.
1395 * sysdeps/pthread/bits/libc-lock.h: Likewise.
1396 * spinlock.c: Likewise.
1398 2001-01-28 Ulrich Drepper <drepper@redhat.com>
1400 * sysdeps/pthread/bits/initspin.h: Make all names namespace clean.
1401 * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: Likewise.
1402 * manager.c: Adjust for namespace cleanup in bits/initspin.h.
1403 * pthread.c: Likewise.
1404 * spinlock.h: Likewise.
1405 * sysdeps/pthread/pthread.h: Likewise.
1407 2001-01-26 Ulrich Drepper <drepper@redhat.com>
1409 * sysdeps/pthread/bits/pthreadtypes.h: Define pthread_attr_t also
1410 as struct __pthread_attr_s.
1412 * semaphore.h (sem_t): Cleanup namespace, rename status and
1415 2001-01-13 Jakub Jelinek <jakub@redhat.com>
1417 * pthread.c (pthread_onexit_process): Clear
1418 __pthread_manager_thread_bos after freeing it.
1419 * Makefile (tests): Add ex16.
1420 * Examples/ex16.c: New file.
1422 2001-01-11 Jakub Jelinek <jakub@redhat.com>
1424 * Makefile (CFLAGS-pthread.c): Pass -DHAVE_Z_NODELETE if ld supports
1426 * pthread.c (pthread_exit_process): Rename to...
1427 (pthread_onexit_process): ...this.
1428 (pthread_atexit_process, pthread_atexit_retcode): New.
1429 (pthread_initialize): Call __cxa_atexit instead of __cxa_on_exit
1430 and only if HAVE_Z_NODELETE is not defined.
1431 (__pthread_initialize_manager): Register pthread_atexit_retcode
1434 2001-01-11 Ulrich Drepper <drepper@redhat.com>
1436 * pthread.c (pthread_initialize): Use __cxs_on_exit not __cxa_atexit.
1438 2001-01-11 Jakub Jelinek <jakub@redhat.com>
1440 * Makefile (tests): Add ex15.
1441 * Examples/ex15.c: New test.
1443 2001-01-08 Ulrich Drepper <drepper@redhat.com>
1445 * pthread.c (pthread_exit_process): Free memory allocated for
1448 2000-12-31 Ulrich Drepper <drepper@redhat.com>
1450 * manager.c (pthread_alloca_stack): Remove MAP_FIXED from mmap calls.
1451 (pthread_free): Always unmap the stack. It's safe now that we don't
1452 use MAP_FIXED to allocate stacks.
1454 2000-12-31 Ulrich Drepper <drepper@redhat.com>
1456 * sysdeps/powerpc/pspinlock.c: Don't include pt-machine.h here.
1458 * manager.c (pthread_allocate_stack): Prepare for removal of MAP_FIXED.
1460 2000-11-15 Wolfram Gloger <wg@malloc.de>
1462 * manager.c (pthread_free): [!FLOATING_STACKS]: Only remap the
1463 stack to PROT_NONE, don't unmap it, avoiding collisions with malloc.
1465 2000-12-27 Andreas Jaeger <aj@suse.de>
1467 * Examples/ex13.c: Make local functions static.
1468 * ecmutex.c: Likewise.
1469 * joinrace.c: Likewise.
1470 * Examples/ex14.c: Likewise.
1472 * Examples/ex2.c: Make local functions static; reformat.
1473 * Examples/ex1.c: Likewise.
1474 * Examples/ex4.c: Likewise.
1475 * Examples/ex5.c: Likewise.
1476 * Examples/ex7.c: Likewise.
1478 * oldsemaphore.c: Add prototypes to shut up GCC.
1479 * pt-machine.c: Likewise.
1481 * weaks.c: Add prototype for pthread_exit.
1483 * internals.h: Add some prototypes, format prototypes and add
1485 Move __libc_waitpid prototype to include/sys/wait.h.
1487 * rwlock.c: Include <bits/libc-lock.h> for prototypes.
1488 * mutex.c: Likewise.
1489 * specific.c: Likewise.
1490 * ptfork.c: Likewise.
1492 * lockfile.c: Include internals.h to get prototypes.
1493 * events.c: Likewise.
1494 * sysdeps/alpha/pspinlock.c: Likewise.
1495 * sysdeps/arm/pspinlock.c: Likewise.
1496 * sysdeps/hppa/pspinlock.c: Likewise.
1497 * sysdeps/i386/pspinlock.c: Likewise.
1498 * sysdeps/ia64/pspinlock.c: Likewise.
1499 * sysdeps/m68k/pspinlock.c: Likewise.
1500 * sysdeps/mips/pspinlock.c: Likewise.
1501 * sysdeps/powerpc/pspinlock.c: Likewise.
1502 * sysdeps/s390/pspinlock.c: Likewise.
1503 * sysdeps/sh/pspinlock.c: Likewise.
1504 * sysdeps/sparc/sparc32/pspinlock.c: Likewise.
1505 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: Likewise.
1506 * sysdeps/sparc/sparc64/pspinlock.c: Likewise.
1508 2000-12-27 Ulrich Drepper <drepper@redhat.com>
1510 * attr.c (__pthread_attr_setstack): Fix setting of __stackaddr element.
1511 (__pthread_attr_getstack): Return correct address.
1512 Add warnings for using pthread_attr_getstackaddr and
1513 pthread_attr_setstackaddr.
1515 2000-12-26 Ulrich Drepper <drepper@redhat.com>
1517 * Examples/ex6.c (test_thread): Make static.
1518 * Examples/ex12.c (test_thread): Make static and add noreturn
1521 2000-12-18 Jes Sorensen <jes@linuxcare.com>
1523 * linuxthreads/sysdeps/ia64/pt-machine.h: __compare_and_swap
1524 and compare_and_swap_with_release_semantics returns int not long.
1526 2000-12-17 Andreas Jaeger <aj@suse.de>
1528 * sysdeps/s390/pt-machine.h (testandset): Use long int as return
1530 * sysdeps/arm/pt-machine.h (testandset): Likewise.
1531 * sysdeps/hppa/pt-machine.h (testandset): Likewise.
1532 * sysdeps/m68k/pt-machine.h (testandset): Likewise.
1533 * sysdeps/sh/pt-machine.h (testandset): Likewise.
1534 * sysdeps/sparc/sparc32/pt-machine.h (testandset): Likewise.
1535 * sysdeps/sparc/sparc64/pt-machine.h (testandset): Likewise.
1537 2000-12-17 Ulrich Drepper <drepper@redhat.com>
1539 * sysdeps/i386/pt-machine.h (testandset): Adjust for prototype change.
1540 * sysdeps/i386/i686/pt-machine.h (testandset): Likewise.
1542 2000-12-17 Andreas Jaeger <aj@suse.de>
1544 * internals.h: Add prototypes for testandset and
1545 __compare_and_swap to shut up gcc warnings.
1547 2000-12-06 Wolfram Gloger <wg@malloc.de>
1549 * join.c (pthread_detach): Allow case where the thread has already
1552 2000-12-05 Andreas Jaeger <aj@suse.de>
1554 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Don't set mips2.
1555 * sysdeps/mips/pt-machine.h (testandset): Likewise.
1556 (__compare_and_swap): Likewise.
1557 Patches by Maciej W. Rozycki <macro@ds2.pg.gda.pl>.
1559 2000-11-20 Jakub Jelinek <jakub@redhat.com>
1561 * Examples/ex3.c (main): Cast int to long before casting to void *.
1562 (search): Cast void * to long, not int.
1563 * Examples/ex8.c (main, thread): Similarly.
1564 * Examples/ex11.c (main): Similarly.
1565 * Examples/ex14.c (worker, do_test): Similarly.
1566 * ecmutex.c (worker, do_test): Similarly.
1567 (nlocks): Cast to int.
1569 2000-11-08 Bruce Mitchener <bruce@cubik.org>
1571 * linuxthreads.texi: Add documentation for pthreads attributes
1572 guardsize, stackaddr, stacksize, and stack. Fix typo in previous
1573 patch. Document pthread_[sg]etconcurrency(). Mark
1574 pthread_mutexattr_[sg]ettype() as POSIX rather than GNU.
1576 2000-11-07 Ulrich Drepper <drepper@redhat.com>
1578 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
1580 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1581 Reported by Christopher Yeoh <cyeoh@linuxcare.com.au>.
1583 2000-11-06 Ulrich Drepper <drepper@redhat.com>
1585 * cancel.c (pthread_cancel): Always set p_canceled, even if we are
1586 not doing it right now.
1587 Reported by Kaz Kylheku <kaz@ashi.footprints.net>.
1589 2000-10-30 Ulrich Drepper <drepper@redhat.com>
1591 * Examples/ex4.c (main): Don't use exit() to avoid warning with
1594 2000-10-29 Ulrich Drepper <drepper@redhat.com>
1596 * attr.c (__pthread_attr_setguardsize): Don't round guardsize
1597 here. Reported by Bruce Mitchener <bruce@cubik.org>.
1599 * linuxthreads.texi: Changes terminology to 'type' from 'kind' when
1600 discussing mutexes. (As per the Unix98 name for the API.)
1601 Changes documentation for pthread_mutexattr_setkind_np() and
1602 pthread_mutexattr_getkind_np() over to the Unix98 APIs for the
1603 same: pthread_mutexattr_settype() and pthread_mutexattr_gettype().
1604 Changes references to PTHREAD_MUTEXATTR_FAST_NP to
1605 PTHREAD_MUTEXATTR_ADAPTIVE_NP.
1606 Begins to introduce discussion of the ``timed'' mutex type. This
1607 discussion is currently incomplete.
1608 Patch by Bruce Mitchener <bruce@cubik.org>.
1610 2000-10-26 Kazumoto Kojima <kkojima@rr.iij4u.or.jp>
1611 Yutaka Niibe <gniibe@chroot.org>
1613 * sysdeps/sh/pt-machine.h (testandset): Since the operand of TAS.B
1614 has restrictions, use register.
1616 2000-10-23 Andreas Schwab <schwab@suse.de>
1618 * Examples/ex14.c (TIMEOUT): Override default timeout.
1620 2000-10-16 Ulrich Drepper <drepper@redhat.com>
1622 * specific.c: Protect tsd array modification in thread data
1623 structures by getting the thread lock in pthread_key_delete and
1624 __pthread_destroy_specifics.
1625 Patch by Wolfram Gloger <Wolfram.Gloger@dent.med.uni-muenchen.de>.
1627 2000-10-12 Alan Modra <alan@linuxcare.com.au>
1629 * sysdeps/pthread/bits/initspin.h: New file.
1630 * spinlock.h: Move LOCK_INITIALIZER definition to <bits/initspin.h>.
1631 (__pthread_init_lock): Initialize lock with LT_SPINLOCK_INIT.
1632 (__pthread_alt_init_lock): Likewise.
1633 (__pthread_alt_trylock): Release lock with LT_SPINLOCK_INIT.
1635 2000-10-12 David Huggins-Daines <dhd@linuxcare.com>
1637 * oldsemaphore.c (__old_sem_init): Release lock with
1638 LT_SPINLOCK_INIT, not zero.
1639 * spinlock.c (__pthread_unlock): Likewise.
1640 (__pthread_alt_lock): Likewise.
1641 (__pthread_alt_timedlock): Likewise.
1642 (__pthread_alt_unlock): Likewise.
1643 * sysdeps/pthread/bits/libc-lock.h: Initialize locks with
1644 LT_SPINLOCK_INIT if it is non-zero. Likewise for init-once flags.
1645 * sysdeps/pthread/pthread.h: Include bits/initspin.h. Use
1646 LT_SPINLOCK_INIT do initialize spinlocks not 0.
1648 2000-10-12 David Huggins-Daines <dhd@linuxcare.com>
1650 * shlib-versions: Add version definitions for hppa-linux.
1652 2000-10-12 Alan Modra <alan@linuxcare.com.au>
1654 * sysdeps/hppa/pspinlock.c: New file.
1655 * sysdeps/hppa/pt-machine.h: New file.
1656 * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: New file.
1658 2000-10-05 Jakub Jelinek <jakub@redhat.com>
1660 * mutex.c (__pthread_mutex_destroy): Correct test of
1661 busy mutex for mutexes using alternate fastlocks.
1662 Patch by dtc@cmucl.cons.org.
1664 2000-09-28 Martin Schwidefsksy <schwidefsky@de.ibm.com>
1666 * sysdeps/s390/pt-machine.h: Make %a0 the thread register.
1668 2000-09-28 Ulrich Drepper <drepper@redhat.com>
1670 * mutex.c (__pthread_mutex_unlock): For PTHREAD_MUTEX_RECURSIVE_NP
1671 test for owner first.
1672 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1674 * cancel.c (pthread_cancel): Don't do anything if cancelation is
1677 2000-09-26 Ulrich Drepper <drepper@redhat.com>
1679 * spinlock.h (__pthread_set_own_extricate_if): Optimize a bit.
1680 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1682 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
1683 _POSIX_MONOTONIC_CLOCK.
1685 * spinlock.h (__pthread_set_own_extricate_if): Add back locking
1688 2000-09-20 Andreas Jaeger <aj@suse.de>
1690 * pthread.c [!__ASSUME_REALTIME_SIGNALS]: Make inclusion of
1691 "testrtsig.h" conditional.
1693 2000-09-11 Ulrich Drepper <drepper@redhat.com>
1695 * sysdeps/pthread/pthread.h: Declare pthread_attr_getstack and
1696 pthread_attr_setstack.
1697 * Versions [libpthread] (GLIBC_2.2): Export pthread_attr_getstack and
1698 pthread_attr_setstack.
1699 * attr.c (pthread_attr_getstack, pthread_attr_setstack): New functions.
1701 2000-09-05 Ulrich Drepper <drepper@redhat.com>
1703 * Examples/ex14.c: New file.
1704 * Makefile (tests): Add ex14.
1706 * mutex.c (__pthread_mutex_unlock): Correct test for already unlocked
1707 mutex. Patch by dtc@cmucl.cons.org.
1709 * ecmutex.c: New file.
1710 * Makefile (tests): Add ecmutex.
1712 2000-09-04 H.J. Lu <hjl@gnu.org>
1714 * attr.c (__pthread_attr_setguardsize): Use page_roundup
1715 instead of roundup to round up to the page size.
1717 2000-09-03 Mark Kettenis <kettenis@gnu.org>
1719 * manager.c (pthread_exited): Correctly report event as TD_REAP
1720 instead of TD_DEATH. Fix comments.
1722 2000-09-03 Ulrich Drepper <drepper@redhat.com>
1724 * spinlock.h (testandset): Add cast to avoid warning.
1725 Patch by Franz Sirl <Franz.Sirl-kernel@lauterbach.com>.
1727 2000-09-02 Andreas Jaeger <aj@suse.de>
1729 * sysdeps/pthread/timer_routines.c: Include stdlib.h for abort
1732 2000-09-01 Ulrich Drepper <drepper@redhat.com>
1734 * sysdeps/pthread/bits/stdio-lock.h (_IO_cleanup_region_start):
1735 Fix typo in last patch (_mode -> _flags).
1737 * sysdeps/pthread/bits/stdio-lock.h (_IO_cleanup_region_start):
1738 Provide definition which respects _IO_USER_LOCK flag.
1740 2000-08-30 Ulrich Drepper <drepper@redhat.com>
1742 * manager.c (pthread_allocate_stack): Clear descriptor only if not
1745 2000-08-25 Ulrich Drepper <drepper@redhat.com>
1747 * Makefile: Add rules to build and run unload.
1748 * unload.c: New file.
1750 * pthread.c (pthread_exit_process): Move thread_self use inside `if'.
1752 * sysdeps/pthread/pthread.h
1753 (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Defined.
1754 (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: Defined.
1756 2000-08-24 Andreas Jaeger <aj@suse.de>
1758 * Examples/ex13.c: Include <string.h> for strerror prototype and
1759 <stdlib.h> for abort prototype.
1760 (pthr_cond_signal_mutex): Rewrite to silence GCC.
1761 (thread_start): Remove unused variable err.
1762 (main): Silence GCC warnings.
1764 2000-08-22 Andreas Jaeger <aj@suse.de>
1766 * Examples/ex13.c: New test by Kurt Garloff <garloff@suse.de>.
1768 * Makefile (tests): Add ex13.
1770 2000-08-20 Ulrich Drepper <drepper@redhat.com>
1772 * semaphore.h: Add restrict where required by AGd4.
1773 * sysdeps/pthread/pthread.h: Likewise.
1774 * sysdeps/pthread/unix/sysv/linux/bits/sigthread.h: Likewise.
1776 2000-08-15 Ulrich Drepper <drepper@redhat.com>
1778 * Makefile (tests): Add ex12. Add rule to build it.
1779 * Examples/ex12.c: New file.
1781 2000-08-13 Ulrich Drepper <drepper@redhat.com>
1783 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_SEMAPHORES
1784 even though the implementation is not quite complete (but it reports
1785 it). Define _POSIX_MESSAGE_PASSING to -1.
1786 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1788 2000-08-12 Andreas Jaeger <aj@suse.de>
1790 * sysdeps/mips/pt-machine.h (testandset): Add .set mips2 for
1792 (__compare_and_swap): Likewise.
1793 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Likewise.
1795 2000-08-10 Ulrich Drepper <drepper@redhat.com>
1797 * pthread.c (__pthread_initial_thread): Initialize p_errnop and
1798 p_h_errnop correctly and not to NULL.
1800 2000-08-05 Ulrich Drepper <drepper@redhat.com>
1802 * Banner: Bump version number to 0.9.
1804 2000-08-04 Ulrich Drepper <drepper@redhat.com>
1806 * Makefile (tests): Add tststack. Add rule to build the program.
1807 * tststack.c: New file.
1809 * internals.h: Declare __pthread_max_stacksize.
1810 * pthread.c (__pthread_max_stacksize): New variable.
1811 (__pthread_initialize_manager): Determine __pthread_initialize_manager
1813 * manager.c (thread_segment): Return always NULL if FLOATING_STACKS.
1814 (pthread_allocate_stack): Allow kernel to choose stack address if
1815 FLOATING_STACKS. This also handles variable-sized stacks.
1816 Always allocate stack and guardpage together. Use mprotect to
1817 change guardpage access.
1818 * sysdeps/i386/useldt.h: Define FLOATING_STACKS and
1819 ARCH_STACK_MAX_SIZE.
1821 * attr.c (__pthread_attr_setstacksize): Also test value against
1824 * manager.c (__pthread_nonstandard_stacks): Define only if
1825 THREAD_SELF is not defined.
1826 (pthread_allocate_stack): Always initialize gardaddr to a correct
1828 (pthread_handle_create): Unmap thread with one call.
1829 (pthread_free): Remove test for initial thread before removing stack.
1830 Unmap stack with one call.
1832 * pthread.c (__pthread_initial_thread): Initialize p_userstack to
1833 1 to avoid removing the stack.
1835 2000-07-27 Jes Sorensen <jes@linuxcare.com>
1837 * sysdeps/ia64/pspinlock.c (__pthread_spin_lock): Add
1838 load of spin lock to prime the cache before the atomic compare and
1839 exchange operation (cmpxchg4). This avoids the spinning on the
1840 cmpxchg4 instruction and reduces movement of the cache line back
1841 and forth between the processors (explanation by Asis K. Mallick
1842 from Intel). This basically makes the implementation operate the
1843 same as the Linux kernel implementation.
1845 * shlib-versions: Use GLIBC_2_2 for Linux/ia64.
1846 * sysdeps/ia64/pspinlock.c: New file.
1848 2000-08-03 Ulrich Drepper <drepper@redhat.com>
1850 * pthread.c: Move definition of __pthread_set_own_extricate_if...
1851 * spinlock.h: ...here. Remove locking.
1852 * internals.h: Remove __pthread_set_own_extricate_if prototype.
1854 * rwlock.c: Use THREAD_GETMEM And THREAD_SETMEM.
1855 (rwlock_rd_extricate_func): Don't determine self, let
1856 __pthread_lock do it.
1857 (rwlock_wr_extricate_func): Likewise.
1858 (rwlock_have_already): Optimize *pself handling a bit.
1860 * mutex.c: Use __builtin_expect.
1861 * pthread.c: Likewise.
1863 2000-08-02 Andreas Jaeger <aj@suse.de>
1865 * sysdeps/s390/pspinlock.c: New file.
1866 * sysdeps/s390/pt-machine.h: New file.
1867 Patches by Martin Schwidefsky <schwidefsky@de.ibm.com>.
1869 2000-07-12 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
1871 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Implement for
1873 * sysdeps/mips/pt-machine.h (testandset): Likewise.
1875 2000-07-26 Andreas Jaeger <aj@suse.de>
1877 * pthread.c: Initialize p_sem_avail.
1879 2000-07-25 Ulrich Drepper <drepper@redhat.com>
1881 * internals.h (struct __pthread_descr_struct): Add p_sem_avail.
1882 * semaphore.c: Handle spurious wakeups.
1884 * sysdeps/pthread/pthread.h: Add back PTHREAD_MUTX_FAST_NP as an alias
1885 for PTHREAD_MUTEX_ADAPTIVE_NP for source code compatibility.
1887 * pthread.c (__pthread_set_own_extricate): Use THREAD_GETMEM.
1888 (__pthread_wait_for_restart): Likewise.
1890 * condvar.c (pthread_cond_wait): Also check whether thread is
1891 cancelable before aborting loop.
1892 (pthread_cond_timedwait): Likewise.
1894 * signals.c (pthread_sighandler): Remove special code to restrore
1896 (pthread_sighandler_t): Likewise.
1898 2000-07-25 Mark Kettenis <kettenis@gnu.org>
1900 * internals.h (__RES_PTHREAD_INTERNAL): Remove define.
1901 * pthread.c: Include <resolv.h>.
1902 (_res): Undefine. Add extern declaration.
1904 2000-07-24 Ulrich Drepper <drepper@redhat.com>
1906 * pthread.c (__pthread_initial_thread): Update initializer.
1907 (__pthread_manager_thread): Likewise.
1908 (pthread_initialize): Move setrlimit call to...
1909 (__pthread_initialize_manager): ...here.
1910 (__pthread_reset_main_thread): Reset also soft limit on stack size.
1912 * condvar.c: Handle spurious wakeups. [PR libc/1749].
1913 * internals.h (struct _pthread_descr_struct): Add p_condvar_avail.
1915 2000-07-21 Ulrich Drepper <drepper@redhat.com>
1917 * spinlock.h: If IMPLEMENT_TAS_WITH_CAS is defined use
1918 __compare_and_swap to define testandset.
1919 * sysdeps/powerpc/pt-machine.h: Add volatile to asms.
1920 Define IMPLEMENT_TAS_WITH_CAS.
1922 2000-07-20 Ulrich Drepper <drepper@redhat.com>
1924 * Makefile: Pass -z nodelete to linker for libpthread.so
1925 generation if it understand this option.
1927 2000-07-18 Mark Kettenis <kettenis@gnu.org>
1929 * manager.c (pthread_handle_create): Remove initialization of
1930 new_thread->p_res._sock.
1932 2000-07-19 Kaz Kylheku <kaz@ashi.footprints.net>
1934 Bugfixes to the variant of the code for machines with no compare
1937 * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Wait
1938 node was not being properly enqueued, due to failing to update
1939 the lock->__status field.
1941 * spinlock.c (__pthread_alt_timedlock): The oldstatus variable was
1942 being set inappropriately, causing the suspend function to be called
1943 with a null self pointer and crash.
1945 2000-07-18 Ulrich Drepper <drepper@redhat.com>
1947 * spinlock.h (__pthread_alt_trylock): Fix code used if no
1948 compare&swap is available.
1950 * spinlock.h (__pthread_trylock): Use __compare_and_swap, not
1953 * pthread.c (pthread_initialize): Don't use sysconf to determine
1954 whether the machine has more than one processor.
1956 * spinlock.c (__pthread_alt_timedlock): Add back one of the
1957 removed thread_self calls.
1959 2000-07-18 Kaz Kylheku <kaz@ashi.footprints.net>
1961 * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Changed
1962 __compare_and_swap to compare_and_swap in code which assumes
1963 compare swap is available.
1965 2000-07-18 Kaz Kylheku <kaz@ashi.footprints.net>
1967 * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Fixed
1968 bug whereby thr field of waitnode structure would not be correctly
1969 set unless a null self pointer is passed to the functions.
1970 Eliminated redundant calls to thread_self().
1972 2000-07-18 Jakub Jelinek <jakub@redhat.com>
1974 * pthread.c (__pthread_initialize_manager): Lock
1975 __pthread_manager_thread.p_lock before calling clone.
1977 2000-05-05 H.J. Lu <hjl@gnu.org>
1979 * sysdeps/ia64/pt-machine.h (__compare_and_swap): Change it to
1980 have acquire semantics.
1981 (__compare_and_swap_with_release_semantics): New inline
1983 (HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS): New macro.
1985 2000-01-28 Hans Boehm <hboehm@exch.hpl.hp.com>
1987 * manager.c: Fix the problem with signals at startup.
1988 Change the way that thread stacks are allocated on IA64.
1989 Clean up some of the guard page allocation stuff.
1991 1999-12-19 H.J. Lu <hjl@gnu.org>
1993 * internals.h (page_roundup): New.
1994 * attr.c (__pthread_attr_setguardsize); Use page_roundup
1996 * manager.c (pthread_allocate_stack): Make sure guardaddr is
1997 page aligned with page_roundup if NEED_SEPARATE_REGISTER_STACK
2000 1999-12-17 Hans Boehm <hboehm@exch.hpl.hp.com>
2002 * manager.c (pthread_allocate_stack): Unmap the stack top
2003 if failed to map the stack bottom.
2005 (pthread_free): Fix the guard page.
2007 * pthread.c (pthread_initialize): Set rlimit correctly for
2008 NEED_SEPARATE_REGISTER_STACK.
2010 1999-12-16 H.J. Lu <hjl@gnu.org>
2012 * pthread.c (__pthread_initialize_manager): Pass
2013 __pthread_manager_thread_bos instead of
2014 __pthread_manager_thread_tos to __clone2.
2016 1999-12-16 H.J. Lu <hjl@gnu.org>
2018 * manager.c (pthread_allocate_stack): Correct the calculation
2019 of "new_thread_bottom". Remove MAP_GROWSDOWN from mmap for
2022 1999-12-13 H.J. Lu <hjl@gnu.org>
2024 * sysdeps/ia64/pt-machine.h (__compare_and_swap): Added a stop
2025 bit after setting ar.ccv.
2027 1999-12-12 H.J. Lu <hjl@gnu.org>
2029 * manager.c (pthread_allocate_stack): Make the starting
2030 address of the stack bottom page aligned. FIXME: it may
2031 need changes in other places.
2032 (pthread_handle_create): Likewise.
2034 1999-12-11 Hans Boehm <hboehm@exch.hpl.hp.com>
2036 * manager.c (pthread_allocate_stack): Handle
2037 NEED_SEPARATE_REGISTER_STACK.
2038 (pthread_handle_create): Likewise.
2039 * pthread.c (__pthread_initialize_manager): Likewise.
2041 * sysdeps/ia64/pt-machine.h: Use r13 for thread pointer.
2043 1999-12-02 H.J. Lu <hjl@gnu.org>
2045 * sysdeps/ia64/pt-machine.h: New.
2047 2000-07-13 Ulrich Drepper <drepper@redhat.com>
2049 * wrapsyscall.c: Mark non-__ protected names as weak.
2052 2000-07-12 Bruno Haible <haible@clisp.cons.org>
2054 * Examples/ex8.c: Include <sys/wait.h>, not <wait.h>.
2056 2000-07-12 Ulrich Drepper <drepper@redhat.com>
2058 * spinlock.c: Fix code for TEST_FOR_COMPARE_AND_SWAP being defined.
2059 Add tests also to new alternative spinlock implementation.
2060 * spinlock.h: Likewise.
2061 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2063 2000-07-06 Ulrich Drepper <drepper@redhat.com>
2065 * Version: Export __sigaction.
2066 * signals.c: Define __sigaction alias. Use __libc_sigaction instead
2068 * pthread.c: Use __libc_sigaction instead of __sigaction.
2070 * condvar.c: Implement pthread_condattr_getpshared and
2071 pthread_condattr_setpshared.
2072 * mutex.c: Implement pthread_mutexattr_getpshared and
2073 pthread_mutexattr_setpshared.
2074 * Versions: Export new functions.
2075 * sysdeps/pthread/pthread.h: Add prototypes for new functions.
2077 * rwlock.c (pthread_rwlockattr_init): Use PTHREAD_PROCESS_PRIVATE.
2078 (pthread_rwlockattr_setpshared): Fail if PTHREAD_PROCESS_PRIVATE
2081 2000-07-04 Greg McGary <greg@mcgary.org>
2083 * sysdeps/pthread/bits/libc-lock.h: Remove BP_SYM from
2084 pragmas. Include bp-sym.h only if _LIBC.
2086 2000-07-04 Ulrich Drepper <drepper@redhat.com>
2088 * spinlock.c (__pthread_unlock): Properly place write barrier.
2089 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2091 2000-07-03 Ulrich Drepper <drepper@redhat.com>
2093 * spinlock.c: Replace fast spinlocks by adaptive spinlocks which are
2094 faster on SMP systems. No more emulation of compare&swap for adaptive
2096 * spinlock.h: Likewise.
2097 * sysdeps/pthread/pthread.h: Shuffle PTHREAD_MUTEX_* values around.
2098 Replace fast with adaptive mutex.
2099 * mutex.c: Rewrite for replacement of fast by adaptive mutex.
2100 * condvar.c: Likewise.
2101 * pthread.c: Define and initialize __pthread_smp_kernel variable.
2102 * internals.h: Declare __pthread_smp_kernel.
2103 * sysdeps/pthread/bits/pthreadtypes.h: Update comment of
2104 _pthread_fastlock structure.
2105 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2107 * pthread.c: Remove initialization to zero from global variables.
2109 2000-06-29 Jakub Jelinek <jakub@redhat.com>
2111 * shlib-versions: Make sparc64 GLIBC_2.2+ only.
2113 2000-06-28 Greg McGary <greg@mcgary.org>
2115 * weaks.c: Wrap BP_SYM () around weak extern declarations of
2116 pthread functions that have pointers in their return+arg signatures.
2118 2000-06-27 Greg McGary <greg@mcgary.org>
2120 * sysdeps/pthread/bits/libc-lock.h: Wrap BP_SYM () around weak
2121 extern declarations of pthread functions that have pointers in
2122 their return+arg signatures.
2124 2000-06-26 Ulrich Drepper <drepper@redhat.com>
2126 * Makefile (tests): Add ex11. Add rules to build it.
2127 * Examples/ex11.c: New file.
2128 * rwlock.c: Fix complete braindamaged previous try to implement
2131 * spinlock.c: Pretty print.
2133 2000-06-25 Ulrich Drepper <drepper@redhat.com>
2135 * Makefile (tests): Add ex10. Add rules to build it.
2136 * Versions [GLIBC_2.2] (libpthread): Add pthread_mutex_timedlock,
2137 pthread_rwlock_timedrdlock, and pthread_rwlock_timedwrlock.
2138 * condvar.c (pthread_cond_wait): Allow mutex of kind
2139 PTHREAD_MUTEX_TIMED_NP.
2140 (pthread_cond_timedwait_relative): Likewise.
2141 * mutex.c (__pthread_mutex_init): Default is PTHREAD_MUTEX_TIMED_NP.
2142 (__pthread_mutex_trylock): Use __pthread_alt_trylock for
2143 PTHREAD_MUTEX_ERRORCHECK_NP. Handle PTHREAD_MUTEX_TIMED_NP.
2144 (__pthread_mutex_lock): Use __pthread_alt_lock for
2145 PTHREAD_MUTEX_ERRORCHECK_NP. Handle PTHREAD_MUTEX_TIMED_NP.
2146 (__pthread_mutex_timedlock): New function.
2147 (__pthread_mutex_unlock): Use __pthread_alt_unlock for
2148 PTHREAD_MUTEX_ERRORCHECK_NP. Handle PTHREAD_MUTEX_TIMED_NP.
2149 (__pthread_mutexattr_init): Use PTHREAD_MUTEX_TIMED_NP.
2150 (__pthread_mutexattr_settype): Allow PTHREAD_MUTEX_TIMED_NP.
2151 * spinlock.c: Implement alternate fastlocks.
2152 * spinlock.h: Add prototypes.
2153 * Examples/ex10.c: New file.
2154 * sysdeps/pthread/pthread.h: Add prototypes for new functions.
2155 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2157 * rwlock.c (__pthread_rwlock_rdlock): Optimize loop a bit.
2158 (__pthread_rwlock_timedrdlock): New function.
2159 (__pthread_rwlock_timedwrlock): New function.
2160 Use laternate fastlock function everywhere.
2162 2000-06-21 Andreas Jaeger <aj@suse.de>
2164 * sysdeps/pthread/timer_routines.c: Include <string.h> for memset
2167 * join.c: Include <stdlib.h> for exit prototype.
2169 2000-06-20 Ulrich Drepper <drepper@redhat.com>
2171 * sysdeps/i386/useldt.h: Include <stdlib.h>.
2173 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_BARRIERS.
2174 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
2176 * Makefile (libpthread-routines): Add barrier.
2177 (tests): Add ex9. Add rule to build ex9.
2178 * Versions: Export barrier functions.
2179 * barrier.c: New file.
2180 * Examples/ex9.c: New file.
2181 * sysdeps/pthread/pthread.h: Add barrier data types and declarations.
2182 * sysdeps/pthread/bits/pthreadtypes.h: Likewise.
2183 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2185 2000-06-19 H.J. Lu <hjl@gnu.org>
2187 * spinlock.h (HAS_COMPARE_AND_SWAP): Defined if
2188 HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS is defined.
2189 (compare_and_swap_with_release_semantics): New. Default to
2190 compare_and_swap if HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS
2193 * spinlock.c (__pthread_unlock): Call
2194 compare_and_swap_with_release_semantics () instead of
2195 compare_and_swap ().
2197 2000-06-19 Ulrich Drepper <drepper@redhat.com>
2199 * sysdeps/pthread/timer_create.c: Use _set_errno instead of assigning
2201 * sysdeps/pthread/timer_delete.c: Likewise.
2202 * sysdeps/pthread/timer_getoverr.c: Likewise.
2203 * sysdeps/pthread/timer_gettime.c: Likewise.
2204 * sysdeps/pthread/timer_settime.c: Likewise.
2206 2000-06-13 Kaz Kylheku <kaz@ashi.footprints.net>
2208 Timer nodes are now reference counted, and can be marked
2209 as deleted. This allows for the safe release of the global mutex
2210 in the middle without losing the timer being operated on.
2212 * sysdeps/pthread/posix-timer.h (struct timer_node): The inuse
2213 member is now an enum with three values, so that an intermediate
2214 state can be represented (deleted but not free for reuse yet).
2215 New refcount member added.
2216 * sysdeps/pthread/timer_routines.c: Likewise.
2218 * sysdeps/pthread/posix-timer.h (timer_addref, timer_delref,
2219 timer_valid): New inline functions added.
2221 * sysdeps/pthread/timer_gettime.c (timer_gettime): Function
2222 restructured, recursive deadlock bug fixed.
2224 * sysdeps/pthread/timer_gettime.c (timer_gettime): Uses new
2225 timer_addref to ensure that timer won't be deleted while mutex is not
2226 held. Also uses timer_invalid to perform validation of timer handle.
2227 * sysdeps/pthread/timer_settime.c (timer_settime): Likewise.
2228 * sysdeps/pthread/timer_getoverr.c (timer_getoverrun): Likewise.
2230 2000-06-14 Ulrich Drepper <drepper@redhat.com>
2232 * shlib-versions: Add entry for SH.
2233 Patch by Kaz Kojima <kkojima@rr.iij4u.or.jp>.
2235 2000-06-13 Kaz Kylheku <kaz@ashi.footprints.net>
2237 A few optimizations. Got rid of unnecessary wakeups of timer threads,
2238 tightened up some critical regions and micro-optimized some list
2241 * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
2242 Returns int value now to indicate whether timer was queued at head.
2243 * sysdeps/pthread/posix-timer.h: Likewise.
2244 * sysdeps/pthread/timer_settime.c (timer_settime): Takes advantage of
2245 new return value from __timer_thread_queue_timer to avoid waking
2246 up timer thread unnecessarily.
2248 * sysdeps/pthread/posix-timer.h (timer_id2ptr): No longer checks
2249 inuse flag, because this requires mutex to be held. Callers updated
2250 to do the check when they have the mutex.
2251 * sysdeps/pthread/timer_getoverr.c: Add check for inuse here.
2253 * sysdeps/pthread/timer_settime.c (timer_settime): Tighter critical
2254 regions: avoids making system calls while holding timer mutex, and
2255 a few computations were moved outside of the mutex as well.
2256 * sysdeps/pthread/timer_gettime.c (timer_gettime): Likewise.
2258 * sysdeps/pthread/posix-timer.h (list_unlink_ip): Function name changed
2259 to list_unlink_ip, meaning idempotent. Pointer manipulation
2260 changed to get better better code out of gcc.
2261 * sysdeps/pthread/timer_routines.c (list_unlink): Non-idempotent
2262 version of list_unlink added here.
2263 * sysdeps/pthread/timer_delete.c: Use appropriate list unlink
2264 function in all places: idempotent one for timers, non-idempotent
2265 one for thread nodes.
2266 * sysdeps/pthread/timer_settime: Likewise.
2267 * sysdeps/pthread/timer_routines.c: Likewise.
2269 2000-06-13 Ulrich Drepper <drepper@redhat.com>
2271 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_TIMERS): Define.
2272 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
2274 * sysdeps/pthread/Makefile: Remove tests definition.
2276 2000-06-12 Kazumoto Kojima <kkojima@rr.iij4u.or.jp>
2277 Yutaka Niibe <gniibe@chroot.org>
2279 * sysdeps/sh/pspinlock.c: New file.
2280 * sysdeps/sh/pt-machine.h: New file.
2282 2000-06-12 Ulrich Drepper <drepper@redhat.com>
2284 * Makefile (tests): Add joinrace.
2286 * Examples/ex6.c: Test return value of pthread_join.
2288 2000-06-11 Geoff Keating <geoffk@cygnus.com>
2290 * sysdeps/powerpc/pspinlock.c (__pthread_spin_lock): Implement.
2291 (__pthread_spin_trylock): Implement.
2292 (__pthread_spin_unlock): Implement.
2293 (__pthread_spin_init): Implement.
2294 (__pthread_spin_destroy): Implement.
2296 2000-06-10 Ulrich Drepper <drepper@redhat.com>
2298 * sysdeps/pthread/timer_routines.c (list_append): Little fix to
2299 really append the entry.
2301 2000-06-10 Andreas Jaeger <aj@suse.de>
2303 * lockfile.c (__fresetlockfiles): Remove unused variable fp.
2305 2000-06-10 Kaz Kylheku <kaz@ashi.footprints.net>
2307 * sysdeps/pthread/timer_create.c: Thread matching now done on
2308 clock type as well as thread attributes.
2309 There are individual global signal-delivering threads for
2310 different clock types.
2311 * sysdeps/pthread/posix-timer.h: Likewise.
2312 * sysdeps/pthread/timer_routines.c: Likewise.
2314 * sysdeps/pthread/timer_routines.c: Thread allocation and
2315 deallocation function now remembers to put thread on active
2316 list and remove from active list.
2317 Thus now the feature of binding multiple timers
2318 to a single thread actually works.
2320 2000-06-10 Ulrich Drepper <drepper@redhat.com>
2322 * pthread.c (__pthread_create_2_1): Optimize a bit.
2324 * internals.h (invalid_handle): Also test for p_terminated != 0.
2325 (nonexisting_handle): New function. Same as old invalid_handle.
2326 * join.c (pthread_join): Use nonexisting_handle instead of
2327 invalid_handle to test for acceptable thread handle.
2328 * manager.c (pthread_handle_free): Likewise.
2329 * joinrace.c: New file.
2330 Reported by Permaine Cheung <pcheung@cygnus.com>.
2332 2000-06-08 Ulrich Drepper <drepper@redhat.com>
2334 * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
2335 Correct handling of matching variable.
2337 * sysdeps/pthread/tst-timer.c (main): Rewrite initializers to
2340 * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
2341 Be prepared for empty timer list.
2343 * sysdeps/pthread/timer_create.c (timer_create): Correct names of
2344 CPUTIME clock ID. Add support for thread clocks.
2346 * sysdeps/pthread/posix-timer.h (timer_ptr2id): Operands in
2347 subtraction were switched.
2349 * sysdeps/pthread/timer_routines.c (init_module): Use
2350 THREAD_MAXNODES threads.
2352 * sysdeps/pthread/posix-timer.h (struct timer_node): Add creator_pid.
2353 * sysdeps/pthread/timer_create.c: Fill in creator_pid.
2354 * sysdeps/pthread/timer_routines.c (thread_expire_timer): Send signal
2355 with sigqueueinfo is this system call is available.
2357 * sysdeps/pthread/timer_create.c (timer_create): Allow
2358 CLOCK_CPUTIME if _POSIX_CPUTIME is defined.
2360 * sysdeps/pthread/Makefile: New file. Add rules to build timer
2362 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add TIMER_MAX.
2364 2000-06-04 Kaz Kylheku <kaz@ashi.footprints.net>
2366 * sysdeps/pthread/posix-timer.h: New file.
2367 * sysdeps/pthread/timer_create.c: New file.
2368 * sysdeps/pthread/timer_delete.c: New file.
2369 * sysdeps/pthread/timer_getoverr.c: New file.
2370 * sysdeps/pthread/timer_gettime.c: New file.
2371 * sysdeps/pthread/timer_routines.c: New file.
2372 * sysdeps/pthread/timer_settime.c: New file.
2373 * sysdeps/pthread/tst-timer.c: New file.
2375 2000-06-08 Ulrich Drepper <drepper@redhat.com>
2377 * sysdeps/unix/sysv/linux/bits/local_lim.h: Remove OPEN_MAX and
2378 LINK_MAX definitions if necessary.
2380 2000-06-04 Kaz Kylheku <kaz@ashi.footprints.net>
2382 Added missing fork time handling of global libio lock.
2384 * lockfile.c (__fresetlockfiles): Now also resets the list lock,
2385 not just the individual stream locks. Rewritten to use new
2386 iterator interface provided by libio rather than accessing
2389 * lockfile.c (__flockfilelist, _funlockfilelist): New functions
2390 which lock and unlock the stream list using the new interface
2392 * internals.h: Likewise.
2394 * ptfork.c (__fork): Now calls __flockfilelist before fork,
2395 and __funlockfilelist in the parent after the fork.
2396 Child still calls __fresetlockfiles as before.
2398 * linuxthreads.texi: Now explains what happens to streams at
2399 fork time. Also whole new section on forking and thread added.
2400 Definition of pthread_atfork moved out of Miscellaneous Functions
2401 to this new section.
2403 2000-06-04 Jakub Jelinek <jakub@redhat.com>
2405 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c (__pthread_spin_lock):
2406 Add missing register.
2407 * sysdeps/sparc/sparc64/pspinlock.c (__pthread_spin_lock): Likewise.
2409 2000-06-02 Jakub Jelinek <jakub@redhat.com>
2411 * sysdeps/sparc/sparc32/pspinlock.c: Implement spinlocks.
2412 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: New.
2413 * sysdeps/sparc/sparc64/pspinlock.c: Implement spinlocks.
2415 2000-05-31 Andreas Jaeger <aj@suse.de>
2417 * sysdeps/mips/pspinlock.c: Implement spinlocks.
2419 2000-05-28 Ulrich Drepper <drepper@redhat.com>
2421 * spinlock.c (__pthread_lock): Remove ASSERT.
2423 * Makefile (tests): Add ex8.
2424 * Examples/ex8.c: New file.
2426 2000-05-12 Kaz Kylheku <kaz@ashi.footprints.net>
2428 Bugfix: The pthread_atfork mechanism now takes care of its
2429 own internal mutex at fork time.
2431 * ptfork.c (__fork): Revised so that the mutex is held across
2432 the fork operation and while the handlers are called, and so that
2433 the child resets the mutex.
2435 * linuxthreads.texi: Updated pthread_atfork documentation to make
2436 it clear that fork and pthread_atfork can't be reentered from
2437 atfork handlers, that pthread_atfork and fork are mutually atomic,
2438 and that the handlers are inherited by the child process.
2440 2000-05-24 Ulrich Drepper <drepper@redhat.com>
2442 * Makefile (libpthread-routines): Add pspinlock.
2443 * cancel.c: Rename __pthread_spin_unlock back to __pthread_unlock.
2444 Use struct _pthread_fastlock instead of pthread_spinlock_t.
2445 * condvar.c: Likewise.
2446 * internals.h: Likewise.
2448 * manager.c: Likewise.
2449 * mutex.c: Likewise.
2450 * pthread.c: Likewise.
2451 * rwlock.c: Likewise.
2452 * semaphore.c: Likewise.
2453 * signals.c: Likewise.
2454 * spinlock.h: Likewise.
2455 * spinlock.c: Likewise. Remove pthread_spin_lock functions.
2456 * sysdeps/alpha/pspinlock.c: New file.
2457 * sysdeps/arm/pspinlock.c: New file.
2458 * sysdeps/i386/pspinlock.c: New file.
2459 * sysdeps/m68k/pspinlock.c: New file.
2460 * sysdeps/mips/pspinlock.c: New file.
2461 * sysdeps/powerpc/pspinlock.c: New file.
2462 * sysdeps/sparc/sparc32/pspinlock.c: New file.
2463 * sysdeps/sparc/sparc64/pspinlock.c: New file.
2464 * sysdeps/pthread/bits/pthreadtypes.h: Remove pthread_spinlock_t
2465 back to _pthread_fastlock. Define new pthread_spinlock_t.
2467 2000-05-24 Andreas Jaeger <aj@suse.de>
2469 * sysdeps/i386/i686/pt-machine.h: Only use LDT on newer kernels.
2471 2000-05-21 Jakub Jelinek <jakub@redhat.com>
2473 * manager.c (pthread_handle_create): Initialize p_res._sock to -1.
2475 2000-05-13 Jakub Jelinek <jakub@redhat.com>
2477 * internals.h (__RES_PTHREAD_INTERNAL): Define.
2479 2000-05-06 Kaz Kylheku <kaz@ashi.footprints.net>
2481 * mutex.c (pthread_once): IN_PROGRESS state of pthread_once_t
2482 object state is represented with additional bits which distinguish
2483 whether that state was set up in the current process, or
2484 in an ancestor process. If that state was set in an ancestor,
2485 it means that a fork happened while thread was executing the init
2486 function. In that case, the state is reset to NEVER.
2487 * mutex.c (__pthread_once_fork_prepare): New function.
2488 (__pthread_once_fork_child): Likewise
2489 (__pthread_once_fork_parent): Likewise
2490 (__pthread_reset_pthread_once): Removed.
2491 * ptfork.c (__fork): Call new handlers in mutex.c.
2492 * internals.h: Declarations of new mutex.c functions added.
2493 Declaration of removed function deleted.
2494 * linuxthreads.texi: Updated documentation about pthread_once
2495 to clarify what happens under cancellation and forking.
2497 2000-05-06 Kaz Kylheku <kaz@ashi.footprints.net>
2499 * internals.h: New thread manager request type, REQ_KICK.
2500 * join.c (pthread_exit): main thread now calls exit() instead
2501 of _exit() in order to proper process cleanup.
2502 * manager.c (__pthread_manager): Do not terminate manager
2503 after unblocking main thread; wait for main thread's
2504 REQ_PROCESS_EXIT request instead.
2505 Also, added REQ_KICK case to handle new request; this just does
2507 * manager.c (pthread_exited): Do not terminate manager after
2508 unblocking main thread.
2509 * manager.c (__pthread_manager_sighandler): If the main thread
2510 is waiting for all other threads to die, send a REQ_KICK into
2511 the thread manager request pipe to get it to clean out the threads
2512 and unblock the main thread as soon as possible. This fixes
2513 the 2000 millisecond hang on shutdown bug.
2514 * Examples/ex7.c: New file, tests shutdown behavior when all threads
2515 including the main one call pthread_exit(), or implicitly do so.
2516 * Makefile (tests): Add ex7.
2518 2000-05-05 Andreas Jaeger <aj@suse.de>
2520 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
2521 (pthread_getcpuclockid): Correct test for ourselves.
2523 2000-05-05 Ulrich Drepper <drepper@redhat.com>
2525 * internals.h (struct _pthread_descr_struct): Reorganization.
2526 Allocate room for 16 pointers at head of the structure for future
2527 thread-local data handling. Move p_self member in this area.
2528 * manager.c (pthread_handle_create): Adjust use of p_self.
2529 * sysdeps/i386/useldt.h (THREAD_SELF): Likewise.
2530 * pthread.c (__pthread_initial_thread): Adjust initialization.
2531 (__pthread_manager_thread): Likewise.
2533 2000-04-29 Bruno Haible <haible@clisp.cons.org>
2535 * join.c (pthread_exit): Use THREAD_GETMEM_NC instead of THREAD_GETMEM
2536 for eventmask larger than 1 word.
2538 2000-04-27 Ulrich Drepper <drepper@redhat.com>
2540 * Versions [libpthread] (GLIBC_2.2): Add __pthread_initialize_minimal.
2541 * pthread.c (__pthread_initialize_minimal): New function. Perform
2542 minimal initialization.
2543 (pthread_initialize): Remove this code here.
2544 * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h" again. We
2545 are working around the problem in glibc.
2547 2000-04-25 Ulrich Drepper <drepper@redhat.com>
2549 * sysdeps/i386/i686/pt-machine.h: Do not use "../useldt.h" for
2550 now. First gcc must be fixed (more concrete: libgcc).
2552 2000-04-24 Ulrich Drepper <drepper@redhat.com>
2554 * pthread.c: Remove special treatement for interrupt handlers on x86.
2555 * manager.c (pthread_free): Use FREE_THREAD not FREE_THREAD_SELF.
2556 * sysdeps/i386/useldt.h: Use "q" constraint instead of "r" where
2558 * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h".
2560 2000-04-24 Mark Kettenis <kettenis@gnu.org>
2562 * join.c (pthread_exit): Set p_terminated after reporting the
2563 termination event instead of before.
2565 2000-04-20 Jakub Jelinek <jakub@redhat.com>
2567 * sysdeps/pthread/bits/libc-lock.h: Only declare __pthread_rwlock_*
2570 2000-04-18 Andreas Jaeger <aj@suse.de>
2572 * Versions: Use ld instead of ld.so.
2574 2000-04-18 Jakub Jelinek <jakub@redhat.com>
2576 * sysdeps/unix/sysv/linux/sparc/bits/sigcontext.h (struct sigcontext):
2577 Remove the typedef keyword.
2579 2000-04-18 Jakub Jelinek <jakub@redhat.com>
2581 * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Use membar,
2583 (READ_MEMORY_BARRIER): Define.
2584 * spinlock.c (__pthread_spin_unlock): Use READ_MEMORY_BARRIER, not
2586 * internals.h (READ_MEMORY_BARRIER): Define if not defined in sysdep
2589 2000-04-17 Ulrich Drepper <drepper@redhat.com>
2591 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
2592 (pthread_getcpuclockid): Don't compare thread_id with thread_self,
2593 use thread_handle().
2595 2000-04-16 Ulrich Drepper <drepper@redhat.com>
2597 * condvar.c (pthread_cond_timedwait_relative): Don't test for owner
2598 if fast mutex is used. Don't initialize `already_canceled' twice.
2599 Correctly test for return value of timedsuspend.
2601 * pthread.c: Correct long-time braino. We never set SA_SIGINFO and
2602 therefore don't need the _rt versions of the signal handlers.
2604 2000-04-15 Ulrich Drepper <drepper@redhat.com>
2606 * pthread.c (pthread_yield): New function.
2607 * sysdeps/pthread/pthread.h (pthread_yield): Add prototype.
2608 * Versions [libpthread] (GLIBC_2.2): Add pthread_yield.
2609 * internals.h: Declare __pthread_yield.
2611 * pthread.c (pthread_initialize): Avoid a bit more code if
2612 realtime signals are known to exist.
2614 * pthread.c: Is __ASSUME_REALTIME_SIGNALS then avoid generating code
2615 to dynamically detect RT signals and avoid generating compatibility
2616 functions with old kernel.
2617 * restart.h (restart) [__ASSUME_REALTIME_SIGNALS]: Use
2618 __pthread_restart_new directly.
2619 (suspend) [__ASSUME_REALTIME_SIGNALS]: Use
2620 __pthread_wait_for_restart_signal directly.
2621 (timedsuspend) [__ASSUME_REALTIME_SIGNALS]: Use
2622 __pthread_timedsuspend_new directly.
2624 2000-04-15 Ulrich Drepper <drepper@redhat.com>
2626 * condvar.c: Remove all the special code to handle cond_timedwait.
2627 Use timedsuspend instead.
2628 * internals.h: Declare __pthread_timedsuspend_old,
2629 __pthread_timedsuspend_new, and __pthread_timedsuspend.
2630 Remove declaration of __pthread_init_condvar.
2631 * pthread.c: Define __pthread_timedsuspend variable.
2632 (__pthread_timedsuspend_old): New function. Timed suspension
2633 implementation for old Linux kernels.
2634 (__pthread_timedsuspend_new): New function. Timed suspension
2635 implementation for new Linux kernels.
2636 * restart.h (timedsuspend): New function. Call appropriate
2637 suspension function through __pthread_timedsuspend.
2638 * semaphore.c (sem_timedwait): Use timedsuspend, don't duplicate
2640 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2642 * internals.h (WRITE_MEMORY_BARRIER): Define as MEMORY_BARRIER if
2644 * spinlock.c: Use WRITE_MEMORY_BARRIER instead of MEMORY_BARRIER
2646 * sysdeps/alpha/pt-machine.h: Define WRITE_MEMORY_BARRIER.
2647 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
2649 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _POSIX_SPAWN.
2650 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
2652 2000-04-14 Andreas Jaeger <aj@suse.de>
2654 * weaks.c: Fix typo.
2656 * shlib-versions (mips.*-.*-linux.*): Support only GLIBC 2.0 and
2657 2.2 for linuxthreads.
2659 2000-04-13 Ulrich Drepper <drepper@redhat.com>
2661 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
2662 (pthread_getcpuclockid): Fix typo.
2664 2000-04-12 Ulrich Drepper <drepper@redhat.com>
2666 * Makefile (libpthread-routines): Add getcpuclockid.
2667 * Versions [libpthread] (GLIBC_2.2): Add pthread_getcpuclockid.
2668 * sysdeps/pthread/getcpuclockid.c: New file.
2669 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c: New file.
2670 * sysdeps/pthread/pthread.h: Add prototype for pthread_getcpuclockid.
2672 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_SPIN_LOCKS):
2674 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
2676 * sysdeps/pthread/pthread.h: Add prototypes for pthread_spin_init,
2677 pthread_spin_destroy, pthread_spin_lock, pthread_spin_trylock,
2678 and pthread_spin_unlock.
2679 * sysdeps/pthread/bits/pthreadtypes.h: Change struct _pthread_fastlock
2680 into pthread_spinlock_t. Change all uses.
2681 * spinlock.c: Implement pthread_spin_lock.
2682 Rename __pthread_unlock to __pthread_spin_unlock and define weak
2683 alias for real name.
2684 Define pthread_spin_trylock, pthread_spin_init, and
2685 pthread_spin_destroy.
2686 Change all uses of _pthread_fastlock to pthread_spinlock_t.
2687 * spinlock.h: Rename __pthread_unlock to __pthread_spin_unlock.
2688 Change all uses of _pthread_fastlock to pthread_spinlock_t.
2689 * Versions [libpthread] (GLIBC_2.2): Add pthread_spin_init,
2690 pthread_spin_destroy, pthread_spin_lock, pthread_spin_trylock,
2691 and pthread_spin_unlock.
2692 * cancel.c: Use __pthread_spin_unlock instead of __pthread_unlock.
2693 Change all uses of _pthread_fastlock to pthread_spinlock_t.
2694 * condvar.c: Likewise.
2695 * internals.h: Likewise.
2697 * manager.c: Likewise.
2698 * mutex.c: Likewise.
2699 * pthread.c: Likewise.
2700 * rwlock.c: Likewise.
2701 * semaphore.c: Likewise.
2702 * signals.c: Likewise.
2704 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add various new POSIX
2706 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
2708 2000-04-11 Ulrich Drepper <drepper@redhat.com>
2710 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add
2711 _POSIX_SHARED_MEMORY_OBJECTS.
2713 2000-04-11 Andreas Jaeger <aj@suse.de>
2715 * sysdeps/mips/pt-machine.h (MEMORY_BARRIER): Define.
2716 (__compare_and_swap): Mark as modifying memory.
2718 2000-04-11 Geoff Keating <geoffk@cygnus.com>
2720 * sysdeps/powerpc/pt-machine.h (MEMORY_BARRIER): Don't be
2722 (__compare_and_swap): Replace other 'sync' with MEMORY_BARRIER.
2723 Don't have the 'asm' __volatile__.
2725 2000-04-11 Ulrich Drepper <drepper@redhat.com>
2727 * internals.h: Define MEMORY_BARRIER as empty if not defined already.
2728 * spinlock.c (__pthread_lock): Add memory barriers.
2729 (__pthread_unlock): Likewise.
2730 * sysdeps/alpha/pt-machine.h (MEMORY_BARRIER): Define using mb
2732 (RELEASE): Not needed anymore.
2733 (__compare_and_swap): Mark asm as modifying memory.
2734 * sysdeps/powerpc/pt-machine.h (sync): Remove. Replace with definition
2736 (__compare_and_swap): Use MEMORY_BARRIER instead of sync.
2737 * sysdeps/sparc/sparc32/pt-machine.h (RELEASE): Not needed anymore.
2738 (MEMORY_BARRIER): Define using stbar.
2739 * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Define using
2741 (__compare_and_swap): Use MEMORY_BARRIER to ensure ordering.
2742 Patch by Xavier Leroy <Xavier.Leroy@inria.fr> based on comments by
2743 Mike Burrows <m3b@pa.dec.com>.
2745 2000-04-09 Ulrich Drepper <drepper@redhat.com>
2747 * signals.c (sigaction): Fix return value for the case SIG is one
2748 of the signals the implementation uses.
2749 Patch by Xavier.Leroy@inria.fr.
2751 2000-04-01 Andreas Jaeger <aj@suse.de>
2753 * attr.c: Use shlib-compat macros.
2754 * oldsemaphore.c: Likewise.
2755 * pthread.c: Likewise.
2756 * weaks.c: Likewise.
2758 2000-03-26 Ulrich Drepper <drepper@redhat.com>
2760 * semaphore.c (sem_timedwait): New function.
2761 Patch by Carl Mailloux <carlm@oricom.ca>.
2762 * semaphore.h: Declare sem_timedwait.
2763 * Versions [libpthread] (GLIBC_2.2): Add sem_timedwait.
2765 2000-03-26 Roland McGrath <roland@baalperazim.frob.com>
2767 * sysdeps/pthread/Makefile: File removed.
2769 2000-03-23 Ulrich Drepper <drepper@redhat.com>
2771 * mutex.c (__pthread_reset_pthread_once): Reset once_masterlock.
2772 * internals.h (__pthread_reset_pthread_once): Add prototype.
2773 * ptfork.c (__fork): Call __pthread_reset_pthread_once.
2775 * manager.c (pthread_handle_create): Store ID of new thread before
2778 2000-03-21 Ulrich Drepper <drepper@redhat.com>
2780 * attr.c: Use new macros from shlib-compat.h to define versions.
2781 * oldsemaphore.c: Likewise.
2782 * semaphore.c: Likewise.
2783 * weaks.c: Likewise.
2785 * pthread.c: Update for new SHLIB_COMPAT definition.
2787 * manager.c (__pthread_manager): Unmask debug signal.
2789 * pthread.c (pthread_initialize): Test for address of __dso_handle
2790 being NULL, not value. Use __on_exit, not on_exit.
2791 Patch by Andreas Jaeger <aj@suse.de>.
2793 * pthread.c: Use new macros from shlib-compat.h to define versions.
2795 2000-03-19 Ulrich Drepper <drepper@redhat.com>
2797 * pthread.c (pthread_initialize): Instead of on_exit use
2798 __cxa_atexit if __dso_label is available to allow unloading the
2799 libpthread shared library.
2801 2000-03-16 Ulrich Drepper <drepper@redhat.com>
2803 * condvar.c: Make tests for ownership of mutex less strict.
2805 2000-03-14 Ulrich Drepper <drepper@redhat.com>
2807 * condvar.c (pthread_cond_wait): Check whether mutex is owned by
2808 current thread and return error if not.
2809 (pthread_cond_timedwait_relative_old): Likewise.
2810 (pthread_cond_timedwait_relative_new): Likewise.
2812 * mutex.c (__pthread_once): Handle cancelled init function correctly.
2813 (pthread_once_cancelhandler): New function.
2814 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2816 2000-03-14 Andreas Jaeger <aj@suse.de>
2818 * pthread.c (pthread_handle_sigcancel_rt): GS has been renamed to
2820 (pthread_handle_sigrestart_rt): Likewise.
2821 * signals.c (pthread_sighandler_rt): Likewise.
2823 2000-03-02 Andreas Jaeger <aj@suse.de>
2825 * sysdeps/pthread/bits/libc-lock.h: Fix typo.
2826 Reported by Sean Chen <sean.chen@turbolinux.com>.
2828 2000-02-28 Andreas Jaeger <aj@suse.de>
2830 * rwlock.c: Fix typo.
2832 2000-02-27 Ulrich Drepper <drepper@redhat.com>
2834 * rwlock.c: Define __* variants of the functions and make old names
2836 * Versions [GLIBC_2.2]: Export the __pthread_rwlock_* functions.
2837 * sysdeps/pthread/bits/libc-lock.h: Define __libc_rwlock_* macros.
2839 2000-02-25 Andreas Jaeger <aj@suse.de>
2841 * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
2842 pwrite64, lseek64, open64, and __open64 with version 2.2.
2844 2000-02-22 Ulrich Drepper <drepper@redhat.com>
2846 * semaphore.h (SEM_FAILED): Use 0 not NULL.
2848 2000-02-14 Ulrich Drepper <drepper@redhat.com>
2850 * condvar.c (pthread_cond_timedwait_relative_old): Tight loop with
2851 nanosleep does not work either. Get absolute time inside the
2853 (pthread_cond_timedwait_relative_new): Likewise.
2854 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2856 2000-02-13 Andreas Jaeger <aj@suse.de>
2858 * condvar.c (pthread_cond_timedwait_relative_new): Fix last patch.
2859 (pthread_cond_timedwait_relative_old): Likewise.
2861 2000-02-13 Ulrich Drepper <drepper@redhat.com>
2863 * condvar.c (pthread_cond_timedwait_relative_old): Undo last patch
2864 but keep the code around. A bug in the kernel prevent us from
2866 (pthread_cond_timedwait_relative_new): Likewise.
2867 (PR libc/1597 and libc/1598).
2869 2000-02-01 Kaz Kylheku <kaz@ashi.footprints.net>
2871 * condvar.c (pthread_cond_timedwait_relative_old): Do tight
2872 loop around nanosleep calls instead of around most of the function
2873 (pthread_cond_timedwait_relative_new): Likewise.
2874 body. Got rid of backwards goto and one local.
2876 2000-01-31 Ulrich Drepper <drepper@redhat.com>
2878 * condvar.c (pthread_cond_timedwait_relative_old): Recompute time
2879 before every nanosleep call to account for time spent in the rest
2881 (pthread_cond_timedwait_relative_new): Likewise.
2882 Patch by khendricks@ivey.uwo.ca (PR libc/1564).
2884 2000-01-29 Ulrich Drepper <drepper@redhat.com>
2886 * condvar.c (pthread_cond_timedwait_relative_old): Get remaining time
2887 from nanosleep call so that in case we restart we only wait for the
2889 (pthread_cond_timedwait_relative_new): Likewise.
2890 Patch by khendricks@ivey.uwo.ca (PR libc/1561).
2892 2000-01-18 Ulrich Drepper <drepper@cygnus.com>
2894 * manager.c (pthread_allocate_stack): Compute guard page address
2895 correctly. Patch by HJ Lu.
2897 * sysdeps/pthread/pthread.h: Define
2898 PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP.
2900 2000-01-16 Ulrich Drepper <drepper@cygnus.com>
2902 * rwlock.c (pthread_rwlock_unlock): Correct one more problem with
2903 preference handling.
2904 (pthread_rwlockattr_setkind_np): Allow
2905 PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP.
2906 Patches by Kaz Kylheku <kaz@ashi.footprints.net>.
2908 2000-01-12 Ulrich Drepper <drepper@cygnus.com>
2910 * internals.h (pthread_readlock_info): New structure.
2911 (_pthread_descr_struct): Add p_readlock_list, p_readlock_free, and
2912 p_untracked_readlock_count.
2913 * pthread.c (__pthread_initial_thread, pthread_manager_thread):
2914 Add initializers for new fields.
2915 * manager.c (pthread_free): Free read/write lock lists.
2916 * queue.h (queue_is_empty): New function.
2917 * rwlock.c: Implement requirements about when readers should get
2919 * sysdeps/pthread/pthread.h
2920 (PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP): New definition.
2921 * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_rwlock_t):
2922 Define this name as well.
2923 Patches by Kaz Kylheku <kaz@ashi.footprints.net>.
2925 2000-01-05 Ulrich Drepper <drepper@cygnus.com>
2927 * pthread.c (__pthread_initial_thread, pthread_manager_thread):
2928 Adjust initializers for struct _pthread_descr_struct change.
2929 * internals.h (struct _pthread_descr_struct): Move new elements to
2932 2000-01-03 Kaz Kylheku <kaz@ashi.footprints.net>
2934 Redesigned how cancellation unblocks a thread from internal
2935 cancellation points (sem_wait, pthread_join,
2936 pthread_cond_{wait,timedwait}).
2937 Cancellation won't eat a signal in any of these functions
2938 (*required* by POSIX and Single Unix Spec!).
2939 * condvar.c: Spontaneous wakeup on pthread_cond_timedwait won't eat a
2940 simultaneous condition variable signal (not required by POSIX
2941 or Single Unix Spec, but nice).
2942 * spinlock.c: __pthread_lock queues back any received restarts
2943 that don't belong to it instead of assuming ownership of lock
2944 upon any restart; fastlock can no longer be acquired by two threads
2946 * restart.h: Restarts queue even on kernels that don't have
2947 queued real time signals (2.0, early 2.1), thanks to atomic counter,
2948 avoiding a rare race condition in pthread_cond_timedwait.
2950 1999-12-31 Andreas Jaeger <aj@suse.de>
2952 * internals.h: Remove duplicate prototype declarations.
2954 * weaks.c: Remove __THROW from prototypes since the file is not
2955 compiled by a C++ compiler.
2956 * internals.h: Likewise.
2958 1999-12-30 Andreas Jaeger <aj@suse.de>
2960 * sysdeps/pthread/pthread.h: Move internal functions to...
2961 * sysdeps/pthread/bits/libc-lock.h: ...here.
2963 1999-12-29 Andreas Jaeger <aj@suse.de>
2965 * sysdeps/pthread/pthread.h: Fix typos, reformat comments.
2967 1999-12-28 Ulrich Drepper <drepper@cygnus.com>
2969 * sysdeps/alpha/pt-machine.h: Move stack_pointer definition to the
2972 * manager.c (__pthread_start): Add one more cast to prevent
2973 warning on 64bit machines.
2975 1999-12-21 Ulrich Drepper <drepper@cygnus.com>
2977 * manager.c (pthread_handle_create): Set p_pid of new thread
2978 before calling the callback function to report a new thread.
2980 1999-12-20 Andreas Jaeger <aj@suse.de>
2982 * pthread.c (pthread_initialize): Move getrlimit call after
2985 1999-12-18 Ulrich Drepper <drepper@cygnus.com>
2987 * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
2988 pwrite64, lseek64, open64, and __open64.
2989 * wrapsyscall.c: Define pread, __pread64, pread64, pwrite, __pwrite64,
2990 pwrite64, lseek64, open64, and __open64.
2992 * manager.c (pthread_allocate_stack): Correct computation of
2993 new_thread_bottom. Correct handling of stack size and when the
2994 rlimit method to guard for stack growth is used.
2995 * pthread.c (pthread_initialize): Stack limit must be STACK_SIZE
2996 minus one pagesize (not two).
2998 1999-12-03 Andreas Jaeger <aj@suse.de>
3000 * Versions: Add __res_state with version GLIBC_2.2.
3002 * errno.c (__res_state): New function to return thread specific
3005 * pthread.c (pthread_initialize): Initialize p_resp.
3006 (__pthread_reset_main_thread): Also set p_resp.
3008 * manager.c (pthread_handle_create): Initialize p_resp.
3010 * internals.h: Add thread specific resolver state.
3011 Based on patches by Adam D. Bradley <artdodge@cs.bu.edu>.
3013 1999-12-01 Ulrich Drepper <drepper@cygnus.com>
3015 * sysdeps/i386/pt-machine.h: Move stack_pointer definition to the
3017 * sysdeps/i386/i686/pt-machine.h: Likewise.
3018 Patches by Alan Modra <alan@SPRI.Levels.UniSA.Edu.Au>.
3020 1999-11-23 Ulrich Drepper <drepper@cygnus.com>
3022 * manager.c (pthread_start_thread_event): Initialize p_pid already
3025 1999-11-22 Ulrich Drepper <drepper@cygnus.com>
3027 * internals.h: Add prototype for __pthread_manager_event.
3028 * manager.c (__pthread_manager_event): New function.
3029 (pthread_start_thread_event): Correct computation of self.
3030 Use INIT_THREAD_SELF.
3031 * pthread.c (__pthread_manager_thread): Initialize p_lock.
3032 (__pthread_initialize_manager): Respect event flags also for creation
3033 of the manager thread.
3035 1999-11-08 Ulrich Drepper <drepper@cygnus.com>
3037 * pthread.c (__pthread_initialize_manager): Initialize
3038 __pthread_manager_thread.p_tid.
3040 1999-11-02 Ulrich Drepper <drepper@cygnus.com>
3042 * internals.h: Declare __pthread_last_event.
3043 * manager.c: Define __pthread_last_event.
3044 (pthread_handle_create): Set __pthread_last_event.
3045 (pthread_exited): Likewise.
3046 * join.c (pthread_exit): Likewise.
3048 * Makefile (libpthread-routines): Add events.
3049 * events.c: New file.
3050 * internals.h: Protect against multiple inclusion.
3051 Include thread_dbP.h header.
3052 (struct _pthread_descr_struct): Add new fields p_report_events and
3054 Declare event reporting functions.
3055 * join.c (pthread_exit): Signal event if this is wanted.
3056 * manager.c (__pthread_threads_events): New variable.
3057 (pthread_handle_create): Take new parameters with event information.
3058 Signal TD_CREATE event if wanted.
3059 (__pthread_manager): Adjust pthread_handle_create call.
3060 (pthread_start_thread_event): New function. Block until manager is
3061 finished and then call pthread_start_thread.
3062 (pthread_exited): Signal TD_REAP event if wanted.
3064 1999-10-26 Ulrich Drepper <drepper@cygnus.com>
3066 * restart.h (suspend_with_cancellation): Rewrite as a macro.
3068 * condvar.c (pthread_cond_timedwait_relative): Don't mark as inline.
3070 1999-10-25 Andreas Jaeger <aj@suse.de>
3072 * internals.h: Remove K&R compatibility.
3073 * no-tsd.c: Likewise.
3074 * semaphore.h: Likewise.
3075 * signals.c: Likewise.
3076 * sysdeps/pthread/bits/libc-tsd.h: Likewise.
3077 * sysdeps/unix/sysv/linux/bits/sigthread.h: Likewise.
3078 * weaks.c: Likewise.
3080 1999-10-21 Xavier Leroy <Xavier.Leroy@inria.fr>
3082 * pthread.c: For i386, wrap pthread_handle_sigrestart and
3083 pthread_handle_sigcancel with functions that restore %gs from the
3084 signal context. For each signal handling function, two wrappers
3085 are required, one for a non-RT signal and one for a RT signal.
3086 * signal.c: For i386, add code to restore %gs from the signal
3087 context in pthread_sighandler and pthread_sighandler_rt.
3089 1999-10-17 Ulrich Drepper <drepper@cygnus.com>
3091 * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add cast.
3093 1999-10-14 Ulrich Drepper <drepper@cygnus.com>
3095 * pthread.c (__pthread_initial_thread): Pass argument to
3096 PTHREAD_START_ARGS_INITIALIZER.
3097 (__pthread_manager_thread): Likewise.
3099 * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add parameter to
3100 initialize function.
3102 * manager.c (pthread_handle_create): Remove p_startfct initialization.
3104 * internals.h (_pthread_descr_struct): We don't need p_startfct field.
3106 1999-10-12 Ulrich Drepper <drepper@cygnus.com>
3108 * internals.h: Correct return types for __libc_read and __libc_write.
3110 1999-10-09 Andreas Jaeger <aj@suse.de>
3112 * internals.h: Add __new_sem_post to get prototype in
3113 manager.c; include semaphore.h for needed types.
3115 1999-10-08 Ulrich Drepper <drepper@cygnus.com>
3117 * manager.c (__pthread_manager) [REQ_POST]: Use __new_sem_post
3118 directly instead of calling sem_post which should not be necessary
3119 but is faster and might help in some case to work around problems.
3120 Patch by khendricks@ivey.uwo.ca [libc/1382].
3122 1999-10-08 Andreas Schwab <schwab@suse.de>
3124 * sysdeps/pthread/Subdirs: New file.
3127 1999-10-07 Ulrich Drepper <drepper@cygnus.com>
3129 * Implies: New file.
3130 * internals.h (struct _pthread_descr_struct): Add p_startfct.
3131 * manager.c (pthread_handle_create): Initialize p_startfct.
3132 * pthread.c: Define __linuxthread_pthread_sizeof_descr variable.
3134 1999-09-25 Ulrich Drepper <drepper@cygnus.com>
3136 * manager.c (__linuxthreads_pthread_threads_max): New variable.
3137 * specific.c (__linuxthreads_pthread_keys_max): New variable.
3138 (__linuxthreads_pthread_key_2ndlevel_size): New variable.
3140 * condvar.c (pthread_cond_timedwait_relative): Never return with
3141 EINTR. Patch by Andreas Schwab.
3143 1999-09-19 Ulrich Drepper <drepper@cygnus.com>
3145 * signals.c (sigaction): Correct last patch. Don't select
3146 pthread_sighandler_rt based on the signal number but instead of
3147 the SA_SIGINFO flag.
3149 1999-09-23 Ulrich Drepper <drepper@cygnus.com>
3151 * specific.c: Move definitions of struct pthread_key_struct and
3152 destr_function to ...
3153 * internals.h: ...here.
3155 1999-09-18 Ulrich Drepper <drepper@cygnus.com>
3157 * pthread.c (pthread_handle_sigrestart_rt): New function. Use
3158 this instead of pthread_handle_sigrestart if the signal is an RT
3161 * signals.c: Handle passing through of sighandler arguments also
3162 for real-time signals.
3164 1999-09-03 Andreas Schwab <schwab@suse.de>
3166 * ptfork.c (__fork): Renamed from fork and use __libc_fork. Add
3168 (__vfork): New function, alias vfork.
3169 * Versions: Export __fork, vfork, and __vfork in libpthread.
3171 1999-08-23 Andreas Schwab <schwab@suse.de>
3173 * signals.c (pthread_sighandler): Add SIGCONTEXT_EXTRA_ARGS to
3174 call to signal handler.
3176 1999-08-20 Ulrich Drepper <drepper@cygnus.com>
3178 * pthread.c (__pthread_reset_main_thread): Undo last change.
3179 (__pthread_kill_other_threads_np): Reset signal handlers for the
3180 signals we used in the thread implementation here.
3182 1999-08-19 Ulrich Drepper <drepper@cygnus.com>
3184 * pthread.c (__pthread_reset_main_thread): Reset signal handlers
3185 for the signals we used in the thread implementation [PR libc/1234].
3187 * Versions: Export __pthread_kill_other_threads_np from libpthread
3190 * signals.c: Pass sigcontext through wrapper to the user function.
3192 1999-08-01 Ulrich Drepper <drepper@cygnus.com>
3194 * Versions [ld.so] (GLIBC_2.0): Export __libc_internal_tsd_get and
3195 __libc_internal_tsd_set.
3197 1999-07-29 Andreas Jaeger <aj@arthur.rhein-neckar.de>
3199 * manager.c: Remove inclusion of <linux/tasks.h> since it's not
3202 1999-07-16 Andreas Jaeger <aj@arthur.rhein-neckar.de>
3204 * internals.h: Align _pthread_descr_struct to 32 bytes.
3205 Reported by Tim Hockin <thockin@cobaltnet.com>, close PR
3208 1999-07-09 Ulrich Drepper <drepper@cygnus.com>
3210 * oldsemaphore.c (sem_compare_and_swap): Fix use of compare and
3213 1999-07-09 Cristian Gafton <gafton@redhat.com>
3215 * Makefile (libpthread-routines): Add oldsemaphore routine.
3216 * Versions: Add sem_destroy, sem_getvalue, sem_init, sem_post,
3217 sem_trywait, and sem_wait to GLIBC_2.1.
3218 * oldsemaphore.c: New file.
3219 * semaphore.c: Add default_symbol_versions for the changed functions.
3220 (__new_sem_init): Rename from sem_init.
3221 (__new_sem_post): Rename from sem_post.
3222 (__new_sem_wait): Rename from sem_wait.
3223 (__new_sem_trywait): Rename from sem_trywait.
3224 (__new_sem_getvalue): Rename from sem_getvalue.
3225 (__new_sem_destroy): Rename from sem_destroy.
3227 1999-06-23 Robey Pointer <robey@netscape.com>
3229 * internals.h: Added p_nextlock entry to separate queueing for a
3230 lock from queueing for a CV (sometimes a thread queues on a lock
3231 to serialize removing itself from a CV queue).
3232 * pthread.c: Added p_nextlock to initializers.
3233 * spinlock.c: Changed to use p_nextlock instead of p_nextwaiting.
3235 1999-07-09 Ulrich Drepper <drepper@cygnus.com>
3237 * manager.c (pthread_handle_create): Free mmap region after stack
3238 if clone failed. Patch by Kaz Kylheku <kaz@ashi.FootPrints.net>.
3240 1999-05-23 Andreas Jaeger <aj@arthur.rhein-neckar.de>
3242 * man/pthread_cond_init.man: Correct example.
3243 Reported by Tomas Berndtsson <tomas@nocrew.org>.
3245 * linuxthreads.texi (Condition Variables): Likewise.
3247 1999-05-18 Jakub Jelinek <jj@ultra.linux.cz>
3249 * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): Use
3250 casx not cas, also successful casx returns the old value in rd
3251 and not the new value.
3253 1999-05-16 Xavier Leroy <Xavier.Leroy@inria.fr>
3255 * manager.c: If pthread_create() is given a NULL attribute
3256 and the thread manager runs with a realtime policy, set the
3257 scheduling policy of the newly created thread back to SCHED_OTHER.
3258 * manager.c: If the PTHREAD_INHERIT_SCHED attribute is given,
3259 initialize the schedpolicy field of new_thread->p_start_args
3260 to that of the calling thread.
3262 1999-04-29 Ulrich Drepper <drepper@cygnus.com>
3264 * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): cas
3265 instruction does not allow memory element to use offset.
3267 1999-04-28 Ulrich Drepper <drepper@cygnus.com>
3269 * manager.c (pthread_allocate_stack): Optimize initialization of new
3272 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_define_initialized):
3273 Don't use initializer since it is all zeroes.
3274 (__libc_once_define): Likewise.
3276 1999-04-16 Andreas Jaeger <aj@arthur.rhein-neckar.de>
3278 * sysdeps/arm/Implies: Removed since cmpxchg/no-cmpxchg
3279 doesn't exist anymore.
3280 * sysdeps/i386/Implies: Likewise.
3281 * sysdeps/m68k/Implies: Likewise.
3282 * sysdeps/mips/Implies: Likewise.
3283 * sysdeps/powerpc/Implies: Likewise.
3284 * sysdeps/sparc/sparc32/Implies: Likewise.
3285 * sysdeps/sparc/sparc64/Implies: Likewise.
3287 1999-04-15 Ulrich Drepper <drepper@cygnus.com>
3289 * sysdeps/alpha/bits/semaphore.h: Removed.
3290 * sysdeps/powerpc/bits/semaphore.h: Removed.
3291 * sysdeps/pthread/cmpxchg/bits/semaphore.h: Removed.
3292 * sysdeps/pthread/no-cmpxchg/bits/semaphore.h: Removed.
3293 * Makefile (headers): Remove bits/semaphore.h.
3295 * semaphore.h: Define _pthread_descr if necessary.
3296 Don't include limits.h. Define SEM_VALUE_MAX directly.
3298 (sem_t): Protect element names with leading __.
3299 Add declarations for sem_close, sem_open, and sem_unlink.
3300 * semaphore.c: Adjust all functions for new element names.
3301 Define sem_close, sem_open, and sem_unlink.
3302 * Versions (libthread): Add sem_close, sem_open, and sem_unlink for
3304 * sysdeps/pthread/bits/pthreadtypes.h: Define _pthread_descr only if
3307 1999-03-16 H.J. Lu <hjl@gnu.org>
3309 * specific.c (pthread_key_delete): Check th->p_terminated to see
3310 if the thread is running.
3312 * Versions (__libc_internal_tsd_get, __libc_internal_tsd_set):
3313 Added to GLIBC_2.0 for libc.so.
3315 1999-02-12 H.J. Lu <hjl@gnu.org>
3317 * Versions (__libc_current_sigrtmin, __libc_current_sigrtmax,
3318 __libc_allocate_rtsig): Added to GLIBC_2.1.
3320 * internals.h (DEFAULT_SIG_RESTART): Removed.
3321 (DEFAULT_SIG_CANCEL): Removed.
3323 * pthread.c (init_rtsigs, __libc_current_sigrtmin,
3324 __libc_current_sigrtmax, __libc_allocate_rtsig): New functions.
3325 (__pthread_sig_restart, __pthread_sig_cancel,
3326 __pthread_sig_debug): Initialized.
3327 (pthread_initialize): Call init_rtsigs () to initialize
3330 1999-02-03 H.J. Lu <hjl@gnu.org>
3332 * manager.c (__pthread_manager): Do block __pthread_sig_debug.
3333 Don't restart the thread which sent REQ_DEBUG.
3334 (pthread_start_thread): Check if __pthread_sig_debug > 0
3337 * pthread.c (__pthread_initialize_manager): Suspend ourself
3338 after sending __pthread_sig_debug to gdb instead of
3339 __pthread_sig_cancel.
3341 1999-01-24 H.J. Lu <hjl@gnu.org>
3343 * manager.c (__pthread_manager): Delete __pthread_sig_debug
3344 from mask if __pthread_sig_debug > 0.
3345 (pthread_handle_create): Increment __pthread_handles_num.
3347 * manager.c (pthread_handle_create): Don't pass CLONE_PTRACE to clone.
3348 * pthread.c (__pthread_initialize_manager): Likewise.
3350 * pthread.c (pthread_initialize): Use __libc_allocate_rtsig (1)
3351 instead of __libc_allocate_rtsig (2).
3352 (__pthread_initialize_manager): Send __pthread_sig_debug to gdb
3353 instead of __pthread_sig_cancel.
3354 (pthread_handle_sigdebug): Fix comments.
3356 1999-01-21 Ulrich Drepper <drepper@cygnus.com>
3358 * manager.c (pthread_allocate_stack): Set
3359 __pthread_nonstandard_stacks if user-specified stack is used.
3361 1999-01-16 Ulrich Drepper <drepper@cygnus.com>
3363 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _LFS_ASYNCHRONOUS_IO,
3364 _LFS_LARGEFILE, _LFS64_LARGEFILE, and _LFS64_STDIO from Unix98.
3366 1999-01-07 Xavier Leroy <Xavier.Leroy@inria.fr>
3368 * pthread.c: Use a third signal __pthread_sig_debug distinct
3369 from __pthread_sig_cancel to notify gdb when a thread is
3371 * manager.c: Likewise.
3372 * internals.h: Likewise.
3373 * signals.c: The implementation of sigwait(s) assumed that
3374 all signals in s have signal handlers already attached.
3375 This is not required by the standard, so make it work
3376 also if some of the signals have no handlers.
3378 1999-01-05 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
3380 * linuxthreads.texi: Remove pointers from first @node. Move old
3381 @node spec inside comment.
3383 1998-12-31 Ulrich Drepper <drepper@cygnus.com>
3385 * sysdeps/pthread/bits/stdio-lock.h: Define _IO_lock_lock and
3388 1998-12-29 Ulrich Drepper <drepper@cygnus.com>
3390 * semaphore.c (sem_trywait): Don't forget to unlock the semaphore
3391 lock. Patch by Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>.
3393 1998-12-21 Ulrich Drepper <drepper@cygnus.com>
3395 * manager.c: Threads now send __pthread_sig_cancel on termination.
3396 Change clone call and signal masks.
3397 * thread.c (pthread_handle_sigrestart): Remove special code for
3399 (pthread_handle_sigcancel): In manager thread call
3400 __pthread_manager_sighandler.
3401 * sysdeps/i386/pt-machine.h (__compare_and_swap): Add memory clobber.
3402 * sysdeps/i386/i686/pt-machine.h: Likewise.
3403 Patches by Xavier Leroy.
3405 1998-12-14 Ulrich Drepper <drepper@cygnus.com>
3407 * spinlock.c (__pthread_unlock): Don't crash if called for an
3408 untaken mutex. Reported by Ruslan V. Brushkoff <rus@Snif.Te.Net.UA>.
3410 * Examples/ex6.c: Unbuffer stdout and reduce sleep time to reduce
3413 1998-12-13 Ulrich Drepper <drepper@cygnus.com>
3415 * Examples/ex3.c: Wait until all threads are started before
3416 searching for the number to avoid race condition on very fast
3419 1998-12-08 Andreas Jaeger <aj@arthur.rhein-neckar.de>
3421 * sysdeps/pthread/pthread.h: Remove __pthread_setcanceltype
3422 declaration since it's not needed.
3424 * sysdeps/pthread/pthread.h: Move internal functions to ...
3425 * internals.h: ...here.
3427 1998-12-02 H.J. Lu <hjl@gnu.org>
3429 * pthread.c (__pthread_sig_restart): Initiliaze to 0 if
3430 SIGRTMIN is defined.
3431 (__pthread_sig_cancel): Likewise.
3433 1998-12-01 Andreas Jaeger <aj@arthur.rhein-neckar.de>
3435 * wrapsyscall.c: Include <sys/mman.h> for msync,
3436 <stdlib.h> for system and <termios.h> for tcdrain prototype.
3437 Correct msync declaration.
3439 1998-11-29 Roland McGrath <roland@baalperazim.frob.com>
3441 * sysdeps/pthread/bits/libc-tsd.h (__libc_tsd_define, __libc_tsd_get,
3442 __libc_tsd_set): New macros for new interface.
3443 * no-tsd.c: New file, provide uninitialized defns of
3444 __libc_internal_tsd_get and __libc_internal_tsd_set.
3445 * Makefile (routines): Add no-tsd.
3447 1998-10-12 Roland McGrath <roland@baalperazim.frob.com>
3449 * internals.h: Include <bits/libc-tsd.h>, not <bits/libc-lock.h>.
3450 * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
3451 __libc_internal_tsd_set): Move decls to ...
3452 * sysdeps/pthread/bits/libc-tsd.h: New file for __libc_internal_tsd_*
3455 * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
3456 __libc_internal_tsd_set): Make these pointers to functions, not
3457 functions; remove #pragma weak decls for them.
3458 * specific.c (__libc_internal_tsd_get, __libc_internal_tsd_set):
3459 Define static functions and initialized pointers to them.
3461 1998-11-18 Ulrich Drepper <drepper@cygnus.com>
3463 * Makefile (CFLAGS-mutex.c): Define as -D__NO_WEAK_PTHREAD_ALIASES.
3464 (CFLAGS-specific.c): Likewise.
3465 (CFLAGS-pthread.c): Likewise.
3466 (CFLAGS-ptfork.c): Likewise.
3467 (CFLAGS-cancel.c): Likewise.
3468 * sysdeps/pthread/bits/libc-lock.h: Don't mark __pthread_* functions
3469 as weak references if __NO_WEAK_PTHREAD_ALIASES is defined.
3471 * mutex.c (pthread_mutex_init): Define as strong symbol.
3472 (pthread_mutex_destroy): Likewise.
3473 (pthread_mutex_trylock): Likewise.
3474 (pthread_mutex_lock): Likewise.
3475 (pthread_mutex_unlock): Likewise.
3476 (pthread_mutexattr_init): Likewise.
3477 (pthread_mutexattr_destroy): Likewise.
3478 (pthread_once): Likewise.
3479 * ptfork.c (pthread_atfork): Likewise.
3480 * specific.c (pthread_key_create): Likewise.
3481 (pthread_setspecific): Likewise.
3482 (pthread_getspecific): Likewise.
3484 1998-11-15 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
3486 * linuxthreads.texi: Fix punctuation after xref.
3488 1998-11-10 H.J. Lu <hjl@gnu.org>
3490 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine NR_OPEN
3491 if it is defined in <linux/limits.h>.
3493 1998-10-29 14:28 Ulrich Drepper <drepper@cygnus.com>
3495 * spinlock.h (__pthread_trylock): Define inline.
3496 (__pthread_lock): Add extra parameter to declaration. Declare
3497 using internal_function.
3498 (__pthread_unlock): Declare using internal_function.
3499 * spinlock.c (__pthread_lock): Add new parameter. Use it instead
3500 of local variable self. Avoid recomputing self. Define using
3502 (__pthread_trylock): Remove.
3503 (__pthread_unlock): Define using internal_function.
3504 * cancel.c: Adjust for __pthread_lock interface change. Use already
3505 computed self value is possible.
3506 * condvar.c: Likewise.
3508 * manager.c: Likewise.
3509 * mutex.c: Likewise.
3510 * pthread.c: Likewise.
3511 * rwlock.c: Likewise.
3512 * semaphore.c: Likewise.
3513 * signals.c: Likewise.
3515 1998-10-27 13:46 Ulrich Drepper <drepper@cygnus.com>
3517 * sysdeps/pthread/pthread.h (struct _pthread_cleanup_buffer): Prepend
3518 __ to field names of the struct.
3519 * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_fastlock):
3521 (pthread_attr_t): Likewise.
3522 (pthread_cond_t): Likewise.
3523 (pthread_condattr_t): Likewise.
3524 (pthread_mutex_t): Likewise.
3525 (pthread_mutexattr_t): Likewise.
3526 (pthread_rwlock_t): Likewise.
3527 (pthread_rwlockattr_t): Likewise.
3528 * attr.c: Adjust for pthread.h and pthreadtypes.h change.
3529 * cancel.c: Likewise.
3530 * condvar.c: Likewise.
3531 * manager.c: Likewise.
3532 * mutex.c: Likewise.
3533 * pthread.c: Likewise.
3534 * ptlongjmp.c: Likewise.
3535 * rwlock.c: Likewise.
3536 * spinlock.c: Likewise.
3538 1998-10-09 Ulrich Drepper <drepper@cygnus.com>
3540 * sysdeps/i386/pt-machine.h (get_eflags, set_eflags): Mark these
3543 * sysdeps/i386/i686/pt-machine.h: Remove unused inline
3546 * Makefile (libpthread-routines): Add pt-machine.
3547 * pt-machine.c: New file.
3548 * sysdeps/alpha/pt-machine.h: Define PT_EI as extern inline is not
3549 yet defined. Use PT_EI in extern inline definitions.
3550 * sysdeps/arm/pt-machine.h: Likewise.
3551 * sysdeps/i386/pt-machine.h: Likewise.
3552 * sysdeps/i386/i686/pt-machine.h: Likewise.
3553 * sysdeps/m68k/pt-machine.h: Likewise.
3554 * sysdeps/mips/pt-machine.h: Likewise.
3555 * sysdeps/powerpc/pt-machine.h: Likewise.
3556 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
3557 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
3559 1998-10-02 Andreas Jaeger <aj@arthur.rhein-neckar.de>
3561 * semaphore.h: Include <sys/types.h> so that _pthread_descr
3564 1998-09-15 David S. Miller <davem@pierdol.cobaltmicro.com>
3566 * sysdeps/sparc/sparc32/pt-machine.h (INIT_THREAD_SELF): Add nr
3568 * sysdeps/sparc/sparc64/pt-machine.h (INIT_THREAD_SELF): Likewise.
3570 1998-09-12 14:24 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu>
3572 * sysdeps/unix/sysv/linux/bits/sigthread.h: Add multiple inclusion
3575 1998-09-02 11:08 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3577 * signals.c (sigaction): Check that sig is less than NSIG to avoid
3578 array index overflow.
3580 1998-09-06 10:56 Ulrich Drepper <drepper@cygnus.com>
3582 * sysdeps/pthread/semaphore.h: New file.
3584 1998-09-06 09:08 Ulrich Drepper <drepper@cygnus.com>
3586 * sysdeps/pthread/bits/libc-lock.h (enum __libc_tsd_key_t): Add
3587 _LIBC_TSD_KEY_DL_ERROR.
3589 1998-08-31 Ulrich Drepper <drepper@cygnus.com>
3591 * sysdeps/i386/i686/pt-machine.h (testandset): Add memory clobber.
3592 * sysdeps/i386/pt-machine.h: Likewise.
3593 Suggested by Roland McGrath.
3595 1998-08-28 13:58 Ulrich Drepper <drepper@cygnus.com>
3597 * internals.h: Also define THREAD_GETMEM_NC and THREAD_SETMEM_NC to
3598 access thread data with non-constant offsets.
3599 * specific.c: Use THREAD_GETMEM_NC and THREAD_SETMEM_NC where
3602 * sysdeps/i386/useldt.h: Fix typo. Add THREAD_GETMEM_NC and
3603 THREAD_SETMEM_NC definitions.
3605 * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM_NC and
3607 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
3609 1998-08-26 15:46 Ulrich Drepper <drepper@cygnus.com>
3611 * internals.h: Define THREAD_GETMEM and THREAD_SETMEM to default if
3612 not already defined.
3613 (struct _pthread_descr_struct): Add p_self and p_nr field.
3614 * manager.c (__pthread_handles): Define second element to point
3616 (__pthread_handles_num): Initialize to 2.
3617 (__pthread_manager): Use INIT_THREAD_SELF with two arguments.
3618 (pthread_start_thread): Likewise.
3619 (pthread_handle_create): Start search for free slot at entry 2.
3620 Initialize new fields p_self and p_nr.
3621 Call __clone with CLONE_PTRACE if available.
3622 (pthread_free): Call FREE_THREAD_SELF if available.
3623 * pthread.c (__pthread_initial_thread): Initialize new fields.
3624 (__pthread_manager_thread): Likewise.
3625 (__pthread_initialize_manager): Call __clone with CLONE_PTRACE.
3627 * cancel.c: Use THREAD_GETMEM and THREAD_SETMEM to access the
3628 elements of the thread descriptor.
3629 * condvar.c: Likewise.
3630 * errno.c: Likewise.
3632 * manager.c: Likewise.
3633 * pthread.c: Likewise.
3634 * ptlongjmp.c: Likewise.
3635 * semaphore.c: Likewise.
3636 * signals.c: Likewise.
3637 * specific.c: Likewise.
3638 * spinlock.c: Likewise.
3640 * sysdeps/alpha/pt-machine.h (INIT_THREAD_SELF): Add extra parameter.
3642 * sysdeps/i386/useldt.h: New file.
3643 * sysdeps/i386/i686/pt-machine.h: Show how to use this file.
3645 * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM and
3646 THREAD_SETMEM using __thread_self.
3647 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
3649 1998-08-24 Geoff Keating <geoffk@ozemail.com.au>
3651 * spinlock.c (__pthread_lock): Reset p_nextwaiting to NULL if it
3652 turned out that we didn't need to queue after all.
3654 1998-08-22 Geoff Keating <geoffk@ozemail.com.au>
3656 * sysdeps/powerpc/pt-machine.h: Remove testandset, it's not used
3657 and wastes space; correct types.
3659 1998-08-08 11:18 H.J. Lu <hjl@gnu.org>
3661 * signals.c (sigaction): Handle NULL argument.
3663 1998-08-04 Ulrich Drepper <drepper@cygnus.com>
3665 * sysdeps/unix/sysv/linux/bits/sigthread.h: Use __sigset_t instead
3668 1998-08-02 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3670 * Makefile (linuxthreads-version): Extract correct number from
3673 1998-07-29 Xavier Leroy <Xavier.Leroy@inria.fr>
3675 * Banner: Bump version number to 0.8
3676 * FAQ.html: Many updates, in particular w.r.t. debugging.
3677 * manager.c: Support for non-default stacksize for
3678 LinuxThreads-allocated stacks;
3679 don't use guard pages for stacks with default size, rely on
3680 rlimit(RLIMIT_STACK) instead (it's cheaper).
3682 * cancel.c: Use __pthread_sig_cancel and __pthread_sig_restart
3683 everywhere instead of PTHREAD_SIG_CANCEL and PTHREAD_SIG_RESTART.
3684 * condvar.c: Likewise.
3685 * internals.h: Likewise.
3686 * restart.h: Likewise.
3687 * signals.c: Likewise.
3688 * pthread.c: Likewise; set rlimit(RLIMIT_STACK) as we need it.
3690 1998-07-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3692 * weaks.c: Define pthread_mutexattr_[sg]ettype instead of
3693 __pthread_mutexattr_[sg]ettype. Add more weak aliases.
3694 * Versions: Put __pthread_mutexattr_settype under version
3695 GLIBC_2.0. Don't export __pthread_mutexattr_setkind_np and
3696 __pthread_mutexattr_gettype.
3698 1998-07-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3700 * sysdeps/pthread/bits/libc-lock.h: Make
3701 __pthread_mutexattr_settype weak. Don't make
3702 __pthread_mutexattr_setkind_np weak.
3704 1998-07-16 10:52 Ulrich Drepper <drepper@cygnus.com>
3706 * manager.c (pthread_handle_create): Check whether sched_setscheduler
3707 call can succeed here.
3709 * mutex.c: Define __pthread_mutexattr_settype and make
3710 __pthread_mutexattr_setkind_np an alias.
3711 Likewise for __pthread_mutexattr_gettype.
3713 1998-07-15 11:00 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu>
3715 * attr.c (pthread_attr_setschedpolicy): Don't check whether caller
3718 1998-07-14 19:38 Ulrich Drepper <drepper@cygnus.com>
3720 * sysdeps/pthread/bits/libc-lock.h: Define __libc_cleanup_end.
3722 1998-07-11 Andreas Jaeger <aj@arthur.rhein-neckar.de>
3724 * Examples/ex6.c: Include <unistd.h> for usleep.
3726 1998-06-13 11:04 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3728 * Examples/ex4.c (main): Use exit, not pthread_exit.
3730 1998-07-09 13:39 Ulrich Drepper <drepper@cygnus.com>
3732 * Versions: Add __pthread_mutexattr_gettype and
3733 __pthread_mutexattr_settype.
3734 * lockfile.c: Use __pthread_mutexattr_settype instead of
3735 __pthread_mutexattr_setkind_np.
3736 * mutex.c: Define __pthread_mutexattr_gettype and
3737 __pthread_mutexattr_settype.
3739 * sysdeps/pthread/pthread.h: Declare __pthread_mutexattr_gettype and
3740 __pthread_mutexattr_settype.
3741 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_init_recursive):
3742 Use __pthread_mutexattr_settype.
3744 1998-07-08 22:26 Ulrich Drepper <drepper@cygnus.com>
3746 * Versions: Add pthread_mutexattr_gettype, pthread_mutexattr_settype.
3747 * mutex.c: Define weak alias pthread_mutexattr_gettype and
3748 pthread_mutexattr_settype.
3749 * sysdeps/pthread/pthread.h: Declare these functions.
3750 Move pthread_sigmask and pthread_kill declaration in separate header.
3751 * sysdeps/unix/sysv/linux/bits/sigthread.h: New file.
3753 1998-07-07 15:20 Ulrich Drepper <drepper@cygnus.com>
3755 * Makefile: Add rules to compile and run tests.
3756 * Examples/ex1.c: Little changes to fix warnings.
3757 * Examples/ex2.c: Likewise.
3758 * Examples/ex3.c: Likewise.
3759 * Examples/ex4.c: Likewise.
3760 * Examples/ex5.c: Likewise.
3761 * Examples/ex6.c: New file.
3763 1998-07-05 11:54 Ulrich Drepper <drepper@cygnus.com>
3765 * Versions: Add pthread_attr_init to GLIBC_2.1 version in libc.
3767 1998-07-01 Andreas Jaeger <aj@arthur.rhein-neckar.de>
3769 * attr.c: Include <string.h>.
3771 1998-06-30 11:47 Ulrich Drepper <drepper@cygnus.com>
3773 * attr.c: Include errno.h. Use memcpy to copy sched_param.
3774 * internals.h: Include limits.h.
3775 * manager.c: Use memcpy to copy sched_param.
3776 * ptfork.c: Include errno.h.
3777 * pthread.c: Likewise.
3778 * semaphore.c: Likewise.
3779 * specific.c: Likewise.
3780 * spinlock.h: Likewise.
3781 * sysdeps/pthread/pthread.h: Include only allowed headers. Move
3782 type definition to ...
3783 * sysdeps/pthread/bits/pthreadtypes.h: ...here. New file.
3785 1998-06-29 12:34 Ulrich Drepper <drepper@cygnus.com>
3787 * sysdeps/pthread/pthread.h: Use __PMT not __P for function pointers.
3789 * sysdeps/pthread/pthread.h: Define various PTHREAD_* symbols also
3790 as macros as demanded in POSIX.1, Annex C.
3792 1998-06-29 12:29 Ulrich Drepper <drepper@cygnus.com>
3794 * internals.h (struct pthread_request): For free use pthread_t
3795 instead of pthread_descr.
3796 * join.c (pthread_join): Pass thread_id, not th to manager.
3797 (pthread_detach): Likewise.
3798 * manager.c (__pthread_manager): Except thread ID in FREE_REQ case.
3799 (pthread_exited): Remove detached queue code.
3800 (pthread_handle_free): Expect thread ID parameter and use it to
3801 validate the thread decsriptor. Don't use detached queue.
3802 Patches by Xavier Leroy.
3804 1998-06-27 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3806 * libpthread.map: Export accept, longjmp, sigaction, siglongjmp,
3807 _IO_flockfile, _IO_ftrylockfile, _IO_funlockfile,
3808 __pthread_atfork, __pthread_key_create, __pthread_once.
3809 * internals.h: Doc fix.
3810 * pthread.c (__pthread_initialize): Define again.
3812 1998-06-26 Ulrich Drepper <drepper@cygnus.com>
3814 * manager.c (pthread_exited): If thread is not detached put it on
3816 (pthread_handle_free): If thread is not on list with living threads
3817 search on list with detached threads.
3819 * sysdeps/pthread/pthread.h (PTHREAD_RWLOCK_INITIALIZER): Correct
3820 for new definition of pthread_rwlock_t.
3822 * spinlock.c: Correct test whether to compile
3823 __pthread_compare_and_swap or not.
3825 1998-06-25 19:27 Ulrich Drepper <drepper@cygnus.com>
3827 * attr.c: Finish user stack support. Change locking code to be safe
3828 in situations with different priorities.
3829 * cancel.c: Likewise.
3830 * condvar.c: Likewise.
3831 * internals.h: Likewise.
3833 * manager.c: Likewise.
3834 * mutex.c: Likewise.
3835 * pthread.c: Likewise.
3836 * ptlongjmp.c: Likewise.
3837 * queue.h: Likewise.
3838 * rwlock.c: Likewise.
3839 * semaphore.c: Likewise.
3840 * semaphore.h: Likewise.
3841 * signals.c: Likewise.
3842 * spinlock.c: Likewise.
3843 * spinlock.h: Likewise.
3844 * sysdeps/pthread/pthread.h: Likewise.
3845 Patches by Xavier Leroy.
3847 * sysdeps/i386/i686/pt-machine.h: New file.
3849 1998-06-25 Ulrich Drepper <drepper@cygnus.com>
3851 * sysdeps/pthread/pthread.h: Make [sg]et_stacksize and
3852 [sg]et_stackaddr prototypes always available.
3854 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
3855 _POSIX_THREAD_ATTR_STACKSIZE and _POSIX_THREAD_ATTR_STACKADDR.
3857 1998-06-24 Ulrich Drepper <drepper@cygnus.com>
3859 * manager.c (pthread_free): Undo patch from 980430.
3860 Reported by David Wragg <dpw@doc.ic.ac.uk>.
3862 1998-06-09 15:07 Ulrich Drepper <drepper@cygnus.com>
3864 * manager.c: Define __pthread_manager_adjust_prio and use it to
3865 increase priority when needed.
3866 * internals.h: Add prototype for __pthread_manager_adjust_prio.
3867 * mutex.c: Optimize mutexes to wake up only one thread.
3868 * pthread.c: Move PID of manager for global variable in structure
3870 Patches by Xavier Leroy.
3872 1998-06-07 13:47 Ulrich Drepper <drepper@cygnus.com>
3874 * sysdeps/pthread/bits/libc-lock.h: Optimize cleanup handlers a bit.
3876 1998-06-03 Andreas Jaeger <aj@arthur.rhein-neckar.de>
3878 * attr.c: Correct typo.
3880 1998-05-01 Ulrich Drepper <drepper@cygnus.com>
3882 * manager.c (pthread_free): Unmap guard before the stack.
3883 Patch by Matthias Urlichs.
3885 1998-04-30 Ulrich Drepper <drepper@cygnus.com>
3887 * manager.c (pthread_free): Detect already free child.
3888 Patch by Xavier Leroy, reported by Matthias Urlichs.
3890 1998-04-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3892 * Makefile (linuxthreads-version): Renamed back from
3895 1998-04-21 Ulrich Drepper <drepper@cygnus.com>
3897 * ptlongjmp.c: Add prototypes for __libc_siglongjmp and
3900 1998-04-20 14:55 Ulrich Drepper <drepper@cygnus.com>
3902 * Makefile (libpthread-routines): Add ptlongjmp and spinlock.
3903 * internals.h: Add definitions for new spinlock implementation.
3904 * ptlongjmp.c: New file.
3905 * spinlock.c: New file.
3906 * spinlock.h (acquire): Don't reschedule using __sched_yield, use
3907 new function __pthread_acquire to prevent deadlocks with thread
3908 with different priorities.
3909 Patches by Xavier Leroy <Xavier.Leroy@inria.fr>.
3911 1998-03-16 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3913 * manager.c (__pthread_manager): Reduce first argument to select
3914 to include just the needed file descriptor.
3916 1998-03-17 00:06 Ulrich Drepper <drepper@cygnus.com>
3918 * manager.c: Fix last patch which caused core dumps.
3920 * pthread.c: Correctly handle missing SIGRTMIN.
3922 1998-03-15 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3924 * libpthread.map: Add __libc_internal_tsd_get and
3925 __libc_internal_tsd_set. Add missing cancelable functions. Export
3926 libc internal versions of the cancelable functions.
3928 1998-03-13 16:51 Ulrich Drepper <drepper@cygnus.com>
3930 * weaks.c: Define pthread_attr_init as GLIBC_2.0 and GLIBC_2.1.
3932 1998-03-13 00:46 Ulrich Drepper <drepper@cygnus.com>
3934 * attr.c: Implement pthread_attr_[gs]etguardsize,
3935 pthread_attr_[gs]setstackaddr, pthread_attr_[gs]etstacksize.
3936 Change pthread_attr_init to have two interfaces.
3937 * internals.h (struct _pthread_descr_struct): Add new fields for
3939 * libpthread.map: Add names in GLIBC_2.1 section.
3940 * manager.c (pthread_handle_create): Implement guardsize and
3942 (pthread_free): Likewise.
3943 * pthread.c (pthread_create): Add new interface for changed
3945 * sysdeps/pthread/pthread.h: Add prototypes for new functions.
3946 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add definition of
3949 1998-03-11 00:42 Wolfram Gloger <wmglo@dent.med.uni-muenchen.de>
3951 * manager.c: Enable resetting of the thread scheduling policy
3952 to SCHED_OTHER when the parent thread has a different one.
3954 1998-02-01 13:51 Ulrich Drepper <drepper@cygnus.com>
3956 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
3957 _POSIX_ASYNCHRONOUS_IO.
3959 * sysdeps/pthread/pthread.h: Define bits for Unix98 variants of
3961 * mutex.c: Implement new mutex types.
3963 * internals.h: Include <signal.h>.
3965 * libpthread.map: Add __erno_location and __h_errno_location.
3967 * errno.c: Return pointer to variable actually in use. This might
3968 not be the one in the thread structure.
3969 * internals.h (struct _pthread_descr_struct): Add new fields p_errnop
3971 * manager.c (__pthread_manager): Set p_errnop and p_h_errnop member
3972 of manager thread structure.
3973 (pthread_handle_create): Set p_errnop and p_h_errnop members for new
3975 * pthread.c: Adapt initializer for thread structures.
3976 (__pthread_initial_thread): Set p_errnop and p_h_errnop member.
3977 (__pthread_reset_main_thread): Reset p_errnop and p_h_errnop of
3978 current thread to global variables.
3980 1998-01-31 17:27 Ulrich Drepper <drepper@cygnus.com>
3982 * rwlock.c: New file.
3983 * Makefile (libpthread-routines): Add rwlock.
3984 * sysdeps/pthread/pthread.h: Define data structures and declare
3986 * libpthread.map: Add new functions.
3988 1997-12-18 13:50 Philip Blundell <pb@nexus.co.uk>
3990 * sysdeps/arm/pt-machine.h: New file; add ARM support.
3991 * sysdeps/arm/Implies: likewise.
3992 * README: Document it.
3994 1997-12-13 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3996 * signals.c: Remove unneeded initializer for sigwaited, saving a
3999 1997-04-11 01:18 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
4001 * semaphore.c (sem_init): Set sem_spinlock only if available.
4003 1997-12-04 01:48 Ulrich Drepper <drepper@cygnus.com>
4005 * mutex.c: Implement PTHREAD_MUTEX_CHECKERROR.
4006 * sysdeps/pthread/pthread.h: Define PTHREAD_MUTEX_CHECKERROR.
4008 * Makefile: Update from LinuxThreads 0.7.
4009 * internals.h. Likewise.
4010 * manager.c: Likewise.
4011 * mutex.c: Likewise.
4012 * pthread.c: Likewise.
4013 * signals.c: Likewise.
4014 * specific.c: Likewise.
4015 * Examples/ex3.c: Likewise.
4017 1997-11-20 18:13 Ulrich Drepper <drepper@cygnus.com>
4019 * pthread.c (__pthread_reset_main_thread): Close pipe only if still
4022 1997-10-29 05:38 Ulrich Drepper <drepper@cygnus.com>
4024 * wrapsyscall.c: Add socket functions which are also cancelation
4027 1997-10-19 21:40 Wolfram Gloger <wg@wolfram.dent.med.uni-muenchen.de>
4029 * specific.c (__libc_internal_tsd_set, __libc_internal_tsd_get):
4030 New functions for fast thread specific data within libc.
4032 * internals.h: Add new array p_libc_specific to struct
4033 _pthread_descr_struct.
4035 * sysdeps/pthread/bits/libc-lock.h: Declare new functions.
4037 1997-10-13 05:39 Ulrich Drepper <drepper@cygnus.com>
4039 * semaphore.h: Add __BEGIN_DECLS/__END_DECLS.
4040 Reported by Ralf Corsepius <corsepiu@faw.uni-ulm.de>.
4042 1997-08-29 03:05 Ulrich Drepper <drepper@cygnus.com>
4044 * internals.h (struct _pthread_descr_struct): Add definitions for
4045 two-level specific key handling.
4046 * manager.c (pthread_handle_create): Initialize specific memory array.
4047 * specific.c: Implement two-level key handling.
4048 * weaks.c: Don't provide dummy key handling.
4049 * sysdeps/pthread/bits/libc-lock.h: Typedef __libc_lock_t (no #define).
4050 Add definition of __libc_key_t.
4051 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define PTHREAD_KEYS_MAX
4053 Add definition of _POSIX_THREAD_DESTRUCTOR_ITERATIONS and
4054 PTHREAD_DESTRUCTOR_ITERATIONS.
4056 * manager.c (pthread_handle_create): Compare mmap result with
4059 * ptfork.c: Rename to __pthread_atfork and make old name a weak alias.
4060 * sysdeps/pthread/bits/pthread.h: Add prototype for __pthread_atfork.
4062 1997-08-22 19:04 Richard Henderson <rth@cygnus.com>
4064 sysdeps/sparc -> sysdeps/sparc/sparc32
4065 sysdeps/sparc64 -> sysdeps/sparc/sparc64
4067 * internals.h: Change definition of THREAD_SELF to be an expression,
4068 not a statement that did a return.
4069 * sysdeps/alpha/pt-machine.h (THREAD_SELF): Update accordingly.
4070 * sysdeps/sparc/sparc32/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF):
4071 Follow Solaris and use a "system reserved" register (%g6) to hold
4072 the thread descriptor.
4073 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
4075 1997-08-03 00:09 Ulrich Drepper <drepper@cygnus.com>
4077 * mutex.c: Correct pthread_once. Patch by Xavier Leroy.
4078 * sysdeps/pthread/pthread.h: Add prototype for __pthread_once.
4079 * sysdeps/pthread/bits/pthread.h: Add macros for __libc_once.
4081 * semaphore.c: Include spinlock.h only when needed.
4083 * specific.c (__pthread_setsepcific, __pthread_getspecific): Reject
4084 keys for entries not in use.
4086 * weaks.c: Implement key handling functions for real.
4088 1997-06-29 01:04 Richard Henderson <richard@gnu.ai.mit.edu>
4090 Initial sparc64-linux support:
4091 * sysdeps/sparc64/Implies: New file.
4092 * sysdeps/sparc64/pt-machine.h: Likewise.
4094 1997-06-29 00:48 Ulrich Drepper <drepper@cygnus.com>
4096 * semaphore.c: Include spinlock.h at correct place.
4099 1997-06-13 10:06 Richard Henderson <rth@tamu.edu>
4101 The Great Bit File Move:
4102 * sysdeps/alpha/semaphorebits.h: -> .../bits/semaphore.h.
4103 * sysdeps/powerpc/semaphorebits.h: Likewise.
4104 * sysdeps/pthread/cmpxchg/semaphorebits.h: Likewise.
4105 * sysdeps/pthread/no-cmpxchg/semaphorebits.h: Likewise.
4106 * sysdeps/pthread/libc-lock.h: -> bits/
4107 * sysdeps/pthread/stdio-lock.h: Likewise.
4108 * sysdeps/unix/sysv/linux/local_lim.h: Likewise.
4109 * sysdeps/unix/sysv/linux/posix_opt.h: Likewise.
4110 * semaphore.h: Likewise.
4111 * sysdeps/pthread/pthread.h: Likewise.
4113 * lockfile.c: <foo.h> -> <bits/foo.h>.
4114 * semaphore.h: Likewise.
4116 * Makefile: (headers): foo.h -> bits/foo.h.
4117 * sysdeps/pthread/Makefile: Likewise.
4119 1997-04-11 01:18 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
4121 * semaphore.c (sem_init): Set sem_spinlock only if available.
4123 * sysdeps/m68k/pt-machine.h (testandset, __compare_and_swap): Fix
4126 1997-04-09 03:00 Ulrich Drepper <drepper@cygnus.com>
4128 Update from LinuxThreads 0.6.
4130 * attr.c (pthread_attr_getdetachstate): Use __sched_get_priority_max
4131 and __sched_get_priority_min instead of names without `__'.
4133 * manager.c: Rewrite large parts to implement opaque pthread_t.
4135 * cancel.c: Adapt for opaque pthread_t type.
4136 * condvar.c: Likewise.
4137 * errno.c: Likewise.
4139 * mutex.c: Likewise.
4140 * pthread.c: Likewise.
4141 * signals.c: Likewise.
4142 * specific.c: Likewise.
4143 * restart.h: Likewise.
4144 * queue.h: Likewise.
4145 * Examples/ex3.c: Likewise.
4146 * Examples/ex4.c: Likewise.
4147 * sysdeps/pthread/pthread.h: Likewise.
4149 * pthread.c: Accumulate time for all threads in thread manager.
4151 * semaphore.c: Implement fallback implementation for architectures
4152 sometimes missing compare-exchange operations.
4154 * cancel.c (pthread_cancel): Validate handle argument.
4155 * join.c (pthread_join): Likewise.
4156 (pthread_detach): Likewise.
4157 * signals.c (pthread_kill): Likewise.
4159 * spinlock.h (acquire): Use __sched_yield not sched_yield.
4161 * queue.h (enqueue): Enqueue thread according to priority.
4163 * internals.c (struct pthread_start_args): New struct for passing
4164 args to cloning function.
4165 (struct _pthread): Rename to _pthread_descr_struct and adapt for
4168 * Examples/Makefile (clean): Pass -f option to rm.
4170 * sysdeps/i386/pt-machine.h: Add check for compare-exchange instruction
4171 and define TEST_FOR_COMPARE_AND_SWAP.
4172 * sysdeps/i386/i486/pt-machine.h: Removed.
4174 * sysdeps/unix/sysv/linux/local_lim.h (PTHREAD_THREADS_MAX): Increase
4177 1997-04-04 16:38 Ulrich Drepper <drepper@cygnus.com>
4179 * restart.h (suspend): Clear p_signal before suspending.
4180 (suspend_with_cancellation): Likewise.
4181 Patch by Xavier Leroy <Xavier.Leroy@inria.fr>.
4183 * weaks.c: Make __pthread_key_create return 1.
4184 * sysdeps/pthread/libc-lock.h: Define __libc_key_create,
4185 __libc_getspecific, __libc_setspecific, and __libc_key_t.
4186 * sysdeps/pthread/stdio-lock.h: Don't care for implementation not
4189 1997-03-19 15:13 Miguel de Icaza <miguel@nuclecu.unam.mx>
4191 * sysdeps/sparc/pt-machine (RELEASE): Fix.
4193 1997-03-01 07:55 Geoff Keating <geoffk@ozemail.com.au>
4195 * sysdeps/powerpc/Implies: Added.
4196 * sysdeps/powerpc/pt-machine.h: Added.
4197 * sysdeps/powerpc/semaphorebits.h: Added.
4199 1997-01-22 01:22 Ulrich Drepper <drepper@cygnus.com>
4201 * pthread.c (__pthread_initial_thread): Correct
4203 (__pthread_manager_thread): Likewise.
4204 Reported by Andreas Jaeger.
4206 1997-01-18 22:15 Richard Henderson <rth@tamu.edu>
4208 Since sigset_t no longer fits in a register, we can't pass in the
4209 thread's initial mask so easily. Take this opportunity to simplify
4210 the clone implementation by only accepting a single void* argument.
4212 * manager.c (__pthread_manager): Put thread vitals in the thread
4213 struct instead of as arguments through clone.
4214 (pthread_start_thread): Look for them there.
4215 * internals.h (struct _pthread): Add p_initial_fn,
4216 p_initial_fn_arg, p_initial_mask. Fix __pthread_manager proto.
4217 * pthread.c (pthread_initialize_manager): Revise clone invocation.