1 2000-04-15 Ulrich Drepper <drepper@redhat.com>
3 * pthread.c (pthread_yield): New function.
4 * sysdeps/pthread/pthread.h (pthread_yield): Add prototype.
5 * Versions [libpthread] (GLIBC_2.2): Add pthread_yield.
7 * pthread.c (pthread_initialize): Avoid a bit more code if
8 realtime signals are known to exist.
10 * pthread.c: Is __ASSUME_REALTIME_SIGNALS then avoid generating code
11 to dynamically detect RT signals and avoid generating compatibility
12 functions with old kernel.
13 * restart.h (restart) [__ASSUME_REALTIME_SIGNALS]: Use
14 __pthread_restart_new directly.
15 (suspend) [__ASSUME_REALTIME_SIGNALS]: Use
16 __pthread_wait_for_restart_signal directly.
17 (timedsuspend) [__ASSUME_REALTIME_SIGNALS]: Use
18 __pthread_timedsuspend_new directly.
20 2000-04-15 Ulrich Drepper <drepper@redhat.com>
22 * condvar.c: Remove all the special code to handle cond_timedwait.
23 Use timedsuspend instead.
24 * internals.h: Declare __pthread_timedsuspend_old,
25 __pthread_timedsuspend_new, and __pthread_timedsuspend.
26 Remove declaration of __pthread_init_condvar.
27 * pthread.c: Define __pthread_timedsuspend variable.
28 (__pthread_timedsuspend_old): New function. Timed suspension
29 implementation for old Linux kernels.
30 (__pthread_timedsuspend_new): New function. Timed suspension
31 implementation for new Linux kernels.
32 * restart.h (timedsuspend): New function. Call appropriate
33 suspension function through __pthread_timedsuspend.
34 * semaphore.c (sem_timedwait): Use timedsuspend, don't duplicate
36 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
38 * internals.h (WRITE_MEMORY_BARRIER): Define as MEMORY_BARRIER if
40 * spinlock.c: Use WRITE_MEMORY_BARRIER instead of MEMORY_BARRIER
42 * sysdeps/alpha/pt-machine.h: Define WRITE_MEMORY_BARRIER.
43 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
45 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _POSIX_SPAWN.
46 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
48 2000-04-14 Andreas Jaeger <aj@suse.de>
52 * shlib-versions (mips.*-.*-linux.*): Support only GLIBC 2.0 and
55 2000-04-13 Ulrich Drepper <drepper@redhat.com>
57 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
58 (pthread_getcpuclockid): Fix typo.
60 2000-04-12 Ulrich Drepper <drepper@redhat.com>
62 * Makefile (libpthread-routines): Add getcpuclockid.
63 * Versions [libpthread] (GLIBC_2.2): Add pthread_getcpuclockid.
64 * sysdeps/pthread/getcpuclockid.c: New file.
65 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c: New file.
66 * sysdeps/pthread/pthread.h: Add prototype for pthread_getcpuclockid.
68 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_SPIN_LOCKS):
70 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
72 * sysdeps/pthread/pthread.h: Add prototypes for pthread_spin_init,
73 pthread_spin_destroy, pthread_spin_lock, pthread_spin_trylock,
74 and pthread_spin_unlock.
75 * sysdeps/pthread/bits/pthreadtypes.h: Change struct _pthread_fastlock
76 into pthread_spinlock_t. Change all uses.
77 * spinlock.c: Implement pthread_spin_lock.
78 Rename __pthread_unlock to __pthread_spin_unlock and define weak
80 Define pthread_spin_trylock, pthread_spin_init, and
82 Change all uses of _pthread_fastlock to pthread_spinlock_t.
83 * spinlock.h: Rename __pthread_unlock to __pthread_spin_unlock.
84 Change all uses of _pthread_fastlock to pthread_spinlock_t.
85 * Versions [libpthread] (GLIBC_2.2): Add pthread_spin_init,
86 pthread_spin_destroy, pthread_spin_lock, pthread_spin_trylock,
87 and pthread_spin_unlock.
88 * cancel.c: Use __pthread_spin_unlock instead of __pthread_unlock.
89 Change all uses of _pthread_fastlock to pthread_spinlock_t.
90 * condvar.c: Likewise.
91 * internals.h: Likewise.
93 * manager.c: Likewise.
95 * pthread.c: Likewise.
97 * semaphore.c: Likewise.
98 * signals.c: Likewise.
100 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add various new POSIX
102 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
104 2000-04-11 Ulrich Drepper <drepper@redhat.com>
106 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add
107 _POSIX_SHARED_MEMORY_OBJECTS.
109 2000-04-11 Andreas Jaeger <aj@suse.de>
111 * sysdeps/mips/pt-machine.h (MEMORY_BARRIER): Define.
112 (__compare_and_swap): Mark as modifying memory.
114 2000-04-11 Geoff Keating <geoffk@cygnus.com>
116 * sysdeps/powerpc/pt-machine.h (MEMORY_BARRIER): Don't be
118 (__compare_and_swap): Replace other 'sync' with MEMORY_BARRIER.
119 Don't have the 'asm' __volatile__.
121 2000-04-11 Ulrich Drepper <drepper@redhat.com>
123 * internals.h: Define MEMORY_BARRIER as empty if not defined already.
124 * spinlock.c (__pthread_lock): Add memory barriers.
125 (__pthread_unlock): Likewise.
126 * sysdeps/alpha/pt-machine.h (MEMORY_BARRIER): Define using mb
128 (RELEASE): Not needed anymore.
129 (__compare_and_swap): Mark asm as modifying memory.
130 * sysdeps/powerpc/pt-machine.h (sync): Remove. Replace with definition
132 (__compare_and_swap): Use MEMORY_BARRIER instead of sync.
133 * sysdeps/sparc/sparc32/pt-machine.h (RELEASE): Not needed anymore.
134 (MEMORY_BARRIER): Define using stbar.
135 * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Define using
137 (__compare_and_swap): Use MEMORY_BARRIER to ensure ordering.
138 Patch by Xavier Leroy <Xavier.Leroy@inria.fr> based on comments by
139 Mike Burrows <m3b@pa.dec.com>.
141 2000-04-09 Ulrich Drepper <drepper@redhat.com>
143 * signals.c (sigaction): Fix return value for the case SIG is one
144 of the signals the implementation uses.
145 Patch by Xavier.Leroy@inria.fr.
147 2000-04-01 Andreas Jaeger <aj@suse.de>
149 * attr.c: Use shlib-compat macros.
150 * oldsemaphore.c: Likewise.
151 * pthread.c: Likewise.
154 2000-03-26 Ulrich Drepper <drepper@redhat.com>
156 * semaphore.c (sem_timedwait): New function.
157 Patch by Carl Mailloux <carlm@oricom.ca>.
158 * semaphore.h: Declare sem_timedwait.
159 * Versions [libpthread] (GLIBC_2.2): Add sem_timedwait.
161 2000-03-26 Roland McGrath <roland@baalperazim.frob.com>
163 * sysdeps/pthread/Makefile: File removed.
165 2000-03-23 Ulrich Drepper <drepper@redhat.com>
167 * mutex.c (__pthread_reset_pthread_once): Reset once_masterlock.
168 * internals.h (__pthread_reset_pthread_once): Add prototype.
169 * ptfork.c (__fork): Call __pthread_reset_pthread_once.
171 * manager.c (pthread_handle_create): Store ID of new thread before
174 2000-03-21 Ulrich Drepper <drepper@redhat.com>
176 * attr.c: Use new macros from shlib-compat.h to define versions.
177 * oldsemaphore.c: Likewise.
178 * semaphore.c: Likewise.
181 * pthread.c: Update for new SHLIB_COMPAT definition.
183 * manager.c (__pthread_manager): Unmask debug signal.
185 * pthread.c (pthread_initialize): Test for address of __dso_handle
186 being NULL, not value. Use __on_exit, not on_exit.
187 Patch by Andreas Jaeger <aj@suse.de>.
189 * pthread.c: Use new macros from shlib-compat.h to define versions.
191 2000-03-19 Ulrich Drepper <drepper@redhat.com>
193 * pthread.c (pthread_initialize): Instead of on_exit use
194 __cxa_atexit if __dso_label is available to allow unloading the
195 libpthread shared library.
197 2000-03-16 Ulrich Drepper <drepper@redhat.com>
199 * condvar.c: Make tests for ownership of mutex less strict.
201 2000-03-14 Ulrich Drepper <drepper@redhat.com>
203 * condvar.c (pthread_cond_wait): Check whether mutex is owned by
204 current thread and return error if not.
205 (pthread_cond_timedwait_relative_old): Likewise.
206 (pthread_cond_timedwait_relative_new): Likewise.
208 * mutex.c (__pthread_once): Handle cancelled init function correctly.
209 (pthread_once_cancelhandler): New function.
210 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
212 2000-03-14 Andreas Jaeger <aj@suse.de>
214 * pthread.c (pthread_handle_sigcancel_rt): GS has been renamed to
216 (pthread_handle_sigrestart_rt): Likewise.
217 * signals.c (pthread_sighandler_rt): Likewise.
219 2000-03-02 Andreas Jaeger <aj@suse.de>
221 * sysdeps/pthread/bits/libc-lock.h: Fix typo.
222 Reported by Sean Chen <sean.chen@turbolinux.com>.
224 2000-02-28 Andreas Jaeger <aj@suse.de>
226 * rwlock.c: Fix typo.
228 2000-02-27 Ulrich Drepper <drepper@redhat.com>
230 * rwlock.c: Define __* variants of the functions and make old names
232 * Versions [GLIBC_2.2]: Export the __pthread_rwlock_* functions.
233 * sysdeps/pthread/bits/libc-lock.h: Define __libc_rwlock_* macros.
235 2000-02-25 Andreas Jaeger <aj@suse.de>
237 * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
238 pwrite64, lseek64, open64, and __open64 with version 2.2.
240 2000-02-22 Ulrich Drepper <drepper@redhat.com>
242 * semaphore.h (SEM_FAILED): Use 0 not NULL.
244 2000-02-14 Ulrich Drepper <drepper@redhat.com>
246 * condvar.c (pthread_cond_timedwait_relative_old): Tight loop with
247 nanosleep does not work either. Get absolute time inside the
249 (pthread_cond_timedwait_relative_new): Likewise.
250 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
252 2000-02-13 Andreas Jaeger <aj@suse.de>
254 * condvar.c (pthread_cond_timedwait_relative_new): Fix last patch.
255 (pthread_cond_timedwait_relative_old): Likewise.
257 2000-02-13 Ulrich Drepper <drepper@redhat.com>
259 * condvar.c (pthread_cond_timedwait_relative_old): Undo last patch
260 but keep the code around. A bug in the kernel prevent us from
262 (pthread_cond_timedwait_relative_new): Likewise.
263 (PR libc/1597 and libc/1598).
265 2000-02-01 Kaz Kylheku <kaz@ashi.footprints.net>
267 * condvar.c (pthread_cond_timedwait_relative_old): Do tight
268 loop around nanosleep calls instead of around most of the function
269 (pthread_cond_timedwait_relative_new): Likewise.
270 body. Got rid of backwards goto and one local.
272 2000-01-31 Ulrich Drepper <drepper@redhat.com>
274 * condvar.c (pthread_cond_timedwait_relative_old): Recompute time
275 before every nanosleep call to account for time spent in the rest
277 (pthread_cond_timedwait_relative_new): Likewise.
278 Patch by khendricks@ivey.uwo.ca (PR libc/1564).
280 2000-01-29 Ulrich Drepper <drepper@redhat.com>
282 * condvar.c (pthread_cond_timedwait_relative_old): Get remaining time
283 from nanosleep call so that in case we restart we only wait for the
285 (pthread_cond_timedwait_relative_new): Likewise.
286 Patch by khendricks@ivey.uwo.ca (PR libc/1561).
288 2000-01-18 Ulrich Drepper <drepper@cygnus.com>
290 * manager.c (pthread_allocate_stack): Compute guard page address
291 correctly. Patch by HJ Lu.
293 * sysdeps/pthread/pthread.h: Define
294 PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP.
296 2000-01-16 Ulrich Drepper <drepper@cygnus.com>
298 * rwlock.c (pthread_rwlock_unlock): Correct one more problem with
300 (pthread_rwlockattr_setkind_np): Allow
301 PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP.
302 Patches by Kaz Kylheku <kaz@ashi.footprints.net>.
304 2000-01-12 Ulrich Drepper <drepper@cygnus.com>
306 * internals.h (pthread_readlock_info): New structure.
307 (_pthread_descr_struct): Add p_readlock_list, p_readlock_free, and
308 p_untracked_readlock_count.
309 * pthread.c (__pthread_initial_thread, pthread_manager_thread):
310 Add initializers for new fields.
311 * manager.c (pthread_free): Free read/write lock lists.
312 * queue.h (queue_is_empty): New function.
313 * rwlock.c: Implement requirements about when readers should get
315 * sysdeps/pthread/pthread.h
316 (PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP): New definition.
317 * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_rwlock_t):
318 Define this name as well.
319 Patches by Kaz Kylheku <kaz@ashi.footprints.net>.
321 2000-01-05 Ulrich Drepper <drepper@cygnus.com>
323 * pthread.c (__pthread_initial_thread, pthread_manager_thread):
324 Adjust initializers for struct _pthread_descr_struct change.
325 * internals.h (struct _pthread_descr_struct): Move new elements to
328 2000-01-03 Kaz Kylheku <kaz@ashi.footprints.net>
330 Redesigned how cancellation unblocks a thread from internal
331 cancellation points (sem_wait, pthread_join,
332 pthread_cond_{wait,timedwait}).
333 Cancellation won't eat a signal in any of these functions
334 (*required* by POSIX and Single Unix Spec!).
335 * condvar.c: Spontaneous wakeup on pthread_cond_timedwait won't eat a
336 simultaneous condition variable signal (not required by POSIX
337 or Single Unix Spec, but nice).
338 * spinlock.c: __pthread_lock queues back any received restarts
339 that don't belong to it instead of assuming ownership of lock
340 upon any restart; fastlock can no longer be acquired by two threads
342 * restart.h: Restarts queue even on kernels that don't have
343 queued real time signals (2.0, early 2.1), thanks to atomic counter,
344 avoiding a rare race condition in pthread_cond_timedwait.
346 1999-12-31 Andreas Jaeger <aj@suse.de>
348 * internals.h: Remove duplicate prototype declarations.
350 * weaks.c: Remove __THROW from prototypes since the file is not
351 compiled by a C++ compiler.
352 * internals.h: Likewise.
354 1999-12-30 Andreas Jaeger <aj@suse.de>
356 * sysdeps/pthread/pthread.h: Move internal functions to...
357 * sysdeps/pthread/bits/libc-lock.h: ...here.
359 1999-12-29 Andreas Jaeger <aj@suse.de>
361 * sysdeps/pthread/pthread.h: Fix typos, reformat comments.
363 1999-12-28 Ulrich Drepper <drepper@cygnus.com>
365 * sysdeps/alpha/pt-machine.h: Move stack_pointer definition to the
368 * manager.c (__pthread_start): Add one more cast to prevent
369 warning on 64bit machines.
371 1999-12-21 Ulrich Drepper <drepper@cygnus.com>
373 * manager.c (pthread_handle_create): Set p_pid of new thread
374 before calling the callback function to report a new thread.
376 1999-12-20 Andreas Jaeger <aj@suse.de>
378 * pthread.c (pthread_initialize): Move getrlimit call after
381 1999-12-18 Ulrich Drepper <drepper@cygnus.com>
383 * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
384 pwrite64, lseek64, open64, and __open64.
385 * wrapsyscall.c: Define pread, __pread64, pread64, pwrite, __pwrite64,
386 pwrite64, lseek64, open64, and __open64.
388 * manager.c (pthread_allocate_stack): Correct computation of
389 new_thread_bottom. Correct handling of stack size and when the
390 rlimit method to guard for stack growth is used.
391 * pthread.c (pthread_initialize): Stack limit must be STACK_SIZE
392 minus one pagesize (not two).
394 1999-12-03 Andreas Jaeger <aj@suse.de>
396 * Versions: Add __res_state with version GLIBC_2.2.
398 * errno.c (__res_state): New function to return thread specific
401 * pthread.c (pthread_initialize): Initialize p_resp.
402 (__pthread_reset_main_thread): Also set p_resp.
404 * manager.c (pthread_handle_create): Initialize p_resp.
406 * internals.h: Add thread specific resolver state.
407 Based on patches by Adam D. Bradley <artdodge@cs.bu.edu>.
409 1999-12-01 Ulrich Drepper <drepper@cygnus.com>
411 * sysdeps/i386/pt-machine.h: Move stack_pointer definition to the
413 * sysdeps/i386/i686/pt-machine.h: Likewise.
414 Patches by Alan Modra <alan@SPRI.Levels.UniSA.Edu.Au>.
416 1999-11-23 Ulrich Drepper <drepper@cygnus.com>
418 * manager.c (pthread_start_thread_event): Initialize p_pid already
421 1999-11-22 Ulrich Drepper <drepper@cygnus.com>
423 * internals.h: Add prototype for __pthread_manager_event.
424 * manager.c (__pthread_manager_event): New function.
425 (pthread_start_thread_event): Correct computation of self.
426 Use INIT_THREAD_SELF.
427 * pthread.c (__pthread_manager_thread): Initialize p_lock.
428 (__pthread_initialize_manager): Respect event flags also for creation
429 of the manager thread.
431 1999-11-08 Ulrich Drepper <drepper@cygnus.com>
433 * pthread.c (__pthread_initialize_manager): Initialize
434 __pthread_manager_thread.p_tid.
436 1999-11-02 Ulrich Drepper <drepper@cygnus.com>
438 * internals.h: Declare __pthread_last_event.
439 * manager.c: Define __pthread_last_event.
440 (pthread_handle_create): Set __pthread_last_event.
441 (pthread_exited): Likewise.
442 * join.c (pthread_exit): Likewise.
444 * Makefile (libpthread-routines): Add events.
445 * events.c: New file.
446 * internals.h: Protect against multiple inclusion.
447 Include thread_dbP.h header.
448 (struct _pthread_descr_struct): Add new fields p_report_events and
450 Declare event reporting functions.
451 * join.c (pthread_exit): Signal event if this is wanted.
452 * manager.c (__pthread_threads_events): New variable.
453 (pthread_handle_create): Take new parameters with event information.
454 Signal TD_CREATE event if wanted.
455 (__pthread_manager): Adjust pthread_handle_create call.
456 (pthread_start_thread_event): New function. Block until manager is
457 finished and then call pthread_start_thread.
458 (pthread_exited): Signal TD_REAP event if wanted.
460 1999-10-26 Ulrich Drepper <drepper@cygnus.com>
462 * restart.h (suspend_with_cancellation): Rewrite as a macro.
464 * condvar.c (pthread_cond_timedwait_relative): Don't mark as inline.
466 1999-10-25 Andreas Jaeger <aj@suse.de>
468 * internals.h: Remove K&R compatibility.
469 * no-tsd.c: Likewise.
470 * semaphore.h: Likewise.
471 * signals.c: Likewise.
472 * sysdeps/pthread/bits/libc-tsd.h: Likewise.
473 * sysdeps/unix/sysv/linux/bits/sigthread.h: Likewise.
476 1999-10-21 Xavier Leroy <Xavier.Leroy@inria.fr>
478 * linuxthreads/pthread.c: For i386, wrap pthread_handle_sigrestart
479 and pthread_handle_sigcancel with functions that restore
480 %gs from the signal context. For each signal handling function,
481 two wrappers are required, one for a non-RT signal and one for
483 * linuxthreads/signal.c: For i386, add code to restore %gs
484 from the signal context in pthread_sighandler and
485 pthread_sighandler_rt.
487 1999-10-17 Ulrich Drepper <drepper@cygnus.com>
489 * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add cast.
491 1999-10-14 Ulrich Drepper <drepper@cygnus.com>
493 * pthread.c (__pthread_initial_thread): Pass argument to
494 PTHREAD_START_ARGS_INITIALIZER.
495 (__pthread_manager_thread): Likewise.
497 * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add parameter to
500 * manager.c (pthread_handle_create): Remove p_startfct initialization.
502 * internals.h (_pthread_descr_struct): We don't need p_startfct field.
504 1999-10-12 Ulrich Drepper <drepper@cygnus.com>
506 * internals.h: Correct return types for __libc_read and __libc_write.
508 1999-10-09 Andreas Jaeger <aj@suse.de>
510 * internals.h: Add __new_sem_post to get prototype in
511 manager.c; include semaphore.h for needed types.
513 1999-10-08 Ulrich Drepper <drepper@cygnus.com>
515 * manager.c (__pthread_manager) [REQ_POST]: Use __new_sem_post
516 directly instead of calling sem_post which should not be necessary
517 but is faster and might help in some case to work around problems.
518 Patch by khendricks@ivey.uwo.ca [libc/1382].
520 1999-10-08 Andreas Schwab <schwab@suse.de>
522 * sysdeps/pthread/Subdirs: New file.
525 1999-10-07 Ulrich Drepper <drepper@cygnus.com>
528 * internals.h (struct _pthread_descr_struct): Add p_startfct.
529 * manager.c (pthread_handle_create): Initialize p_startfct.
530 * pthread.c: Define __linuxthread_pthread_sizeof_descr variable.
532 1999-09-25 Ulrich Drepper <drepper@cygnus.com>
534 * manager.c (__linuxthreads_pthread_threads_max): New variable.
535 * specific.c (__linuxthreads_pthread_keys_max): New variable.
536 (__linuxthreads_pthread_key_2ndlevel_size): New variable.
538 * condvar.c (pthread_cond_timedwait_relative): Never return with
539 EINTR. Patch by Andreas Schwab.
541 1999-09-19 Ulrich Drepper <drepper@cygnus.com>
543 * signals.c (sigaction): Correct last patch. Don't select
544 pthread_sighandler_rt based on the signal number but instead of
547 1999-09-23 Ulrich Drepper <drepper@cygnus.com>
549 * specific.c: Move definitions of struct pthread_key_struct and
550 destr_function to ...
551 * internals.h: ...here.
553 1999-09-18 Ulrich Drepper <drepper@cygnus.com>
555 * pthread.c (pthread_handle_sigrestart_rt): New function. Use
556 this instead of pthread_handle_sigrestart if the signal is an RT
559 * signals.c: Handle passing through of sighandler arguments also
560 for real-time signals.
562 1999-09-03 Andreas Schwab <schwab@suse.de>
564 * ptfork.c (__fork): Renamed from fork and use __libc_fork. Add
566 (__vfork): New function, alias vfork.
567 * Versions: Export __fork, vfork, and __vfork in libpthread.
569 1999-08-23 Andreas Schwab <schwab@suse.de>
571 * signals.c (pthread_sighandler): Add SIGCONTEXT_EXTRA_ARGS to
572 call to signal handler.
574 1999-08-20 Ulrich Drepper <drepper@cygnus.com>
576 * pthread.c (__pthread_reset_main_thread): Undo last change.
577 (__pthread_kill_other_threads_np): Reset signal handlers for the
578 signals we used in the thread implementation here.
580 1999-08-19 Ulrich Drepper <drepper@cygnus.com>
582 * pthread.c (__pthread_reset_main_thread): Reset signal handlers
583 for the signals we used in the thread implementation [PR libc/1234].
585 * Versions: Export __pthread_kill_other_threads_np from libpthread
588 * signals.c: Pass sigcontext through wrapper to the user function.
590 1999-08-01 Ulrich Drepper <drepper@cygnus.com>
592 * Versions [ld.so] (GLIBC_2.0): Export __libc_internal_tsd_get and
593 __libc_internal_tsd_set.
595 1999-07-29 Andreas Jaeger <aj@arthur.rhein-neckar.de>
597 * manager.c: Remove inclusion of <linux/tasks.h> since it's not
600 1999-07-16 Andreas Jaeger <aj@arthur.rhein-neckar.de>
602 * internals.h: Align _pthread_descr_struct to 32 bytes.
603 Reported by Tim Hockin <thockin@cobaltnet.com>, close PR
606 1999-07-09 Ulrich Drepper <drepper@cygnus.com>
608 * oldsemaphore.c (sem_compare_and_swap): Fix use of compare and
611 1999-07-09 Cristian Gafton <gafton@redhat.com>
613 * Makefile (libpthread-routines): Add oldsemaphore routine.
614 * Versions: Add sem_destroy, sem_getvalue, sem_init, sem_post,
615 sem_trywait, and sem_wait to GLIBC_2.1.
616 * oldsemaphore.c: New file.
617 * semaphore.c: Add default_symbol_versions for the changed functions.
618 (__new_sem_init): Rename from sem_init.
619 (__new_sem_post): Rename from sem_post.
620 (__new_sem_wait): Rename from sem_wait.
621 (__new_sem_trywait): Rename from sem_trywait.
622 (__new_sem_getvalue): Rename from sem_getvalue.
623 (__new_sem_destroy): Rename from sem_destroy.
625 1999-06-23 Robey Pointer <robey@netscape.com>
627 * internals.h: Added p_nextlock entry to separate queueing for a
628 lock from queueing for a CV (sometimes a thread queues on a lock
629 to serialize removing itself from a CV queue).
630 * pthread.c: Added p_nextlock to initializers.
631 * spinlock.c: Changed to use p_nextlock instead of p_nextwaiting.
633 1999-07-09 Ulrich Drepper <drepper@cygnus.com>
635 * manager.c (pthread_handle_create): Free mmap region after stack
636 if clone failed. Patch by Kaz Kylheku <kaz@ashi.FootPrints.net>.
638 1999-05-23 Andreas Jaeger <aj@arthur.rhein-neckar.de>
640 * man/pthread_cond_init.man: Correct example.
641 Reported by Tomas Berndtsson <tomas@nocrew.org>.
643 * linuxthreads.texi (Condition Variables): Likewise.
645 1999-05-18 Jakub Jelinek <jj@ultra.linux.cz>
647 * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): Use
648 casx not cas, also successful casx returns the old value in rd
649 and not the new value.
651 1999-05-16 Xavier Leroy <Xavier.Leroy@inria.fr>
653 * manager.c: If pthread_create() is given a NULL attribute
654 and the thread manager runs with a realtime policy, set the
655 scheduling policy of the newly created thread back to SCHED_OTHER.
656 * manager.c: If the PTHREAD_INHERIT_SCHED attribute is given,
657 initialize the schedpolicy field of new_thread->p_start_args
658 to that of the calling thread.
660 1999-04-29 Ulrich Drepper <drepper@cygnus.com>
662 * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): cas
663 instruction does not allow memory element to use offset.
665 1999-04-28 Ulrich Drepper <drepper@cygnus.com>
667 * manager.c (pthread_allocate_stack): Optimize initialization of new
670 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_define_initialized):
671 Don't use initializer since it is all zeroes.
672 (__libc_once_define): Likewise.
674 1999-04-16 Andreas Jaeger <aj@arthur.rhein-neckar.de>
676 * sysdeps/arm/Implies: Removed since cmpxchg/no-cmpxchg
677 doesn't exist anymore.
678 * sysdeps/i386/Implies: Likewise.
679 * sysdeps/m68k/Implies: Likewise.
680 * sysdeps/mips/Implies: Likewise.
681 * sysdeps/powerpc/Implies: Likewise.
682 * sysdeps/sparc/sparc32/Implies: Likewise.
683 * sysdeps/sparc/sparc64/Implies: Likewise.
685 1999-04-15 Ulrich Drepper <drepper@cygnus.com>
687 * sysdeps/alpha/bits/semaphore.h: Removed.
688 * sysdeps/powerpc/bits/semaphore.h: Removed.
689 * sysdeps/pthread/cmpxchg/bits/semaphore.h: Removed.
690 * sysdeps/pthread/no-cmpxchg/bits/semaphore.h: Removed.
691 * Makefile (headers): Remove bits/semaphore.h.
693 * semaphore.h: Define _pthread_descr if necessary.
694 Don't include limits.h. Define SEM_VALUE_MAX directly.
696 (sem_t): Protect element names with leading __.
697 Add declarations for sem_close, sem_open, and sem_unlink.
698 * semaphore.c: Adjust all functions for new element names.
699 Define sem_close, sem_open, and sem_unlink.
700 * Versions (libthread): Add sem_close, sem_open, and sem_unlink for
702 * sysdeps/pthread/bits/pthreadtypes.h: Define _pthread_descr only if
705 1999-03-16 H.J. Lu <hjl@gnu.org>
707 * specific.c (pthread_key_delete): Check th->p_terminated to see
708 if the thread is running.
710 * Versions (__libc_internal_tsd_get, __libc_internal_tsd_set):
711 Added to GLIBC_2.0 for libc.so.
713 1999-02-12 H.J. Lu <hjl@gnu.org>
715 * Versions (__libc_current_sigrtmin, __libc_current_sigrtmax,
716 __libc_allocate_rtsig): Added to GLIBC_2.1.
718 * internals.h (DEFAULT_SIG_RESTART): Removed.
719 (DEFAULT_SIG_CANCEL): Removed.
721 * pthread.c (init_rtsigs, __libc_current_sigrtmin,
722 __libc_current_sigrtmax, __libc_allocate_rtsig): New functions.
723 (__pthread_sig_restart, __pthread_sig_cancel,
724 __pthread_sig_debug): Initialized.
725 (pthread_initialize): Call init_rtsigs () to initialize
728 1999-02-03 H.J. Lu <hjl@gnu.org>
730 * manager.c (__pthread_manager): Do block __pthread_sig_debug.
731 Don't restart the thread which sent REQ_DEBUG.
732 (pthread_start_thread): Check if __pthread_sig_debug > 0
735 * pthread.c (__pthread_initialize_manager): Suspend ourself
736 after sending __pthread_sig_debug to gdb instead of
737 __pthread_sig_cancel.
739 1999-01-24 H.J. Lu <hjl@gnu.org>
741 * manager.c (__pthread_manager): Delete __pthread_sig_debug
742 from mask if __pthread_sig_debug > 0.
743 (pthread_handle_create): Increment __pthread_handles_num.
745 * manager.c (pthread_handle_create): Don't pass CLONE_PTRACE to clone.
746 * pthread.c (__pthread_initialize_manager): Likewise.
748 * pthread.c (pthread_initialize): Use __libc_allocate_rtsig (1)
749 instead of __libc_allocate_rtsig (2).
750 (__pthread_initialize_manager): Send __pthread_sig_debug to gdb
751 instead of __pthread_sig_cancel.
752 (pthread_handle_sigdebug): Fix comments.
754 1999-01-21 Ulrich Drepper <drepper@cygnus.com>
756 * manager.c (pthread_allocate_stack): Set
757 __pthread_nonstandard_stacks if user-specified stack is used.
759 1999-01-16 Ulrich Drepper <drepper@cygnus.com>
761 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _LFS_ASYNCHRONOUS_IO,
762 _LFS_LARGEFILE, _LFS64_LARGEFILE, and _LFS64_STDIO from Unix98.
764 1999-01-07 Xavier Leroy <Xavier.Leroy@inria.fr>
766 * pthread.c: Use a third signal __pthread_sig_debug distinct
767 from __pthread_sig_cancel to notify gdb when a thread is
769 * manager.c: Likewise.
770 * internals.h: Likewise.
771 * signals.c: The implementation of sigwait(s) assumed that
772 all signals in s have signal handlers already attached.
773 This is not required by the standard, so make it work
774 also if some of the signals have no handlers.
776 1999-01-05 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
778 * linuxthreads.texi: Remove pointers from first @node. Move old
779 @node spec inside comment.
781 1998-12-31 Ulrich Drepper <drepper@cygnus.com>
783 * sysdeps/pthread/bits/stdio-lock.h: Define _IO_lock_lock and
786 1998-12-29 Ulrich Drepper <drepper@cygnus.com>
788 * semaphore.c (sem_trywait): Don't forget to unlock the semaphore
789 lock. Patch by Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>.
791 1998-12-21 Ulrich Drepper <drepper@cygnus.com>
793 * manager.c: Threads now send __pthread_sig_cancel on termination.
794 Change clone call and signal masks.
795 * thread.c (pthread_handle_sigrestart): Remove special code for
797 (pthread_handle_sigcancel): In manager thread call
798 __pthread_manager_sighandler.
799 * sysdeps/i386/pt-machine.h (__compare_and_swap): Add memory clobber.
800 * sysdeps/i386/i686/pt-machine.h: Likewise.
801 Patches by Xavier Leroy.
803 1998-12-14 Ulrich Drepper <drepper@cygnus.com>
805 * spinlock.c (__pthread_unlock): Don't crash if called for an
806 untaken mutex. Reported by Ruslan V. Brushkoff <rus@Snif.Te.Net.UA>.
808 * Examples/ex6.c: Unbuffer stdout and reduce sleep time to reduce
811 1998-12-13 Ulrich Drepper <drepper@cygnus.com>
813 * Examples/ex3.c: Wait until all threads are started before
814 searching for the number to avoid race condition on very fast
817 1998-12-08 Andreas Jaeger <aj@arthur.rhein-neckar.de>
819 * sysdeps/pthread/pthread.h: Remove __pthread_setcanceltype
820 declaration since it's not needed.
822 * sysdeps/pthread/pthread.h: Move internal functions to ...
823 * internals.h: ...here.
825 1998-12-02 H.J. Lu <hjl@gnu.org>
827 * pthread.c (__pthread_sig_restart): Initiliaze to 0 if
829 (__pthread_sig_cancel): Likewise.
831 1998-12-01 Andreas Jaeger <aj@arthur.rhein-neckar.de>
833 * wrapsyscall.c: Include <sys/mman.h> for msync,
834 <stdlib.h> for system and <termios.h> for tcdrain prototype.
835 Correct msync declaration.
837 1998-11-29 Roland McGrath <roland@baalperazim.frob.com>
839 * sysdeps/pthread/bits/libc-tsd.h (__libc_tsd_define, __libc_tsd_get,
840 __libc_tsd_set): New macros for new interface.
841 * no-tsd.c: New file, provide uninitialized defns of
842 __libc_internal_tsd_get and __libc_internal_tsd_set.
843 * Makefile (routines): Add no-tsd.
845 1998-10-12 Roland McGrath <roland@baalperazim.frob.com>
847 * internals.h: Include <bits/libc-tsd.h>, not <bits/libc-lock.h>.
848 * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
849 __libc_internal_tsd_set): Move decls to ...
850 * sysdeps/pthread/bits/libc-tsd.h: New file for __libc_internal_tsd_*
853 * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
854 __libc_internal_tsd_set): Make these pointers to functions, not
855 functions; remove #pragma weak decls for them.
856 * specific.c (__libc_internal_tsd_get, __libc_internal_tsd_set):
857 Define static functions and initialized pointers to them.
859 1998-11-18 Ulrich Drepper <drepper@cygnus.com>
861 * Makefile (CFLAGS-mutex.c): Define as -D__NO_WEAK_PTHREAD_ALIASES.
862 (CFLAGS-specific.c): Likewise.
863 (CFLAGS-pthread.c): Likewise.
864 (CFLAGS-ptfork.c): Likewise.
865 (CFLAGS-cancel.c): Likewise.
866 * sysdeps/pthread/bits/libc-lock.h: Don't mark __pthread_* functions
867 as weak references if __NO_WEAK_PTHREAD_ALIASES is defined.
869 * mutex.c (pthread_mutex_init): Define as strong symbol.
870 (pthread_mutex_destroy): Likewise.
871 (pthread_mutex_trylock): Likewise.
872 (pthread_mutex_lock): Likewise.
873 (pthread_mutex_unlock): Likewise.
874 (pthread_mutexattr_init): Likewise.
875 (pthread_mutexattr_destroy): Likewise.
876 (pthread_once): Likewise.
877 * ptfork.c (pthread_atfork): Likewise.
878 * specific.c (pthread_key_create): Likewise.
879 (pthread_setspecific): Likewise.
880 (pthread_getspecific): Likewise.
882 1998-11-15 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
884 * linuxthreads.texi: Fix punctuation after xref.
886 1998-11-10 H.J. Lu <hjl@gnu.org>
888 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine NR_OPEN
889 if it is defined in <linux/limits.h>.
891 1998-10-29 14:28 Ulrich Drepper <drepper@cygnus.com>
893 * spinlock.h (__pthread_trylock): Define inline.
894 (__pthread_lock): Add extra parameter to declaration. Declare
895 using internal_function.
896 (__pthread_unlock): Declare using internal_function.
897 * spinlock.c (__pthread_lock): Add new parameter. Use it instead
898 of local variable self. Avoid recomputing self. Define using
900 (__pthread_trylock): Remove.
901 (__pthread_unlock): Define using internal_function.
902 * cancel.c: Adjust for __pthread_lock interface change. Use already
903 computed self value is possible.
904 * condvar.c: Likewise.
906 * manager.c: Likewise.
908 * pthread.c: Likewise.
909 * rwlock.c: Likewise.
910 * semaphore.c: Likewise.
911 * signals.c: Likewise.
913 1998-10-27 13:46 Ulrich Drepper <drepper@cygnus.com>
915 * sysdeps/pthread/pthread.h (struct _pthread_cleanup_buffer): Prepend
916 __ to field names of the struct.
917 * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_fastlock):
919 (pthread_attr_t): Likewise.
920 (pthread_cond_t): Likewise.
921 (pthread_condattr_t): Likewise.
922 (pthread_mutex_t): Likewise.
923 (pthread_mutexattr_t): Likewise.
924 (pthread_rwlock_t): Likewise.
925 (pthread_rwlockattr_t): Likewise.
926 * attr.c: Adjust for pthread.h and pthreadtypes.h change.
927 * cancel.c: Likewise.
928 * condvar.c: Likewise.
929 * manager.c: Likewise.
931 * pthread.c: Likewise.
932 * ptlongjmp.c: Likewise.
933 * rwlock.c: Likewise.
934 * spinlock.c: Likewise.
936 1998-10-09 Ulrich Drepper <drepper@cygnus.com>
938 * sysdeps/i386/pt-machine.h (get_eflags, set_eflags): Mark these
941 * sysdeps/i386/i686/pt-machine.h: Remove unused inline
944 * Makefile (libpthread-routines): Add pt-machine.
945 * pt-machine.c: New file.
946 * sysdeps/alpha/pt-machine.h: Define PT_EI as extern inline is not
947 yet defined. Use PT_EI in extern inline definitions.
948 * sysdeps/arm/pt-machine.h: Likewise.
949 * sysdeps/i386/pt-machine.h: Likewise.
950 * sysdeps/i386/i686/pt-machine.h: Likewise.
951 * sysdeps/m68k/pt-machine.h: Likewise.
952 * sysdeps/mips/pt-machine.h: Likewise.
953 * sysdeps/powerpc/pt-machine.h: Likewise.
954 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
955 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
957 1998-10-02 Andreas Jaeger <aj@arthur.rhein-neckar.de>
959 * semaphore.h: Include <sys/types.h> so that _pthread_descr
962 1998-09-15 David S. Miller <davem@pierdol.cobaltmicro.com>
964 * sysdeps/sparc/sparc32/pt-machine.h (INIT_THREAD_SELF): Add nr
966 * sysdeps/sparc/sparc64/pt-machine.h (INIT_THREAD_SELF): Likewise.
968 1998-09-12 14:24 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu>
970 * linuxthreads/sysdeps/unix/sysv/linux/bits/sigthread.h: Add
971 multiple inclusion guard.
973 1998-09-02 11:08 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
975 * signals.c (sigaction): Check that sig is less than NSIG to avoid
976 array index overflow.
978 1998-09-06 10:56 Ulrich Drepper <drepper@cygnus.com>
980 * sysdeps/pthread/semaphore.h: New file.
982 1998-09-06 09:08 Ulrich Drepper <drepper@cygnus.com>
984 * sysdeps/pthread/bits/libc-lock.h (enum __libc_tsd_key_t): Add
985 _LIBC_TSD_KEY_DL_ERROR.
987 1998-08-31 Ulrich Drepper <drepper@cygnus.com>
989 * sysdeps/i386/i686/pt-machine.h (testandset): Add memory clobber.
990 * sysdeps/i386/pt-machine.h: Likewise.
991 Suggested by Roland McGrath.
993 1998-08-28 13:58 Ulrich Drepper <drepper@cygnus.com>
995 * internals.h: Also define THREAD_GETMEM_NC and THREAD_SETMEM_NC to
996 access thread data with non-constant offsets.
997 * specific.c: Use THREAD_GETMEM_NC and THREAD_SETMEM_NC where
1000 * sysdeps/i386/useldt.h: Fix typo. Add THREAD_GETMEM_NC and
1001 THREAD_SETMEM_NC definitions.
1003 * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM_NC and
1005 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
1007 1998-08-26 15:46 Ulrich Drepper <drepper@cygnus.com>
1009 * internals.h: Define THREAD_GETMEM and THREAD_SETMEM to default if
1010 not already defined.
1011 (struct _pthread_descr_struct): Add p_self and p_nr field.
1012 * manager.c (__pthread_handles): Define second element to point
1014 (__pthread_handles_num): Initialize to 2.
1015 (__pthread_manager): Use INIT_THREAD_SELF with two arguments.
1016 (pthread_start_thread): Likewise.
1017 (pthread_handle_create): Start search for free slot at entry 2.
1018 Initialize new fields p_self and p_nr.
1019 Call __clone with CLONE_PTRACE if available.
1020 (pthread_free): Call FREE_THREAD_SELF if available.
1021 * pthread.c (__pthread_initial_thread): Initialize new fields.
1022 (__pthread_manager_thread): Likewise.
1023 (__pthread_initialize_manager): Call __clone with CLONE_PTRACE.
1025 * cancel.c: Use THREAD_GETMEM and THREAD_SETMEM to access the
1026 elements of the thread descriptor.
1027 * condvar.c: Likewise.
1028 * errno.c: Likewise.
1030 * manager.c: Likewise.
1031 * pthread.c: Likewise.
1032 * ptlongjmp.c: Likewise.
1033 * semaphore.c: Likewise.
1034 * signals.c: Likewise.
1035 * specific.c: Likewise.
1036 * spinlock.c: Likewise.
1038 * sysdeps/alpha/pt-machine.h (INIT_THREAD_SELF): Add extra parameter.
1040 * sysdeps/i386/useldt.h: New file.
1041 * sysdeps/i386/i686/pt-machine.h: Show how to use this file.
1043 * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM and
1044 THREAD_SETMEM using __thread_self.
1045 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
1047 1998-08-24 Geoff Keating <geoffk@ozemail.com.au>
1049 * spinlock.c (__pthread_lock): Reset p_nextwaiting to NULL if it
1050 turned out that we didn't need to queue after all.
1052 1998-08-22 Geoff Keating <geoffk@ozemail.com.au>
1054 * sysdeps/powerpc/pt-machine.h: Remove testandset, it's not used
1055 and wastes space; correct types.
1057 1998-08-08 11:18 H.J. Lu <hjl@gnu.org>
1059 * signals.c (sigaction): Handle NULL argument.
1061 1998-08-04 Ulrich Drepper <drepper@cygnus.com>
1063 * sysdeps/unix/sysv/linux/bits/sigthread.h: Use __sigset_t instead
1066 1998-08-02 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
1068 * Makefile (linuxthreads-version): Extract correct number from
1071 1998-07-29 Xavier Leroy <Xavier.Leroy@inria.fr>
1073 * Banner: Bump version number to 0.8
1074 * FAQ.html: Many updates, in particular w.r.t. debugging.
1075 * manager.c: Support for non-default stacksize for
1076 LinuxThreads-allocated stacks;
1077 don't use guard pages for stacks with default size, rely on
1078 rlimit(RLIMIT_STACK) instead (it's cheaper).
1080 * cancel.c: Use __pthread_sig_cancel and __pthread_sig_restart
1081 everywhere instead of PTHREAD_SIG_CANCEL and PTHREAD_SIG_RESTART.
1082 * condvar.c: Likewise.
1083 * internals.h: Likewise.
1084 * restart.h: Likewise.
1085 * signals.c: Likewise.
1086 * pthread.c: Likewise; set rlimit(RLIMIT_STACK) as we need it.
1088 1998-07-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
1090 * weaks.c: Define pthread_mutexattr_[sg]ettype instead of
1091 __pthread_mutexattr_[sg]ettype. Add more weak aliases.
1092 * Versions: Put __pthread_mutexattr_settype under version
1093 GLIBC_2.0. Don't export __pthread_mutexattr_setkind_np and
1094 __pthread_mutexattr_gettype.
1096 1998-07-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
1098 * sysdeps/pthread/bits/libc-lock.h: Make
1099 __pthread_mutexattr_settype weak. Don't make
1100 __pthread_mutexattr_setkind_np weak.
1102 1998-07-16 10:52 Ulrich Drepper <drepper@cygnus.com>
1104 * manager.c (pthread_handle_create): Check whether sched_setscheduler
1105 call can succeed here.
1107 * mutex.c: Define __pthread_mutexattr_settype and make
1108 __pthread_mutexattr_setkind_np an alias.
1109 Likewise for __pthread_mutexattr_gettype.
1111 1998-07-15 11:00 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu>
1113 * attr.c (pthread_attr_setschedpolicy): Don't check whether caller
1116 1998-07-14 19:38 Ulrich Drepper <drepper@cygnus.com>
1118 * sysdeps/pthread/bits/libc-lock.h: Define __libc_cleanup_end.
1120 1998-07-11 Andreas Jaeger <aj@arthur.rhein-neckar.de>
1122 * Examples/ex6.c: Include <unistd.h> for usleep.
1124 1998-06-13 11:04 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
1126 * Examples/ex4.c (main): Use exit, not pthread_exit.
1128 1998-07-09 13:39 Ulrich Drepper <drepper@cygnus.com>
1130 * Versions: Add __pthread_mutexattr_gettype and
1131 __pthread_mutexattr_settype.
1132 * lockfile.c: Use __pthread_mutexattr_settype instead of
1133 __pthread_mutexattr_setkind_np.
1134 * mutex.c: Define __pthread_mutexattr_gettype and
1135 __pthread_mutexattr_settype.
1137 * sysdeps/pthread/pthread.h: Declare __pthread_mutexattr_gettype and
1138 __pthread_mutexattr_settype.
1139 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_init_recursive):
1140 Use __pthread_mutexattr_settype.
1142 1998-07-08 22:26 Ulrich Drepper <drepper@cygnus.com>
1144 * Versions: Add pthread_mutexattr_gettype, pthread_mutexattr_settype.
1145 * mutex.c: Define weak alias pthread_mutexattr_gettype and
1146 pthread_mutexattr_settype.
1147 * sysdeps/pthread/pthread.h: Declare these functions.
1148 Move pthread_sigmask and pthread_kill declaration in separate header.
1149 * sysdeps/unix/sysv/linux/bits/sigthread.h: New file.
1151 1998-07-07 15:20 Ulrich Drepper <drepper@cygnus.com>
1153 * Makefile: Add rules to compile and run tests.
1154 * Examples/ex1.c: Little changes to fix warnings.
1155 * Examples/ex2.c: Likewise.
1156 * Examples/ex3.c: Likewise.
1157 * Examples/ex4.c: Likewise.
1158 * Examples/ex5.c: Likewise.
1159 * Examples/ex6.c: New file.
1161 1998-07-05 11:54 Ulrich Drepper <drepper@cygnus.com>
1163 * Versions: Add pthread_attr_init to GLIBC_2.1 version in libc.
1165 1998-07-01 Andreas Jaeger <aj@arthur.rhein-neckar.de>
1167 * attr.c: Include <string.h>.
1169 1998-06-30 11:47 Ulrich Drepper <drepper@cygnus.com>
1171 * attr.c: Include errno.h. Use memcpy to copy sched_param.
1172 * internals.h: Include limits.h.
1173 * manager.c: Use memcpy to copy sched_param.
1174 * ptfork.c: Include errno.h.
1175 * pthread.c: Likewise.
1176 * semaphore.c: Likewise.
1177 * specific.c: Likewise.
1178 * spinlock.h: Likewise.
1179 * sysdeps/pthread/pthread.h: Include only allowed headers. Move
1180 type definition to ...
1181 * sysdeps/pthread/bits/pthreadtypes.h: ...here. New file.
1183 1998-06-29 12:34 Ulrich Drepper <drepper@cygnus.com>
1185 * sysdeps/pthread/pthread.h: Use __PMT not __P for function pointers.
1187 * sysdeps/pthread/pthread.h: Define various PTHREAD_* symbols also
1188 as macros as demanded in POSIX.1, Annex C.
1190 1998-06-29 12:29 Ulrich Drepper <drepper@cygnus.com>
1192 * internals.h (struct pthread_request): For free use pthread_t
1193 instead of pthread_descr.
1194 * join.c (pthread_join): Pass thread_id, not th to manager.
1195 (pthread_detach): Likewise.
1196 * manager.c (__pthread_manager): Except thread ID in FREE_REQ case.
1197 (pthread_exited): Remove detached queue code.
1198 (pthread_handle_free): Expect thread ID parameter and use it to
1199 validate the thread decsriptor. Don't use detached queue.
1200 Patches by Xavier Leroy.
1202 1998-06-27 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
1204 * libpthread.map: Export accept, longjmp, sigaction, siglongjmp,
1205 _IO_flockfile, _IO_ftrylockfile, _IO_funlockfile,
1206 __pthread_atfork, __pthread_key_create, __pthread_once.
1207 * internals.h: Doc fix.
1208 * pthread.c (__pthread_initialize): Define again.
1210 1998-06-26 Ulrich Drepper <drepper@cygnus.com>
1212 * manager.c (pthread_exited): If thread is not detached put it on
1214 (pthread_handle_free): If thread is not on list with living threads
1215 search on list with detached threads.
1217 * sysdeps/pthread/pthread.h (PTHREAD_RWLOCK_INITIALIZER): Correct
1218 for new definition of pthread_rwlock_t.
1220 * spinlock.c: Correct test whether to compile
1221 __pthread_compare_and_swap or not.
1223 1998-06-25 19:27 Ulrich Drepper <drepper@cygnus.com>
1225 * attr.c: Finish user stack support. Change locking code to be safe
1226 in situations with different priorities.
1227 * cancel.c: Likewise.
1228 * condvar.c: Likewise.
1229 * internals.h: Likewise.
1231 * manager.c: Likewise.
1232 * mutex.c: Likewise.
1233 * pthread.c: Likewise.
1234 * ptlongjmp.c: Likewise.
1235 * queue.h: Likewise.
1236 * rwlock.c: Likewise.
1237 * semaphore.c: Likewise.
1238 * semaphore.h: Likewise.
1239 * signals.c: Likewise.
1240 * spinlock.c: Likewise.
1241 * spinlock.h: Likewise.
1242 * sysdeps/pthread/pthread.h: Likewise.
1243 Patches by Xavier Leroy.
1245 * sysdeps/i386/i686/pt-machine.h: New file.
1247 1998-06-25 Ulrich Drepper <drepper@cygnus.com>
1249 * sysdeps/pthread/pthread.h: Make [sg]et_stacksize and
1250 [sg]et_stackaddr prototypes always available.
1252 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
1253 _POSIX_THREAD_ATTR_STACKSIZE and _POSIX_THREAD_ATTR_STACKADDR.
1255 1998-06-24 Ulrich Drepper <drepper@cygnus.com>
1257 * manager.c (pthread_free): Undo patch from 980430.
1258 Reported by David Wragg <dpw@doc.ic.ac.uk>.
1260 1998-06-09 15:07 Ulrich Drepper <drepper@cygnus.com>
1262 * manager.c: Define __pthread_manager_adjust_prio and use it to
1263 increase priority when needed.
1264 * internals.h: Add prototype for __pthread_manager_adjust_prio.
1265 * mutex.c: Optimize mutexes to wake up only one thread.
1266 * pthread.c: Move PID of manager for global variable in structure
1268 Patches by Xavier Leroy.
1270 1998-06-07 13:47 Ulrich Drepper <drepper@cygnus.com>
1272 * sysdeps/pthread/bits/libc-lock.h: Optimize cleanup handlers a bit.
1274 1998-06-03 Andreas Jaeger <aj@arthur.rhein-neckar.de>
1276 * attr.c: Correct typo.
1278 1998-05-01 Ulrich Drepper <drepper@cygnus.com>
1280 * manager.c (pthread_free): Unmap guard before the stack.
1281 Patch by Matthias Urlichs.
1283 1998-04-30 Ulrich Drepper <drepper@cygnus.com>
1285 * manager.c (pthread_free): Detect already free child.
1286 Patch by Xavier Leroy, reported by Matthias Urlichs.
1288 1998-04-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
1290 * Makefile (linuxthreads-version): Renamed back from
1293 1998-04-21 Ulrich Drepper <drepper@cygnus.com>
1295 * ptlongjmp.c: Add prototypes for __libc_siglongjmp and
1298 1998-04-20 14:55 Ulrich Drepper <drepper@cygnus.com>
1300 * Makefile (libpthread-routines): Add ptlongjmp and spinlock.
1301 * internals.h: Add definitions for new spinlock implementation.
1302 * ptlongjmp.c: New file.
1303 * spinlock.c: New file.
1304 * spinlock.h (acquire): Don't reschedule using __sched_yield, use
1305 new function __pthread_acquire to prevent deadlocks with thread
1306 with different priorities.
1307 Patches by Xavier Leroy <Xavier.Leroy@inria.fr>.
1309 1998-03-16 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
1311 * manager.c (__pthread_manager): Reduce first argument to select
1312 to include just the needed file descriptor.
1314 1998-03-17 00:06 Ulrich Drepper <drepper@cygnus.com>
1316 * manager.c: Fix last patch which caused core dumps.
1318 * pthread.c: Correctly handle missing SIGRTMIN.
1320 1998-03-15 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
1322 * libpthread.map: Add __libc_internal_tsd_get and
1323 __libc_internal_tsd_set. Add missing cancelable functions. Export
1324 libc internal versions of the cancelable functions.
1326 1998-03-13 16:51 Ulrich Drepper <drepper@cygnus.com>
1328 * weaks.c: Define pthread_attr_init as GLIBC_2.0 and GLIBC_2.1.
1330 1998-03-13 00:46 Ulrich Drepper <drepper@cygnus.com>
1332 * attr.c: Implement pthread_attr_[gs]etguardsize,
1333 pthread_attr_[gs]setstackaddr, pthread_attr_[gs]etstacksize.
1334 Change pthread_attr_init to have two interfaces.
1335 * internals.h (struct _pthread_descr_struct): Add new fields for
1337 * libpthread.map: Add names in GLIBC_2.1 section.
1338 * manager.c (pthread_handle_create): Implement guardsize and
1340 (pthread_free): Likewise.
1341 * pthread.c (pthread_create): Add new interface for changed
1343 * sysdeps/pthread/pthread.h: Add prototypes for new functions.
1344 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add definition of
1347 1998-03-11 00:42 Wolfram Gloger <wmglo@dent.med.uni-muenchen.de>
1349 * manager.c: Enable resetting of the thread scheduling policy
1350 to SCHED_OTHER when the parent thread has a different one.
1352 1998-02-01 13:51 Ulrich Drepper <drepper@cygnus.com>
1354 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
1355 _POSIX_ASYNCHRONOUS_IO.
1357 * sysdeps/pthread/pthread.h: Define bits for Unix98 variants of
1359 * mutex.c: Implement new mutex types.
1361 * internals.h: Include <signal.h>.
1363 * libpthread.map: Add __erno_location and __h_errno_location.
1365 * errno.c: Return pointer to variable actually in use. This might
1366 not be the one in the thread structure.
1367 * internals.h (struct _pthread_descr_struct): Add new fields p_errnop
1369 * manager.c (__pthread_manager): Set p_errnop and p_h_errnop member
1370 of manager thread structure.
1371 (pthread_handle_create): Set p_errnop and p_h_errnop members for new
1373 * pthread.c: Adapt initializer for thread structures.
1374 (__pthread_initial_thread): Set p_errnop and p_h_errnop member.
1375 (__pthread_reset_main_thread): Reset p_errnop and p_h_errnop of
1376 current thread to global variables.
1378 1998-01-31 17:27 Ulrich Drepper <drepper@cygnus.com>
1380 * rwlock.c: New file.
1381 * Makefile (libpthread-routines): Add rwlock.
1382 * sysdeps/pthread/pthread.h: Define data structures and declare
1384 * libpthread.map: Add new functions.
1386 1997-12-18 13:50 Philip Blundell <pb@nexus.co.uk>
1388 * sysdeps/arm/pt-machine.h: New file; add ARM support.
1389 * sysdeps/arm/Implies: likewise.
1390 * README: Document it.
1392 1997-12-13 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
1394 * signals.c: Remove unneeded initializer for sigwaited, saving a
1397 1997-04-11 01:18 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
1399 * semaphore.c (sem_init): Set sem_spinlock only if available.
1401 1997-12-04 01:48 Ulrich Drepper <drepper@cygnus.com>
1403 * mutex.c: Implement PTHREAD_MUTEX_CHECKERROR.
1404 * sysdeps/pthread/pthread.h: Define PTHREAD_MUTEX_CHECKERROR.
1406 * Makefile: Update from LinuxThreads 0.7.
1407 * internals.h. Likewise.
1408 * manager.c: Likewise.
1409 * mutex.c: Likewise.
1410 * pthread.c: Likewise.
1411 * signals.c: Likewise.
1412 * specific.c: Likewise.
1413 * Examples/ex3.c: Likewise.
1415 1997-11-20 18:13 Ulrich Drepper <drepper@cygnus.com>
1417 * pthread.c (__pthread_reset_main_thread): Close pipe only if still
1420 1997-10-29 05:38 Ulrich Drepper <drepper@cygnus.com>
1422 * wrapsyscall.c: Add socket functions which are also cancelation
1425 1997-10-19 21:40 Wolfram Gloger <wg@wolfram.dent.med.uni-muenchen.de>
1427 * specific.c (__libc_internal_tsd_set, __libc_internal_tsd_get):
1428 New functions for fast thread specific data within libc.
1430 * internals.h: Add new array p_libc_specific to struct
1431 _pthread_descr_struct.
1433 * sysdeps/pthread/bits/libc-lock.h: Declare new functions.
1435 1997-10-13 05:39 Ulrich Drepper <drepper@cygnus.com>
1437 * semaphore.h: Add __BEGIN_DECLS/__END_DECLS.
1438 Reported by Ralf Corsepius <corsepiu@faw.uni-ulm.de>.
1440 1997-08-29 03:05 Ulrich Drepper <drepper@cygnus.com>
1442 * internals.h (struct _pthread_descr_struct): Add definitions for
1443 two-level specific key handling.
1444 * manager.c (pthread_handle_create): Initialize specific memory array.
1445 * specific.c: Implement two-level key handling.
1446 * weaks.c: Don't provide dummy key handling.
1447 * sysdeps/pthread/bits/libc-lock.h: Typedef __libc_lock_t (no #define).
1448 Add definition of __libc_key_t.
1449 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define PTHREAD_KEYS_MAX
1451 Add definition of _POSIX_THREAD_DESTRUCTOR_ITERATIONS and
1452 PTHREAD_DESTRUCTOR_ITERATIONS.
1454 * manager.c (pthread_handle_create): Compare mmap result with
1457 * ptfork.c: Rename to __pthread_atfork and make old name a weak alias.
1458 * sysdeps/pthread/bits/pthread.h: Add prototype for __pthread_atfork.
1460 1997-08-22 19:04 Richard Henderson <rth@cygnus.com>
1462 sysdeps/sparc -> sysdeps/sparc/sparc32
1463 sysdeps/sparc64 -> sysdeps/sparc/sparc64
1465 * internals.h: Change definition of THREAD_SELF to be an expression,
1466 not a statement that did a return.
1467 * sysdeps/alpha/pt-machine.h (THREAD_SELF): Update accordingly.
1468 * sysdeps/sparc/sparc32/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF):
1469 Follow Solaris and use a "system reserved" register (%g6) to hold
1470 the thread descriptor.
1471 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
1473 1997-08-03 00:09 Ulrich Drepper <drepper@cygnus.com>
1475 * mutex.c: Correct pthread_once. Patch by Xavier Leroy.
1476 * sysdeps/pthread/pthread.h: Add prototype for __pthread_once.
1477 * sysdeps/pthread/bits/pthread.h: Add macros for __libc_once.
1479 * semaphore.c: Include spinlock.h only when needed.
1481 * specific.c (__pthread_setsepcific, __pthread_getspecific): Reject
1482 keys for entries not in use.
1484 * weaks.c: Implement key handling functions for real.
1486 1997-06-29 01:04 Richard Henderson <richard@gnu.ai.mit.edu>
1488 Initial sparc64-linux support:
1489 * linuxthreads/sysdeps/sparc64/Implies: New file.
1490 * linuxthreads/sysdeps/sparc64/pt-machine.h: Likewise.
1492 1997-06-29 00:48 Ulrich Drepper <drepper@cygnus.com>
1494 * semaphore.c: Include spinlock.h at correct place.
1497 1997-06-13 10:06 Richard Henderson <rth@tamu.edu>
1499 The Great Bit File Move:
1500 * sysdeps/alpha/semaphorebits.h: -> .../bits/semaphore.h.
1501 * sysdeps/powerpc/semaphorebits.h: Likewise.
1502 * sysdeps/pthread/cmpxchg/semaphorebits.h: Likewise.
1503 * sysdeps/pthread/no-cmpxchg/semaphorebits.h: Likewise.
1504 * sysdeps/pthread/libc-lock.h: -> bits/
1505 * sysdeps/pthread/stdio-lock.h: Likewise.
1506 * sysdeps/unix/sysv/linux/local_lim.h: Likewise.
1507 * sysdeps/unix/sysv/linux/posix_opt.h: Likewise.
1508 * semaphore.h: Likewise.
1509 * sysdeps/pthread/pthread.h: Likewise.
1511 * lockfile.c: <foo.h> -> <bits/foo.h>.
1512 * semaphore.h: Likewise.
1514 * Makefile: (headers): foo.h -> bits/foo.h.
1515 * sysdeps/pthread/Makefile: Likewise.
1517 1997-04-11 01:18 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
1519 * semaphore.c (sem_init): Set sem_spinlock only if available.
1521 * sysdeps/m68k/pt-machine.h (testandset, __compare_and_swap): Fix
1524 1997-04-09 03:00 Ulrich Drepper <drepper@cygnus.com>
1526 Update from LinuxThreads 0.6.
1528 * attr.c (pthread_attr_getdetachstate): Use __sched_get_priority_max
1529 and __sched_get_priority_min instead of names without `__'.
1531 * manager.c: Rewrite large parts to implement opaque pthread_t.
1533 * cancel.c: Adapt for opaque pthread_t type.
1534 * condvar.c: Likewise.
1535 * errno.c: Likewise.
1537 * mutex.c: Likewise.
1538 * pthread.c: Likewise.
1539 * signals.c: Likewise.
1540 * specific.c: Likewise.
1541 * restart.h: Likewise.
1542 * queue.h: Likewise.
1543 * Examples/ex3.c: Likewise.
1544 * Examples/ex4.c: Likewise.
1545 * sysdeps/pthread/pthread.h: Likewise.
1547 * pthread.c: Accumulate time for all threads in thread manager.
1549 * semaphore.c: Implement fallback implementation for architectures
1550 sometimes missing compare-exchange operations.
1552 * cancel.c (pthread_cancel): Validate handle argument.
1553 * join.c (pthread_join): Likewise.
1554 (pthread_detach): Likewise.
1555 * signals.c (pthread_kill): Likewise.
1557 * spinlock.h (acquire): Use __sched_yield not sched_yield.
1559 * queue.h (enqueue): Enqueue thread according to priority.
1561 * internals.c (struct pthread_start_args): New struct for passing
1562 args to cloning function.
1563 (struct _pthread): Rename to _pthread_descr_struct and adapt for
1566 * Examples/Makefile (clean): Pass -f option to rm.
1568 * sysdeps/i386/pt-machine.h: Add check for compare-exchange instruction
1569 and define TEST_FOR_COMPARE_AND_SWAP.
1570 * sysdeps/i386/i486/pt-machine.h: Removed.
1572 * sysdeps/unix/sysv/linux/local_lim.h (PTHREAD_THREADS_MAX): Increase
1575 1997-04-04 16:38 Ulrich Drepper <drepper@cygnus.com>
1577 * restart.h (suspend): Clear p_signal before suspending.
1578 (suspend_with_cancellation): Likewise.
1579 Patch by Xavier Leroy <Xavier.Leroy@inria.fr>.
1581 * weaks.c: Make __pthread_key_create return 1.
1582 * sysdeps/pthread/libc-lock.h: Define __libc_key_create,
1583 __libc_getspecific, __libc_setspecific, and __libc_key_t.
1584 * sysdeps/pthread/stdio-lock.h: Don't care for implementation not
1587 1997-03-19 15:13 Miguel de Icaza <miguel@nuclecu.unam.mx>
1589 * sysdeps/sparc/pt-machine (RELEASE): Fix.
1591 1997-03-01 07:55 Geoff Keating <geoffk@ozemail.com.au>
1593 * sysdeps/powerpc/Implies: Added.
1594 * sysdeps/powerpc/pt-machine.h: Added.
1595 * sysdeps/powerpc/semaphorebits.h: Added.
1597 1997-01-22 01:22 Ulrich Drepper <drepper@cygnus.com>
1599 * linuxtheads/pthread.c (__pthread_initial_thread): Correct
1601 (__pthread_manager_thread): Likewise.
1602 Reported by Andreas Jaeger.
1604 1997-01-18 22:15 Richard Henderson <rth@tamu.edu>
1606 Since sigset_t no longer fits in a register, we can't pass in the
1607 thread's initial mask so easily. Take this opportunity to simplify
1608 the clone implementation by only accepting a single void* argument.
1610 * linuxthreads/manager.c (__pthread_manager): Put thread vitals
1611 in the thread struct instead of as arguments through clone.
1612 (pthread_start_thread): Look for them there.
1613 * linuxthreads/internals.h (struct _pthread): Add p_initial_fn,
1614 p_initial_fn_arg, p_initial_mask. Fix __pthread_manager proto.
1615 * linuxthreads/pthread.c (pthread_initialize_manager): Revise