1 2000-04-18 Jakub Jelinek <jakub@redhat.com>
3 * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Use membar,
5 (READ_MEMORY_BARRIER): Define.
6 * spinlock.c (__pthread_spin_unlock): Use READ_MEMORY_BARRIER, not
8 * internals.h (READ_MEMORY_BARRIER): Define if not defined in sysdep
11 2000-04-17 Ulrich Drepper <drepper@redhat.com>
13 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
14 (pthread_getcpuclockid): Don't compare thread_id with thread_self,
17 2000-04-16 Ulrich Drepper <drepper@redhat.com>
19 * condvar.c (pthread_cond_timedwait_relative): Don't test for owner
20 if fast mutex is used. Don't initialize `already_canceled' twice.
21 Correctly test for return value of timedsuspend.
23 * pthread.c: Correct long-time braino. We never set SA_SIGINFO and
24 therefore don't need the _rt versions of the signal handlers.
26 2000-04-15 Ulrich Drepper <drepper@redhat.com>
28 * pthread.c (pthread_yield): New function.
29 * sysdeps/pthread/pthread.h (pthread_yield): Add prototype.
30 * Versions [libpthread] (GLIBC_2.2): Add pthread_yield.
31 * internals.h: Declare __pthread_yield.
33 * pthread.c (pthread_initialize): Avoid a bit more code if
34 realtime signals are known to exist.
36 * pthread.c: Is __ASSUME_REALTIME_SIGNALS then avoid generating code
37 to dynamically detect RT signals and avoid generating compatibility
38 functions with old kernel.
39 * restart.h (restart) [__ASSUME_REALTIME_SIGNALS]: Use
40 __pthread_restart_new directly.
41 (suspend) [__ASSUME_REALTIME_SIGNALS]: Use
42 __pthread_wait_for_restart_signal directly.
43 (timedsuspend) [__ASSUME_REALTIME_SIGNALS]: Use
44 __pthread_timedsuspend_new directly.
46 2000-04-15 Ulrich Drepper <drepper@redhat.com>
48 * condvar.c: Remove all the special code to handle cond_timedwait.
49 Use timedsuspend instead.
50 * internals.h: Declare __pthread_timedsuspend_old,
51 __pthread_timedsuspend_new, and __pthread_timedsuspend.
52 Remove declaration of __pthread_init_condvar.
53 * pthread.c: Define __pthread_timedsuspend variable.
54 (__pthread_timedsuspend_old): New function. Timed suspension
55 implementation for old Linux kernels.
56 (__pthread_timedsuspend_new): New function. Timed suspension
57 implementation for new Linux kernels.
58 * restart.h (timedsuspend): New function. Call appropriate
59 suspension function through __pthread_timedsuspend.
60 * semaphore.c (sem_timedwait): Use timedsuspend, don't duplicate
62 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
64 * internals.h (WRITE_MEMORY_BARRIER): Define as MEMORY_BARRIER if
66 * spinlock.c: Use WRITE_MEMORY_BARRIER instead of MEMORY_BARRIER
68 * sysdeps/alpha/pt-machine.h: Define WRITE_MEMORY_BARRIER.
69 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
71 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _POSIX_SPAWN.
72 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
74 2000-04-14 Andreas Jaeger <aj@suse.de>
78 * shlib-versions (mips.*-.*-linux.*): Support only GLIBC 2.0 and
81 2000-04-13 Ulrich Drepper <drepper@redhat.com>
83 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
84 (pthread_getcpuclockid): Fix typo.
86 2000-04-12 Ulrich Drepper <drepper@redhat.com>
88 * Makefile (libpthread-routines): Add getcpuclockid.
89 * Versions [libpthread] (GLIBC_2.2): Add pthread_getcpuclockid.
90 * sysdeps/pthread/getcpuclockid.c: New file.
91 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c: New file.
92 * sysdeps/pthread/pthread.h: Add prototype for pthread_getcpuclockid.
94 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_SPIN_LOCKS):
96 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
98 * sysdeps/pthread/pthread.h: Add prototypes for pthread_spin_init,
99 pthread_spin_destroy, pthread_spin_lock, pthread_spin_trylock,
100 and pthread_spin_unlock.
101 * sysdeps/pthread/bits/pthreadtypes.h: Change struct _pthread_fastlock
102 into pthread_spinlock_t. Change all uses.
103 * spinlock.c: Implement pthread_spin_lock.
104 Rename __pthread_unlock to __pthread_spin_unlock and define weak
106 Define pthread_spin_trylock, pthread_spin_init, and
107 pthread_spin_destroy.
108 Change all uses of _pthread_fastlock to pthread_spinlock_t.
109 * spinlock.h: Rename __pthread_unlock to __pthread_spin_unlock.
110 Change all uses of _pthread_fastlock to pthread_spinlock_t.
111 * Versions [libpthread] (GLIBC_2.2): Add pthread_spin_init,
112 pthread_spin_destroy, pthread_spin_lock, pthread_spin_trylock,
113 and pthread_spin_unlock.
114 * cancel.c: Use __pthread_spin_unlock instead of __pthread_unlock.
115 Change all uses of _pthread_fastlock to pthread_spinlock_t.
116 * condvar.c: Likewise.
117 * internals.h: Likewise.
119 * manager.c: Likewise.
121 * pthread.c: Likewise.
122 * rwlock.c: Likewise.
123 * semaphore.c: Likewise.
124 * signals.c: Likewise.
126 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add various new POSIX
128 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
130 2000-04-11 Ulrich Drepper <drepper@redhat.com>
132 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add
133 _POSIX_SHARED_MEMORY_OBJECTS.
135 2000-04-11 Andreas Jaeger <aj@suse.de>
137 * sysdeps/mips/pt-machine.h (MEMORY_BARRIER): Define.
138 (__compare_and_swap): Mark as modifying memory.
140 2000-04-11 Geoff Keating <geoffk@cygnus.com>
142 * sysdeps/powerpc/pt-machine.h (MEMORY_BARRIER): Don't be
144 (__compare_and_swap): Replace other 'sync' with MEMORY_BARRIER.
145 Don't have the 'asm' __volatile__.
147 2000-04-11 Ulrich Drepper <drepper@redhat.com>
149 * internals.h: Define MEMORY_BARRIER as empty if not defined already.
150 * spinlock.c (__pthread_lock): Add memory barriers.
151 (__pthread_unlock): Likewise.
152 * sysdeps/alpha/pt-machine.h (MEMORY_BARRIER): Define using mb
154 (RELEASE): Not needed anymore.
155 (__compare_and_swap): Mark asm as modifying memory.
156 * sysdeps/powerpc/pt-machine.h (sync): Remove. Replace with definition
158 (__compare_and_swap): Use MEMORY_BARRIER instead of sync.
159 * sysdeps/sparc/sparc32/pt-machine.h (RELEASE): Not needed anymore.
160 (MEMORY_BARRIER): Define using stbar.
161 * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Define using
163 (__compare_and_swap): Use MEMORY_BARRIER to ensure ordering.
164 Patch by Xavier Leroy <Xavier.Leroy@inria.fr> based on comments by
165 Mike Burrows <m3b@pa.dec.com>.
167 2000-04-09 Ulrich Drepper <drepper@redhat.com>
169 * signals.c (sigaction): Fix return value for the case SIG is one
170 of the signals the implementation uses.
171 Patch by Xavier.Leroy@inria.fr.
173 2000-04-01 Andreas Jaeger <aj@suse.de>
175 * attr.c: Use shlib-compat macros.
176 * oldsemaphore.c: Likewise.
177 * pthread.c: Likewise.
180 2000-03-26 Ulrich Drepper <drepper@redhat.com>
182 * semaphore.c (sem_timedwait): New function.
183 Patch by Carl Mailloux <carlm@oricom.ca>.
184 * semaphore.h: Declare sem_timedwait.
185 * Versions [libpthread] (GLIBC_2.2): Add sem_timedwait.
187 2000-03-26 Roland McGrath <roland@baalperazim.frob.com>
189 * sysdeps/pthread/Makefile: File removed.
191 2000-03-23 Ulrich Drepper <drepper@redhat.com>
193 * mutex.c (__pthread_reset_pthread_once): Reset once_masterlock.
194 * internals.h (__pthread_reset_pthread_once): Add prototype.
195 * ptfork.c (__fork): Call __pthread_reset_pthread_once.
197 * manager.c (pthread_handle_create): Store ID of new thread before
200 2000-03-21 Ulrich Drepper <drepper@redhat.com>
202 * attr.c: Use new macros from shlib-compat.h to define versions.
203 * oldsemaphore.c: Likewise.
204 * semaphore.c: Likewise.
207 * pthread.c: Update for new SHLIB_COMPAT definition.
209 * manager.c (__pthread_manager): Unmask debug signal.
211 * pthread.c (pthread_initialize): Test for address of __dso_handle
212 being NULL, not value. Use __on_exit, not on_exit.
213 Patch by Andreas Jaeger <aj@suse.de>.
215 * pthread.c: Use new macros from shlib-compat.h to define versions.
217 2000-03-19 Ulrich Drepper <drepper@redhat.com>
219 * pthread.c (pthread_initialize): Instead of on_exit use
220 __cxa_atexit if __dso_label is available to allow unloading the
221 libpthread shared library.
223 2000-03-16 Ulrich Drepper <drepper@redhat.com>
225 * condvar.c: Make tests for ownership of mutex less strict.
227 2000-03-14 Ulrich Drepper <drepper@redhat.com>
229 * condvar.c (pthread_cond_wait): Check whether mutex is owned by
230 current thread and return error if not.
231 (pthread_cond_timedwait_relative_old): Likewise.
232 (pthread_cond_timedwait_relative_new): Likewise.
234 * mutex.c (__pthread_once): Handle cancelled init function correctly.
235 (pthread_once_cancelhandler): New function.
236 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
238 2000-03-14 Andreas Jaeger <aj@suse.de>
240 * pthread.c (pthread_handle_sigcancel_rt): GS has been renamed to
242 (pthread_handle_sigrestart_rt): Likewise.
243 * signals.c (pthread_sighandler_rt): Likewise.
245 2000-03-02 Andreas Jaeger <aj@suse.de>
247 * sysdeps/pthread/bits/libc-lock.h: Fix typo.
248 Reported by Sean Chen <sean.chen@turbolinux.com>.
250 2000-02-28 Andreas Jaeger <aj@suse.de>
252 * rwlock.c: Fix typo.
254 2000-02-27 Ulrich Drepper <drepper@redhat.com>
256 * rwlock.c: Define __* variants of the functions and make old names
258 * Versions [GLIBC_2.2]: Export the __pthread_rwlock_* functions.
259 * sysdeps/pthread/bits/libc-lock.h: Define __libc_rwlock_* macros.
261 2000-02-25 Andreas Jaeger <aj@suse.de>
263 * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
264 pwrite64, lseek64, open64, and __open64 with version 2.2.
266 2000-02-22 Ulrich Drepper <drepper@redhat.com>
268 * semaphore.h (SEM_FAILED): Use 0 not NULL.
270 2000-02-14 Ulrich Drepper <drepper@redhat.com>
272 * condvar.c (pthread_cond_timedwait_relative_old): Tight loop with
273 nanosleep does not work either. Get absolute time inside the
275 (pthread_cond_timedwait_relative_new): Likewise.
276 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
278 2000-02-13 Andreas Jaeger <aj@suse.de>
280 * condvar.c (pthread_cond_timedwait_relative_new): Fix last patch.
281 (pthread_cond_timedwait_relative_old): Likewise.
283 2000-02-13 Ulrich Drepper <drepper@redhat.com>
285 * condvar.c (pthread_cond_timedwait_relative_old): Undo last patch
286 but keep the code around. A bug in the kernel prevent us from
288 (pthread_cond_timedwait_relative_new): Likewise.
289 (PR libc/1597 and libc/1598).
291 2000-02-01 Kaz Kylheku <kaz@ashi.footprints.net>
293 * condvar.c (pthread_cond_timedwait_relative_old): Do tight
294 loop around nanosleep calls instead of around most of the function
295 (pthread_cond_timedwait_relative_new): Likewise.
296 body. Got rid of backwards goto and one local.
298 2000-01-31 Ulrich Drepper <drepper@redhat.com>
300 * condvar.c (pthread_cond_timedwait_relative_old): Recompute time
301 before every nanosleep call to account for time spent in the rest
303 (pthread_cond_timedwait_relative_new): Likewise.
304 Patch by khendricks@ivey.uwo.ca (PR libc/1564).
306 2000-01-29 Ulrich Drepper <drepper@redhat.com>
308 * condvar.c (pthread_cond_timedwait_relative_old): Get remaining time
309 from nanosleep call so that in case we restart we only wait for the
311 (pthread_cond_timedwait_relative_new): Likewise.
312 Patch by khendricks@ivey.uwo.ca (PR libc/1561).
314 2000-01-18 Ulrich Drepper <drepper@cygnus.com>
316 * manager.c (pthread_allocate_stack): Compute guard page address
317 correctly. Patch by HJ Lu.
319 * sysdeps/pthread/pthread.h: Define
320 PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP.
322 2000-01-16 Ulrich Drepper <drepper@cygnus.com>
324 * rwlock.c (pthread_rwlock_unlock): Correct one more problem with
326 (pthread_rwlockattr_setkind_np): Allow
327 PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP.
328 Patches by Kaz Kylheku <kaz@ashi.footprints.net>.
330 2000-01-12 Ulrich Drepper <drepper@cygnus.com>
332 * internals.h (pthread_readlock_info): New structure.
333 (_pthread_descr_struct): Add p_readlock_list, p_readlock_free, and
334 p_untracked_readlock_count.
335 * pthread.c (__pthread_initial_thread, pthread_manager_thread):
336 Add initializers for new fields.
337 * manager.c (pthread_free): Free read/write lock lists.
338 * queue.h (queue_is_empty): New function.
339 * rwlock.c: Implement requirements about when readers should get
341 * sysdeps/pthread/pthread.h
342 (PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP): New definition.
343 * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_rwlock_t):
344 Define this name as well.
345 Patches by Kaz Kylheku <kaz@ashi.footprints.net>.
347 2000-01-05 Ulrich Drepper <drepper@cygnus.com>
349 * pthread.c (__pthread_initial_thread, pthread_manager_thread):
350 Adjust initializers for struct _pthread_descr_struct change.
351 * internals.h (struct _pthread_descr_struct): Move new elements to
354 2000-01-03 Kaz Kylheku <kaz@ashi.footprints.net>
356 Redesigned how cancellation unblocks a thread from internal
357 cancellation points (sem_wait, pthread_join,
358 pthread_cond_{wait,timedwait}).
359 Cancellation won't eat a signal in any of these functions
360 (*required* by POSIX and Single Unix Spec!).
361 * condvar.c: Spontaneous wakeup on pthread_cond_timedwait won't eat a
362 simultaneous condition variable signal (not required by POSIX
363 or Single Unix Spec, but nice).
364 * spinlock.c: __pthread_lock queues back any received restarts
365 that don't belong to it instead of assuming ownership of lock
366 upon any restart; fastlock can no longer be acquired by two threads
368 * restart.h: Restarts queue even on kernels that don't have
369 queued real time signals (2.0, early 2.1), thanks to atomic counter,
370 avoiding a rare race condition in pthread_cond_timedwait.
372 1999-12-31 Andreas Jaeger <aj@suse.de>
374 * internals.h: Remove duplicate prototype declarations.
376 * weaks.c: Remove __THROW from prototypes since the file is not
377 compiled by a C++ compiler.
378 * internals.h: Likewise.
380 1999-12-30 Andreas Jaeger <aj@suse.de>
382 * sysdeps/pthread/pthread.h: Move internal functions to...
383 * sysdeps/pthread/bits/libc-lock.h: ...here.
385 1999-12-29 Andreas Jaeger <aj@suse.de>
387 * sysdeps/pthread/pthread.h: Fix typos, reformat comments.
389 1999-12-28 Ulrich Drepper <drepper@cygnus.com>
391 * sysdeps/alpha/pt-machine.h: Move stack_pointer definition to the
394 * manager.c (__pthread_start): Add one more cast to prevent
395 warning on 64bit machines.
397 1999-12-21 Ulrich Drepper <drepper@cygnus.com>
399 * manager.c (pthread_handle_create): Set p_pid of new thread
400 before calling the callback function to report a new thread.
402 1999-12-20 Andreas Jaeger <aj@suse.de>
404 * pthread.c (pthread_initialize): Move getrlimit call after
407 1999-12-18 Ulrich Drepper <drepper@cygnus.com>
409 * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
410 pwrite64, lseek64, open64, and __open64.
411 * wrapsyscall.c: Define pread, __pread64, pread64, pwrite, __pwrite64,
412 pwrite64, lseek64, open64, and __open64.
414 * manager.c (pthread_allocate_stack): Correct computation of
415 new_thread_bottom. Correct handling of stack size and when the
416 rlimit method to guard for stack growth is used.
417 * pthread.c (pthread_initialize): Stack limit must be STACK_SIZE
418 minus one pagesize (not two).
420 1999-12-03 Andreas Jaeger <aj@suse.de>
422 * Versions: Add __res_state with version GLIBC_2.2.
424 * errno.c (__res_state): New function to return thread specific
427 * pthread.c (pthread_initialize): Initialize p_resp.
428 (__pthread_reset_main_thread): Also set p_resp.
430 * manager.c (pthread_handle_create): Initialize p_resp.
432 * internals.h: Add thread specific resolver state.
433 Based on patches by Adam D. Bradley <artdodge@cs.bu.edu>.
435 1999-12-01 Ulrich Drepper <drepper@cygnus.com>
437 * sysdeps/i386/pt-machine.h: Move stack_pointer definition to the
439 * sysdeps/i386/i686/pt-machine.h: Likewise.
440 Patches by Alan Modra <alan@SPRI.Levels.UniSA.Edu.Au>.
442 1999-11-23 Ulrich Drepper <drepper@cygnus.com>
444 * manager.c (pthread_start_thread_event): Initialize p_pid already
447 1999-11-22 Ulrich Drepper <drepper@cygnus.com>
449 * internals.h: Add prototype for __pthread_manager_event.
450 * manager.c (__pthread_manager_event): New function.
451 (pthread_start_thread_event): Correct computation of self.
452 Use INIT_THREAD_SELF.
453 * pthread.c (__pthread_manager_thread): Initialize p_lock.
454 (__pthread_initialize_manager): Respect event flags also for creation
455 of the manager thread.
457 1999-11-08 Ulrich Drepper <drepper@cygnus.com>
459 * pthread.c (__pthread_initialize_manager): Initialize
460 __pthread_manager_thread.p_tid.
462 1999-11-02 Ulrich Drepper <drepper@cygnus.com>
464 * internals.h: Declare __pthread_last_event.
465 * manager.c: Define __pthread_last_event.
466 (pthread_handle_create): Set __pthread_last_event.
467 (pthread_exited): Likewise.
468 * join.c (pthread_exit): Likewise.
470 * Makefile (libpthread-routines): Add events.
471 * events.c: New file.
472 * internals.h: Protect against multiple inclusion.
473 Include thread_dbP.h header.
474 (struct _pthread_descr_struct): Add new fields p_report_events and
476 Declare event reporting functions.
477 * join.c (pthread_exit): Signal event if this is wanted.
478 * manager.c (__pthread_threads_events): New variable.
479 (pthread_handle_create): Take new parameters with event information.
480 Signal TD_CREATE event if wanted.
481 (__pthread_manager): Adjust pthread_handle_create call.
482 (pthread_start_thread_event): New function. Block until manager is
483 finished and then call pthread_start_thread.
484 (pthread_exited): Signal TD_REAP event if wanted.
486 1999-10-26 Ulrich Drepper <drepper@cygnus.com>
488 * restart.h (suspend_with_cancellation): Rewrite as a macro.
490 * condvar.c (pthread_cond_timedwait_relative): Don't mark as inline.
492 1999-10-25 Andreas Jaeger <aj@suse.de>
494 * internals.h: Remove K&R compatibility.
495 * no-tsd.c: Likewise.
496 * semaphore.h: Likewise.
497 * signals.c: Likewise.
498 * sysdeps/pthread/bits/libc-tsd.h: Likewise.
499 * sysdeps/unix/sysv/linux/bits/sigthread.h: Likewise.
502 1999-10-21 Xavier Leroy <Xavier.Leroy@inria.fr>
504 * linuxthreads/pthread.c: For i386, wrap pthread_handle_sigrestart
505 and pthread_handle_sigcancel with functions that restore
506 %gs from the signal context. For each signal handling function,
507 two wrappers are required, one for a non-RT signal and one for
509 * linuxthreads/signal.c: For i386, add code to restore %gs
510 from the signal context in pthread_sighandler and
511 pthread_sighandler_rt.
513 1999-10-17 Ulrich Drepper <drepper@cygnus.com>
515 * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add cast.
517 1999-10-14 Ulrich Drepper <drepper@cygnus.com>
519 * pthread.c (__pthread_initial_thread): Pass argument to
520 PTHREAD_START_ARGS_INITIALIZER.
521 (__pthread_manager_thread): Likewise.
523 * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add parameter to
526 * manager.c (pthread_handle_create): Remove p_startfct initialization.
528 * internals.h (_pthread_descr_struct): We don't need p_startfct field.
530 1999-10-12 Ulrich Drepper <drepper@cygnus.com>
532 * internals.h: Correct return types for __libc_read and __libc_write.
534 1999-10-09 Andreas Jaeger <aj@suse.de>
536 * internals.h: Add __new_sem_post to get prototype in
537 manager.c; include semaphore.h for needed types.
539 1999-10-08 Ulrich Drepper <drepper@cygnus.com>
541 * manager.c (__pthread_manager) [REQ_POST]: Use __new_sem_post
542 directly instead of calling sem_post which should not be necessary
543 but is faster and might help in some case to work around problems.
544 Patch by khendricks@ivey.uwo.ca [libc/1382].
546 1999-10-08 Andreas Schwab <schwab@suse.de>
548 * sysdeps/pthread/Subdirs: New file.
551 1999-10-07 Ulrich Drepper <drepper@cygnus.com>
554 * internals.h (struct _pthread_descr_struct): Add p_startfct.
555 * manager.c (pthread_handle_create): Initialize p_startfct.
556 * pthread.c: Define __linuxthread_pthread_sizeof_descr variable.
558 1999-09-25 Ulrich Drepper <drepper@cygnus.com>
560 * manager.c (__linuxthreads_pthread_threads_max): New variable.
561 * specific.c (__linuxthreads_pthread_keys_max): New variable.
562 (__linuxthreads_pthread_key_2ndlevel_size): New variable.
564 * condvar.c (pthread_cond_timedwait_relative): Never return with
565 EINTR. Patch by Andreas Schwab.
567 1999-09-19 Ulrich Drepper <drepper@cygnus.com>
569 * signals.c (sigaction): Correct last patch. Don't select
570 pthread_sighandler_rt based on the signal number but instead of
573 1999-09-23 Ulrich Drepper <drepper@cygnus.com>
575 * specific.c: Move definitions of struct pthread_key_struct and
576 destr_function to ...
577 * internals.h: ...here.
579 1999-09-18 Ulrich Drepper <drepper@cygnus.com>
581 * pthread.c (pthread_handle_sigrestart_rt): New function. Use
582 this instead of pthread_handle_sigrestart if the signal is an RT
585 * signals.c: Handle passing through of sighandler arguments also
586 for real-time signals.
588 1999-09-03 Andreas Schwab <schwab@suse.de>
590 * ptfork.c (__fork): Renamed from fork and use __libc_fork. Add
592 (__vfork): New function, alias vfork.
593 * Versions: Export __fork, vfork, and __vfork in libpthread.
595 1999-08-23 Andreas Schwab <schwab@suse.de>
597 * signals.c (pthread_sighandler): Add SIGCONTEXT_EXTRA_ARGS to
598 call to signal handler.
600 1999-08-20 Ulrich Drepper <drepper@cygnus.com>
602 * pthread.c (__pthread_reset_main_thread): Undo last change.
603 (__pthread_kill_other_threads_np): Reset signal handlers for the
604 signals we used in the thread implementation here.
606 1999-08-19 Ulrich Drepper <drepper@cygnus.com>
608 * pthread.c (__pthread_reset_main_thread): Reset signal handlers
609 for the signals we used in the thread implementation [PR libc/1234].
611 * Versions: Export __pthread_kill_other_threads_np from libpthread
614 * signals.c: Pass sigcontext through wrapper to the user function.
616 1999-08-01 Ulrich Drepper <drepper@cygnus.com>
618 * Versions [ld.so] (GLIBC_2.0): Export __libc_internal_tsd_get and
619 __libc_internal_tsd_set.
621 1999-07-29 Andreas Jaeger <aj@arthur.rhein-neckar.de>
623 * manager.c: Remove inclusion of <linux/tasks.h> since it's not
626 1999-07-16 Andreas Jaeger <aj@arthur.rhein-neckar.de>
628 * internals.h: Align _pthread_descr_struct to 32 bytes.
629 Reported by Tim Hockin <thockin@cobaltnet.com>, close PR
632 1999-07-09 Ulrich Drepper <drepper@cygnus.com>
634 * oldsemaphore.c (sem_compare_and_swap): Fix use of compare and
637 1999-07-09 Cristian Gafton <gafton@redhat.com>
639 * Makefile (libpthread-routines): Add oldsemaphore routine.
640 * Versions: Add sem_destroy, sem_getvalue, sem_init, sem_post,
641 sem_trywait, and sem_wait to GLIBC_2.1.
642 * oldsemaphore.c: New file.
643 * semaphore.c: Add default_symbol_versions for the changed functions.
644 (__new_sem_init): Rename from sem_init.
645 (__new_sem_post): Rename from sem_post.
646 (__new_sem_wait): Rename from sem_wait.
647 (__new_sem_trywait): Rename from sem_trywait.
648 (__new_sem_getvalue): Rename from sem_getvalue.
649 (__new_sem_destroy): Rename from sem_destroy.
651 1999-06-23 Robey Pointer <robey@netscape.com>
653 * internals.h: Added p_nextlock entry to separate queueing for a
654 lock from queueing for a CV (sometimes a thread queues on a lock
655 to serialize removing itself from a CV queue).
656 * pthread.c: Added p_nextlock to initializers.
657 * spinlock.c: Changed to use p_nextlock instead of p_nextwaiting.
659 1999-07-09 Ulrich Drepper <drepper@cygnus.com>
661 * manager.c (pthread_handle_create): Free mmap region after stack
662 if clone failed. Patch by Kaz Kylheku <kaz@ashi.FootPrints.net>.
664 1999-05-23 Andreas Jaeger <aj@arthur.rhein-neckar.de>
666 * man/pthread_cond_init.man: Correct example.
667 Reported by Tomas Berndtsson <tomas@nocrew.org>.
669 * linuxthreads.texi (Condition Variables): Likewise.
671 1999-05-18 Jakub Jelinek <jj@ultra.linux.cz>
673 * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): Use
674 casx not cas, also successful casx returns the old value in rd
675 and not the new value.
677 1999-05-16 Xavier Leroy <Xavier.Leroy@inria.fr>
679 * manager.c: If pthread_create() is given a NULL attribute
680 and the thread manager runs with a realtime policy, set the
681 scheduling policy of the newly created thread back to SCHED_OTHER.
682 * manager.c: If the PTHREAD_INHERIT_SCHED attribute is given,
683 initialize the schedpolicy field of new_thread->p_start_args
684 to that of the calling thread.
686 1999-04-29 Ulrich Drepper <drepper@cygnus.com>
688 * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): cas
689 instruction does not allow memory element to use offset.
691 1999-04-28 Ulrich Drepper <drepper@cygnus.com>
693 * manager.c (pthread_allocate_stack): Optimize initialization of new
696 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_define_initialized):
697 Don't use initializer since it is all zeroes.
698 (__libc_once_define): Likewise.
700 1999-04-16 Andreas Jaeger <aj@arthur.rhein-neckar.de>
702 * sysdeps/arm/Implies: Removed since cmpxchg/no-cmpxchg
703 doesn't exist anymore.
704 * sysdeps/i386/Implies: Likewise.
705 * sysdeps/m68k/Implies: Likewise.
706 * sysdeps/mips/Implies: Likewise.
707 * sysdeps/powerpc/Implies: Likewise.
708 * sysdeps/sparc/sparc32/Implies: Likewise.
709 * sysdeps/sparc/sparc64/Implies: Likewise.
711 1999-04-15 Ulrich Drepper <drepper@cygnus.com>
713 * sysdeps/alpha/bits/semaphore.h: Removed.
714 * sysdeps/powerpc/bits/semaphore.h: Removed.
715 * sysdeps/pthread/cmpxchg/bits/semaphore.h: Removed.
716 * sysdeps/pthread/no-cmpxchg/bits/semaphore.h: Removed.
717 * Makefile (headers): Remove bits/semaphore.h.
719 * semaphore.h: Define _pthread_descr if necessary.
720 Don't include limits.h. Define SEM_VALUE_MAX directly.
722 (sem_t): Protect element names with leading __.
723 Add declarations for sem_close, sem_open, and sem_unlink.
724 * semaphore.c: Adjust all functions for new element names.
725 Define sem_close, sem_open, and sem_unlink.
726 * Versions (libthread): Add sem_close, sem_open, and sem_unlink for
728 * sysdeps/pthread/bits/pthreadtypes.h: Define _pthread_descr only if
731 1999-03-16 H.J. Lu <hjl@gnu.org>
733 * specific.c (pthread_key_delete): Check th->p_terminated to see
734 if the thread is running.
736 * Versions (__libc_internal_tsd_get, __libc_internal_tsd_set):
737 Added to GLIBC_2.0 for libc.so.
739 1999-02-12 H.J. Lu <hjl@gnu.org>
741 * Versions (__libc_current_sigrtmin, __libc_current_sigrtmax,
742 __libc_allocate_rtsig): Added to GLIBC_2.1.
744 * internals.h (DEFAULT_SIG_RESTART): Removed.
745 (DEFAULT_SIG_CANCEL): Removed.
747 * pthread.c (init_rtsigs, __libc_current_sigrtmin,
748 __libc_current_sigrtmax, __libc_allocate_rtsig): New functions.
749 (__pthread_sig_restart, __pthread_sig_cancel,
750 __pthread_sig_debug): Initialized.
751 (pthread_initialize): Call init_rtsigs () to initialize
754 1999-02-03 H.J. Lu <hjl@gnu.org>
756 * manager.c (__pthread_manager): Do block __pthread_sig_debug.
757 Don't restart the thread which sent REQ_DEBUG.
758 (pthread_start_thread): Check if __pthread_sig_debug > 0
761 * pthread.c (__pthread_initialize_manager): Suspend ourself
762 after sending __pthread_sig_debug to gdb instead of
763 __pthread_sig_cancel.
765 1999-01-24 H.J. Lu <hjl@gnu.org>
767 * manager.c (__pthread_manager): Delete __pthread_sig_debug
768 from mask if __pthread_sig_debug > 0.
769 (pthread_handle_create): Increment __pthread_handles_num.
771 * manager.c (pthread_handle_create): Don't pass CLONE_PTRACE to clone.
772 * pthread.c (__pthread_initialize_manager): Likewise.
774 * pthread.c (pthread_initialize): Use __libc_allocate_rtsig (1)
775 instead of __libc_allocate_rtsig (2).
776 (__pthread_initialize_manager): Send __pthread_sig_debug to gdb
777 instead of __pthread_sig_cancel.
778 (pthread_handle_sigdebug): Fix comments.
780 1999-01-21 Ulrich Drepper <drepper@cygnus.com>
782 * manager.c (pthread_allocate_stack): Set
783 __pthread_nonstandard_stacks if user-specified stack is used.
785 1999-01-16 Ulrich Drepper <drepper@cygnus.com>
787 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _LFS_ASYNCHRONOUS_IO,
788 _LFS_LARGEFILE, _LFS64_LARGEFILE, and _LFS64_STDIO from Unix98.
790 1999-01-07 Xavier Leroy <Xavier.Leroy@inria.fr>
792 * pthread.c: Use a third signal __pthread_sig_debug distinct
793 from __pthread_sig_cancel to notify gdb when a thread is
795 * manager.c: Likewise.
796 * internals.h: Likewise.
797 * signals.c: The implementation of sigwait(s) assumed that
798 all signals in s have signal handlers already attached.
799 This is not required by the standard, so make it work
800 also if some of the signals have no handlers.
802 1999-01-05 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
804 * linuxthreads.texi: Remove pointers from first @node. Move old
805 @node spec inside comment.
807 1998-12-31 Ulrich Drepper <drepper@cygnus.com>
809 * sysdeps/pthread/bits/stdio-lock.h: Define _IO_lock_lock and
812 1998-12-29 Ulrich Drepper <drepper@cygnus.com>
814 * semaphore.c (sem_trywait): Don't forget to unlock the semaphore
815 lock. Patch by Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>.
817 1998-12-21 Ulrich Drepper <drepper@cygnus.com>
819 * manager.c: Threads now send __pthread_sig_cancel on termination.
820 Change clone call and signal masks.
821 * thread.c (pthread_handle_sigrestart): Remove special code for
823 (pthread_handle_sigcancel): In manager thread call
824 __pthread_manager_sighandler.
825 * sysdeps/i386/pt-machine.h (__compare_and_swap): Add memory clobber.
826 * sysdeps/i386/i686/pt-machine.h: Likewise.
827 Patches by Xavier Leroy.
829 1998-12-14 Ulrich Drepper <drepper@cygnus.com>
831 * spinlock.c (__pthread_unlock): Don't crash if called for an
832 untaken mutex. Reported by Ruslan V. Brushkoff <rus@Snif.Te.Net.UA>.
834 * Examples/ex6.c: Unbuffer stdout and reduce sleep time to reduce
837 1998-12-13 Ulrich Drepper <drepper@cygnus.com>
839 * Examples/ex3.c: Wait until all threads are started before
840 searching for the number to avoid race condition on very fast
843 1998-12-08 Andreas Jaeger <aj@arthur.rhein-neckar.de>
845 * sysdeps/pthread/pthread.h: Remove __pthread_setcanceltype
846 declaration since it's not needed.
848 * sysdeps/pthread/pthread.h: Move internal functions to ...
849 * internals.h: ...here.
851 1998-12-02 H.J. Lu <hjl@gnu.org>
853 * pthread.c (__pthread_sig_restart): Initiliaze to 0 if
855 (__pthread_sig_cancel): Likewise.
857 1998-12-01 Andreas Jaeger <aj@arthur.rhein-neckar.de>
859 * wrapsyscall.c: Include <sys/mman.h> for msync,
860 <stdlib.h> for system and <termios.h> for tcdrain prototype.
861 Correct msync declaration.
863 1998-11-29 Roland McGrath <roland@baalperazim.frob.com>
865 * sysdeps/pthread/bits/libc-tsd.h (__libc_tsd_define, __libc_tsd_get,
866 __libc_tsd_set): New macros for new interface.
867 * no-tsd.c: New file, provide uninitialized defns of
868 __libc_internal_tsd_get and __libc_internal_tsd_set.
869 * Makefile (routines): Add no-tsd.
871 1998-10-12 Roland McGrath <roland@baalperazim.frob.com>
873 * internals.h: Include <bits/libc-tsd.h>, not <bits/libc-lock.h>.
874 * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
875 __libc_internal_tsd_set): Move decls to ...
876 * sysdeps/pthread/bits/libc-tsd.h: New file for __libc_internal_tsd_*
879 * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
880 __libc_internal_tsd_set): Make these pointers to functions, not
881 functions; remove #pragma weak decls for them.
882 * specific.c (__libc_internal_tsd_get, __libc_internal_tsd_set):
883 Define static functions and initialized pointers to them.
885 1998-11-18 Ulrich Drepper <drepper@cygnus.com>
887 * Makefile (CFLAGS-mutex.c): Define as -D__NO_WEAK_PTHREAD_ALIASES.
888 (CFLAGS-specific.c): Likewise.
889 (CFLAGS-pthread.c): Likewise.
890 (CFLAGS-ptfork.c): Likewise.
891 (CFLAGS-cancel.c): Likewise.
892 * sysdeps/pthread/bits/libc-lock.h: Don't mark __pthread_* functions
893 as weak references if __NO_WEAK_PTHREAD_ALIASES is defined.
895 * mutex.c (pthread_mutex_init): Define as strong symbol.
896 (pthread_mutex_destroy): Likewise.
897 (pthread_mutex_trylock): Likewise.
898 (pthread_mutex_lock): Likewise.
899 (pthread_mutex_unlock): Likewise.
900 (pthread_mutexattr_init): Likewise.
901 (pthread_mutexattr_destroy): Likewise.
902 (pthread_once): Likewise.
903 * ptfork.c (pthread_atfork): Likewise.
904 * specific.c (pthread_key_create): Likewise.
905 (pthread_setspecific): Likewise.
906 (pthread_getspecific): Likewise.
908 1998-11-15 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
910 * linuxthreads.texi: Fix punctuation after xref.
912 1998-11-10 H.J. Lu <hjl@gnu.org>
914 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine NR_OPEN
915 if it is defined in <linux/limits.h>.
917 1998-10-29 14:28 Ulrich Drepper <drepper@cygnus.com>
919 * spinlock.h (__pthread_trylock): Define inline.
920 (__pthread_lock): Add extra parameter to declaration. Declare
921 using internal_function.
922 (__pthread_unlock): Declare using internal_function.
923 * spinlock.c (__pthread_lock): Add new parameter. Use it instead
924 of local variable self. Avoid recomputing self. Define using
926 (__pthread_trylock): Remove.
927 (__pthread_unlock): Define using internal_function.
928 * cancel.c: Adjust for __pthread_lock interface change. Use already
929 computed self value is possible.
930 * condvar.c: Likewise.
932 * manager.c: Likewise.
934 * pthread.c: Likewise.
935 * rwlock.c: Likewise.
936 * semaphore.c: Likewise.
937 * signals.c: Likewise.
939 1998-10-27 13:46 Ulrich Drepper <drepper@cygnus.com>
941 * sysdeps/pthread/pthread.h (struct _pthread_cleanup_buffer): Prepend
942 __ to field names of the struct.
943 * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_fastlock):
945 (pthread_attr_t): Likewise.
946 (pthread_cond_t): Likewise.
947 (pthread_condattr_t): Likewise.
948 (pthread_mutex_t): Likewise.
949 (pthread_mutexattr_t): Likewise.
950 (pthread_rwlock_t): Likewise.
951 (pthread_rwlockattr_t): Likewise.
952 * attr.c: Adjust for pthread.h and pthreadtypes.h change.
953 * cancel.c: Likewise.
954 * condvar.c: Likewise.
955 * manager.c: Likewise.
957 * pthread.c: Likewise.
958 * ptlongjmp.c: Likewise.
959 * rwlock.c: Likewise.
960 * spinlock.c: Likewise.
962 1998-10-09 Ulrich Drepper <drepper@cygnus.com>
964 * sysdeps/i386/pt-machine.h (get_eflags, set_eflags): Mark these
967 * sysdeps/i386/i686/pt-machine.h: Remove unused inline
970 * Makefile (libpthread-routines): Add pt-machine.
971 * pt-machine.c: New file.
972 * sysdeps/alpha/pt-machine.h: Define PT_EI as extern inline is not
973 yet defined. Use PT_EI in extern inline definitions.
974 * sysdeps/arm/pt-machine.h: Likewise.
975 * sysdeps/i386/pt-machine.h: Likewise.
976 * sysdeps/i386/i686/pt-machine.h: Likewise.
977 * sysdeps/m68k/pt-machine.h: Likewise.
978 * sysdeps/mips/pt-machine.h: Likewise.
979 * sysdeps/powerpc/pt-machine.h: Likewise.
980 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
981 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
983 1998-10-02 Andreas Jaeger <aj@arthur.rhein-neckar.de>
985 * semaphore.h: Include <sys/types.h> so that _pthread_descr
988 1998-09-15 David S. Miller <davem@pierdol.cobaltmicro.com>
990 * sysdeps/sparc/sparc32/pt-machine.h (INIT_THREAD_SELF): Add nr
992 * sysdeps/sparc/sparc64/pt-machine.h (INIT_THREAD_SELF): Likewise.
994 1998-09-12 14:24 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu>
996 * linuxthreads/sysdeps/unix/sysv/linux/bits/sigthread.h: Add
997 multiple inclusion guard.
999 1998-09-02 11:08 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
1001 * signals.c (sigaction): Check that sig is less than NSIG to avoid
1002 array index overflow.
1004 1998-09-06 10:56 Ulrich Drepper <drepper@cygnus.com>
1006 * sysdeps/pthread/semaphore.h: New file.
1008 1998-09-06 09:08 Ulrich Drepper <drepper@cygnus.com>
1010 * sysdeps/pthread/bits/libc-lock.h (enum __libc_tsd_key_t): Add
1011 _LIBC_TSD_KEY_DL_ERROR.
1013 1998-08-31 Ulrich Drepper <drepper@cygnus.com>
1015 * sysdeps/i386/i686/pt-machine.h (testandset): Add memory clobber.
1016 * sysdeps/i386/pt-machine.h: Likewise.
1017 Suggested by Roland McGrath.
1019 1998-08-28 13:58 Ulrich Drepper <drepper@cygnus.com>
1021 * internals.h: Also define THREAD_GETMEM_NC and THREAD_SETMEM_NC to
1022 access thread data with non-constant offsets.
1023 * specific.c: Use THREAD_GETMEM_NC and THREAD_SETMEM_NC where
1026 * sysdeps/i386/useldt.h: Fix typo. Add THREAD_GETMEM_NC and
1027 THREAD_SETMEM_NC definitions.
1029 * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM_NC and
1031 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
1033 1998-08-26 15:46 Ulrich Drepper <drepper@cygnus.com>
1035 * internals.h: Define THREAD_GETMEM and THREAD_SETMEM to default if
1036 not already defined.
1037 (struct _pthread_descr_struct): Add p_self and p_nr field.
1038 * manager.c (__pthread_handles): Define second element to point
1040 (__pthread_handles_num): Initialize to 2.
1041 (__pthread_manager): Use INIT_THREAD_SELF with two arguments.
1042 (pthread_start_thread): Likewise.
1043 (pthread_handle_create): Start search for free slot at entry 2.
1044 Initialize new fields p_self and p_nr.
1045 Call __clone with CLONE_PTRACE if available.
1046 (pthread_free): Call FREE_THREAD_SELF if available.
1047 * pthread.c (__pthread_initial_thread): Initialize new fields.
1048 (__pthread_manager_thread): Likewise.
1049 (__pthread_initialize_manager): Call __clone with CLONE_PTRACE.
1051 * cancel.c: Use THREAD_GETMEM and THREAD_SETMEM to access the
1052 elements of the thread descriptor.
1053 * condvar.c: Likewise.
1054 * errno.c: Likewise.
1056 * manager.c: Likewise.
1057 * pthread.c: Likewise.
1058 * ptlongjmp.c: Likewise.
1059 * semaphore.c: Likewise.
1060 * signals.c: Likewise.
1061 * specific.c: Likewise.
1062 * spinlock.c: Likewise.
1064 * sysdeps/alpha/pt-machine.h (INIT_THREAD_SELF): Add extra parameter.
1066 * sysdeps/i386/useldt.h: New file.
1067 * sysdeps/i386/i686/pt-machine.h: Show how to use this file.
1069 * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM and
1070 THREAD_SETMEM using __thread_self.
1071 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
1073 1998-08-24 Geoff Keating <geoffk@ozemail.com.au>
1075 * spinlock.c (__pthread_lock): Reset p_nextwaiting to NULL if it
1076 turned out that we didn't need to queue after all.
1078 1998-08-22 Geoff Keating <geoffk@ozemail.com.au>
1080 * sysdeps/powerpc/pt-machine.h: Remove testandset, it's not used
1081 and wastes space; correct types.
1083 1998-08-08 11:18 H.J. Lu <hjl@gnu.org>
1085 * signals.c (sigaction): Handle NULL argument.
1087 1998-08-04 Ulrich Drepper <drepper@cygnus.com>
1089 * sysdeps/unix/sysv/linux/bits/sigthread.h: Use __sigset_t instead
1092 1998-08-02 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
1094 * Makefile (linuxthreads-version): Extract correct number from
1097 1998-07-29 Xavier Leroy <Xavier.Leroy@inria.fr>
1099 * Banner: Bump version number to 0.8
1100 * FAQ.html: Many updates, in particular w.r.t. debugging.
1101 * manager.c: Support for non-default stacksize for
1102 LinuxThreads-allocated stacks;
1103 don't use guard pages for stacks with default size, rely on
1104 rlimit(RLIMIT_STACK) instead (it's cheaper).
1106 * cancel.c: Use __pthread_sig_cancel and __pthread_sig_restart
1107 everywhere instead of PTHREAD_SIG_CANCEL and PTHREAD_SIG_RESTART.
1108 * condvar.c: Likewise.
1109 * internals.h: Likewise.
1110 * restart.h: Likewise.
1111 * signals.c: Likewise.
1112 * pthread.c: Likewise; set rlimit(RLIMIT_STACK) as we need it.
1114 1998-07-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
1116 * weaks.c: Define pthread_mutexattr_[sg]ettype instead of
1117 __pthread_mutexattr_[sg]ettype. Add more weak aliases.
1118 * Versions: Put __pthread_mutexattr_settype under version
1119 GLIBC_2.0. Don't export __pthread_mutexattr_setkind_np and
1120 __pthread_mutexattr_gettype.
1122 1998-07-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
1124 * sysdeps/pthread/bits/libc-lock.h: Make
1125 __pthread_mutexattr_settype weak. Don't make
1126 __pthread_mutexattr_setkind_np weak.
1128 1998-07-16 10:52 Ulrich Drepper <drepper@cygnus.com>
1130 * manager.c (pthread_handle_create): Check whether sched_setscheduler
1131 call can succeed here.
1133 * mutex.c: Define __pthread_mutexattr_settype and make
1134 __pthread_mutexattr_setkind_np an alias.
1135 Likewise for __pthread_mutexattr_gettype.
1137 1998-07-15 11:00 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu>
1139 * attr.c (pthread_attr_setschedpolicy): Don't check whether caller
1142 1998-07-14 19:38 Ulrich Drepper <drepper@cygnus.com>
1144 * sysdeps/pthread/bits/libc-lock.h: Define __libc_cleanup_end.
1146 1998-07-11 Andreas Jaeger <aj@arthur.rhein-neckar.de>
1148 * Examples/ex6.c: Include <unistd.h> for usleep.
1150 1998-06-13 11:04 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
1152 * Examples/ex4.c (main): Use exit, not pthread_exit.
1154 1998-07-09 13:39 Ulrich Drepper <drepper@cygnus.com>
1156 * Versions: Add __pthread_mutexattr_gettype and
1157 __pthread_mutexattr_settype.
1158 * lockfile.c: Use __pthread_mutexattr_settype instead of
1159 __pthread_mutexattr_setkind_np.
1160 * mutex.c: Define __pthread_mutexattr_gettype and
1161 __pthread_mutexattr_settype.
1163 * sysdeps/pthread/pthread.h: Declare __pthread_mutexattr_gettype and
1164 __pthread_mutexattr_settype.
1165 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_init_recursive):
1166 Use __pthread_mutexattr_settype.
1168 1998-07-08 22:26 Ulrich Drepper <drepper@cygnus.com>
1170 * Versions: Add pthread_mutexattr_gettype, pthread_mutexattr_settype.
1171 * mutex.c: Define weak alias pthread_mutexattr_gettype and
1172 pthread_mutexattr_settype.
1173 * sysdeps/pthread/pthread.h: Declare these functions.
1174 Move pthread_sigmask and pthread_kill declaration in separate header.
1175 * sysdeps/unix/sysv/linux/bits/sigthread.h: New file.
1177 1998-07-07 15:20 Ulrich Drepper <drepper@cygnus.com>
1179 * Makefile: Add rules to compile and run tests.
1180 * Examples/ex1.c: Little changes to fix warnings.
1181 * Examples/ex2.c: Likewise.
1182 * Examples/ex3.c: Likewise.
1183 * Examples/ex4.c: Likewise.
1184 * Examples/ex5.c: Likewise.
1185 * Examples/ex6.c: New file.
1187 1998-07-05 11:54 Ulrich Drepper <drepper@cygnus.com>
1189 * Versions: Add pthread_attr_init to GLIBC_2.1 version in libc.
1191 1998-07-01 Andreas Jaeger <aj@arthur.rhein-neckar.de>
1193 * attr.c: Include <string.h>.
1195 1998-06-30 11:47 Ulrich Drepper <drepper@cygnus.com>
1197 * attr.c: Include errno.h. Use memcpy to copy sched_param.
1198 * internals.h: Include limits.h.
1199 * manager.c: Use memcpy to copy sched_param.
1200 * ptfork.c: Include errno.h.
1201 * pthread.c: Likewise.
1202 * semaphore.c: Likewise.
1203 * specific.c: Likewise.
1204 * spinlock.h: Likewise.
1205 * sysdeps/pthread/pthread.h: Include only allowed headers. Move
1206 type definition to ...
1207 * sysdeps/pthread/bits/pthreadtypes.h: ...here. New file.
1209 1998-06-29 12:34 Ulrich Drepper <drepper@cygnus.com>
1211 * sysdeps/pthread/pthread.h: Use __PMT not __P for function pointers.
1213 * sysdeps/pthread/pthread.h: Define various PTHREAD_* symbols also
1214 as macros as demanded in POSIX.1, Annex C.
1216 1998-06-29 12:29 Ulrich Drepper <drepper@cygnus.com>
1218 * internals.h (struct pthread_request): For free use pthread_t
1219 instead of pthread_descr.
1220 * join.c (pthread_join): Pass thread_id, not th to manager.
1221 (pthread_detach): Likewise.
1222 * manager.c (__pthread_manager): Except thread ID in FREE_REQ case.
1223 (pthread_exited): Remove detached queue code.
1224 (pthread_handle_free): Expect thread ID parameter and use it to
1225 validate the thread decsriptor. Don't use detached queue.
1226 Patches by Xavier Leroy.
1228 1998-06-27 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
1230 * libpthread.map: Export accept, longjmp, sigaction, siglongjmp,
1231 _IO_flockfile, _IO_ftrylockfile, _IO_funlockfile,
1232 __pthread_atfork, __pthread_key_create, __pthread_once.
1233 * internals.h: Doc fix.
1234 * pthread.c (__pthread_initialize): Define again.
1236 1998-06-26 Ulrich Drepper <drepper@cygnus.com>
1238 * manager.c (pthread_exited): If thread is not detached put it on
1240 (pthread_handle_free): If thread is not on list with living threads
1241 search on list with detached threads.
1243 * sysdeps/pthread/pthread.h (PTHREAD_RWLOCK_INITIALIZER): Correct
1244 for new definition of pthread_rwlock_t.
1246 * spinlock.c: Correct test whether to compile
1247 __pthread_compare_and_swap or not.
1249 1998-06-25 19:27 Ulrich Drepper <drepper@cygnus.com>
1251 * attr.c: Finish user stack support. Change locking code to be safe
1252 in situations with different priorities.
1253 * cancel.c: Likewise.
1254 * condvar.c: Likewise.
1255 * internals.h: Likewise.
1257 * manager.c: Likewise.
1258 * mutex.c: Likewise.
1259 * pthread.c: Likewise.
1260 * ptlongjmp.c: Likewise.
1261 * queue.h: Likewise.
1262 * rwlock.c: Likewise.
1263 * semaphore.c: Likewise.
1264 * semaphore.h: Likewise.
1265 * signals.c: Likewise.
1266 * spinlock.c: Likewise.
1267 * spinlock.h: Likewise.
1268 * sysdeps/pthread/pthread.h: Likewise.
1269 Patches by Xavier Leroy.
1271 * sysdeps/i386/i686/pt-machine.h: New file.
1273 1998-06-25 Ulrich Drepper <drepper@cygnus.com>
1275 * sysdeps/pthread/pthread.h: Make [sg]et_stacksize and
1276 [sg]et_stackaddr prototypes always available.
1278 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
1279 _POSIX_THREAD_ATTR_STACKSIZE and _POSIX_THREAD_ATTR_STACKADDR.
1281 1998-06-24 Ulrich Drepper <drepper@cygnus.com>
1283 * manager.c (pthread_free): Undo patch from 980430.
1284 Reported by David Wragg <dpw@doc.ic.ac.uk>.
1286 1998-06-09 15:07 Ulrich Drepper <drepper@cygnus.com>
1288 * manager.c: Define __pthread_manager_adjust_prio and use it to
1289 increase priority when needed.
1290 * internals.h: Add prototype for __pthread_manager_adjust_prio.
1291 * mutex.c: Optimize mutexes to wake up only one thread.
1292 * pthread.c: Move PID of manager for global variable in structure
1294 Patches by Xavier Leroy.
1296 1998-06-07 13:47 Ulrich Drepper <drepper@cygnus.com>
1298 * sysdeps/pthread/bits/libc-lock.h: Optimize cleanup handlers a bit.
1300 1998-06-03 Andreas Jaeger <aj@arthur.rhein-neckar.de>
1302 * attr.c: Correct typo.
1304 1998-05-01 Ulrich Drepper <drepper@cygnus.com>
1306 * manager.c (pthread_free): Unmap guard before the stack.
1307 Patch by Matthias Urlichs.
1309 1998-04-30 Ulrich Drepper <drepper@cygnus.com>
1311 * manager.c (pthread_free): Detect already free child.
1312 Patch by Xavier Leroy, reported by Matthias Urlichs.
1314 1998-04-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
1316 * Makefile (linuxthreads-version): Renamed back from
1319 1998-04-21 Ulrich Drepper <drepper@cygnus.com>
1321 * ptlongjmp.c: Add prototypes for __libc_siglongjmp and
1324 1998-04-20 14:55 Ulrich Drepper <drepper@cygnus.com>
1326 * Makefile (libpthread-routines): Add ptlongjmp and spinlock.
1327 * internals.h: Add definitions for new spinlock implementation.
1328 * ptlongjmp.c: New file.
1329 * spinlock.c: New file.
1330 * spinlock.h (acquire): Don't reschedule using __sched_yield, use
1331 new function __pthread_acquire to prevent deadlocks with thread
1332 with different priorities.
1333 Patches by Xavier Leroy <Xavier.Leroy@inria.fr>.
1335 1998-03-16 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
1337 * manager.c (__pthread_manager): Reduce first argument to select
1338 to include just the needed file descriptor.
1340 1998-03-17 00:06 Ulrich Drepper <drepper@cygnus.com>
1342 * manager.c: Fix last patch which caused core dumps.
1344 * pthread.c: Correctly handle missing SIGRTMIN.
1346 1998-03-15 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
1348 * libpthread.map: Add __libc_internal_tsd_get and
1349 __libc_internal_tsd_set. Add missing cancelable functions. Export
1350 libc internal versions of the cancelable functions.
1352 1998-03-13 16:51 Ulrich Drepper <drepper@cygnus.com>
1354 * weaks.c: Define pthread_attr_init as GLIBC_2.0 and GLIBC_2.1.
1356 1998-03-13 00:46 Ulrich Drepper <drepper@cygnus.com>
1358 * attr.c: Implement pthread_attr_[gs]etguardsize,
1359 pthread_attr_[gs]setstackaddr, pthread_attr_[gs]etstacksize.
1360 Change pthread_attr_init to have two interfaces.
1361 * internals.h (struct _pthread_descr_struct): Add new fields for
1363 * libpthread.map: Add names in GLIBC_2.1 section.
1364 * manager.c (pthread_handle_create): Implement guardsize and
1366 (pthread_free): Likewise.
1367 * pthread.c (pthread_create): Add new interface for changed
1369 * sysdeps/pthread/pthread.h: Add prototypes for new functions.
1370 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add definition of
1373 1998-03-11 00:42 Wolfram Gloger <wmglo@dent.med.uni-muenchen.de>
1375 * manager.c: Enable resetting of the thread scheduling policy
1376 to SCHED_OTHER when the parent thread has a different one.
1378 1998-02-01 13:51 Ulrich Drepper <drepper@cygnus.com>
1380 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
1381 _POSIX_ASYNCHRONOUS_IO.
1383 * sysdeps/pthread/pthread.h: Define bits for Unix98 variants of
1385 * mutex.c: Implement new mutex types.
1387 * internals.h: Include <signal.h>.
1389 * libpthread.map: Add __erno_location and __h_errno_location.
1391 * errno.c: Return pointer to variable actually in use. This might
1392 not be the one in the thread structure.
1393 * internals.h (struct _pthread_descr_struct): Add new fields p_errnop
1395 * manager.c (__pthread_manager): Set p_errnop and p_h_errnop member
1396 of manager thread structure.
1397 (pthread_handle_create): Set p_errnop and p_h_errnop members for new
1399 * pthread.c: Adapt initializer for thread structures.
1400 (__pthread_initial_thread): Set p_errnop and p_h_errnop member.
1401 (__pthread_reset_main_thread): Reset p_errnop and p_h_errnop of
1402 current thread to global variables.
1404 1998-01-31 17:27 Ulrich Drepper <drepper@cygnus.com>
1406 * rwlock.c: New file.
1407 * Makefile (libpthread-routines): Add rwlock.
1408 * sysdeps/pthread/pthread.h: Define data structures and declare
1410 * libpthread.map: Add new functions.
1412 1997-12-18 13:50 Philip Blundell <pb@nexus.co.uk>
1414 * sysdeps/arm/pt-machine.h: New file; add ARM support.
1415 * sysdeps/arm/Implies: likewise.
1416 * README: Document it.
1418 1997-12-13 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
1420 * signals.c: Remove unneeded initializer for sigwaited, saving a
1423 1997-04-11 01:18 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
1425 * semaphore.c (sem_init): Set sem_spinlock only if available.
1427 1997-12-04 01:48 Ulrich Drepper <drepper@cygnus.com>
1429 * mutex.c: Implement PTHREAD_MUTEX_CHECKERROR.
1430 * sysdeps/pthread/pthread.h: Define PTHREAD_MUTEX_CHECKERROR.
1432 * Makefile: Update from LinuxThreads 0.7.
1433 * internals.h. Likewise.
1434 * manager.c: Likewise.
1435 * mutex.c: Likewise.
1436 * pthread.c: Likewise.
1437 * signals.c: Likewise.
1438 * specific.c: Likewise.
1439 * Examples/ex3.c: Likewise.
1441 1997-11-20 18:13 Ulrich Drepper <drepper@cygnus.com>
1443 * pthread.c (__pthread_reset_main_thread): Close pipe only if still
1446 1997-10-29 05:38 Ulrich Drepper <drepper@cygnus.com>
1448 * wrapsyscall.c: Add socket functions which are also cancelation
1451 1997-10-19 21:40 Wolfram Gloger <wg@wolfram.dent.med.uni-muenchen.de>
1453 * specific.c (__libc_internal_tsd_set, __libc_internal_tsd_get):
1454 New functions for fast thread specific data within libc.
1456 * internals.h: Add new array p_libc_specific to struct
1457 _pthread_descr_struct.
1459 * sysdeps/pthread/bits/libc-lock.h: Declare new functions.
1461 1997-10-13 05:39 Ulrich Drepper <drepper@cygnus.com>
1463 * semaphore.h: Add __BEGIN_DECLS/__END_DECLS.
1464 Reported by Ralf Corsepius <corsepiu@faw.uni-ulm.de>.
1466 1997-08-29 03:05 Ulrich Drepper <drepper@cygnus.com>
1468 * internals.h (struct _pthread_descr_struct): Add definitions for
1469 two-level specific key handling.
1470 * manager.c (pthread_handle_create): Initialize specific memory array.
1471 * specific.c: Implement two-level key handling.
1472 * weaks.c: Don't provide dummy key handling.
1473 * sysdeps/pthread/bits/libc-lock.h: Typedef __libc_lock_t (no #define).
1474 Add definition of __libc_key_t.
1475 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define PTHREAD_KEYS_MAX
1477 Add definition of _POSIX_THREAD_DESTRUCTOR_ITERATIONS and
1478 PTHREAD_DESTRUCTOR_ITERATIONS.
1480 * manager.c (pthread_handle_create): Compare mmap result with
1483 * ptfork.c: Rename to __pthread_atfork and make old name a weak alias.
1484 * sysdeps/pthread/bits/pthread.h: Add prototype for __pthread_atfork.
1486 1997-08-22 19:04 Richard Henderson <rth@cygnus.com>
1488 sysdeps/sparc -> sysdeps/sparc/sparc32
1489 sysdeps/sparc64 -> sysdeps/sparc/sparc64
1491 * internals.h: Change definition of THREAD_SELF to be an expression,
1492 not a statement that did a return.
1493 * sysdeps/alpha/pt-machine.h (THREAD_SELF): Update accordingly.
1494 * sysdeps/sparc/sparc32/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF):
1495 Follow Solaris and use a "system reserved" register (%g6) to hold
1496 the thread descriptor.
1497 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
1499 1997-08-03 00:09 Ulrich Drepper <drepper@cygnus.com>
1501 * mutex.c: Correct pthread_once. Patch by Xavier Leroy.
1502 * sysdeps/pthread/pthread.h: Add prototype for __pthread_once.
1503 * sysdeps/pthread/bits/pthread.h: Add macros for __libc_once.
1505 * semaphore.c: Include spinlock.h only when needed.
1507 * specific.c (__pthread_setsepcific, __pthread_getspecific): Reject
1508 keys for entries not in use.
1510 * weaks.c: Implement key handling functions for real.
1512 1997-06-29 01:04 Richard Henderson <richard@gnu.ai.mit.edu>
1514 Initial sparc64-linux support:
1515 * linuxthreads/sysdeps/sparc64/Implies: New file.
1516 * linuxthreads/sysdeps/sparc64/pt-machine.h: Likewise.
1518 1997-06-29 00:48 Ulrich Drepper <drepper@cygnus.com>
1520 * semaphore.c: Include spinlock.h at correct place.
1523 1997-06-13 10:06 Richard Henderson <rth@tamu.edu>
1525 The Great Bit File Move:
1526 * sysdeps/alpha/semaphorebits.h: -> .../bits/semaphore.h.
1527 * sysdeps/powerpc/semaphorebits.h: Likewise.
1528 * sysdeps/pthread/cmpxchg/semaphorebits.h: Likewise.
1529 * sysdeps/pthread/no-cmpxchg/semaphorebits.h: Likewise.
1530 * sysdeps/pthread/libc-lock.h: -> bits/
1531 * sysdeps/pthread/stdio-lock.h: Likewise.
1532 * sysdeps/unix/sysv/linux/local_lim.h: Likewise.
1533 * sysdeps/unix/sysv/linux/posix_opt.h: Likewise.
1534 * semaphore.h: Likewise.
1535 * sysdeps/pthread/pthread.h: Likewise.
1537 * lockfile.c: <foo.h> -> <bits/foo.h>.
1538 * semaphore.h: Likewise.
1540 * Makefile: (headers): foo.h -> bits/foo.h.
1541 * sysdeps/pthread/Makefile: Likewise.
1543 1997-04-11 01:18 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
1545 * semaphore.c (sem_init): Set sem_spinlock only if available.
1547 * sysdeps/m68k/pt-machine.h (testandset, __compare_and_swap): Fix
1550 1997-04-09 03:00 Ulrich Drepper <drepper@cygnus.com>
1552 Update from LinuxThreads 0.6.
1554 * attr.c (pthread_attr_getdetachstate): Use __sched_get_priority_max
1555 and __sched_get_priority_min instead of names without `__'.
1557 * manager.c: Rewrite large parts to implement opaque pthread_t.
1559 * cancel.c: Adapt for opaque pthread_t type.
1560 * condvar.c: Likewise.
1561 * errno.c: Likewise.
1563 * mutex.c: Likewise.
1564 * pthread.c: Likewise.
1565 * signals.c: Likewise.
1566 * specific.c: Likewise.
1567 * restart.h: Likewise.
1568 * queue.h: Likewise.
1569 * Examples/ex3.c: Likewise.
1570 * Examples/ex4.c: Likewise.
1571 * sysdeps/pthread/pthread.h: Likewise.
1573 * pthread.c: Accumulate time for all threads in thread manager.
1575 * semaphore.c: Implement fallback implementation for architectures
1576 sometimes missing compare-exchange operations.
1578 * cancel.c (pthread_cancel): Validate handle argument.
1579 * join.c (pthread_join): Likewise.
1580 (pthread_detach): Likewise.
1581 * signals.c (pthread_kill): Likewise.
1583 * spinlock.h (acquire): Use __sched_yield not sched_yield.
1585 * queue.h (enqueue): Enqueue thread according to priority.
1587 * internals.c (struct pthread_start_args): New struct for passing
1588 args to cloning function.
1589 (struct _pthread): Rename to _pthread_descr_struct and adapt for
1592 * Examples/Makefile (clean): Pass -f option to rm.
1594 * sysdeps/i386/pt-machine.h: Add check for compare-exchange instruction
1595 and define TEST_FOR_COMPARE_AND_SWAP.
1596 * sysdeps/i386/i486/pt-machine.h: Removed.
1598 * sysdeps/unix/sysv/linux/local_lim.h (PTHREAD_THREADS_MAX): Increase
1601 1997-04-04 16:38 Ulrich Drepper <drepper@cygnus.com>
1603 * restart.h (suspend): Clear p_signal before suspending.
1604 (suspend_with_cancellation): Likewise.
1605 Patch by Xavier Leroy <Xavier.Leroy@inria.fr>.
1607 * weaks.c: Make __pthread_key_create return 1.
1608 * sysdeps/pthread/libc-lock.h: Define __libc_key_create,
1609 __libc_getspecific, __libc_setspecific, and __libc_key_t.
1610 * sysdeps/pthread/stdio-lock.h: Don't care for implementation not
1613 1997-03-19 15:13 Miguel de Icaza <miguel@nuclecu.unam.mx>
1615 * sysdeps/sparc/pt-machine (RELEASE): Fix.
1617 1997-03-01 07:55 Geoff Keating <geoffk@ozemail.com.au>
1619 * sysdeps/powerpc/Implies: Added.
1620 * sysdeps/powerpc/pt-machine.h: Added.
1621 * sysdeps/powerpc/semaphorebits.h: Added.
1623 1997-01-22 01:22 Ulrich Drepper <drepper@cygnus.com>
1625 * linuxtheads/pthread.c (__pthread_initial_thread): Correct
1627 (__pthread_manager_thread): Likewise.
1628 Reported by Andreas Jaeger.
1630 1997-01-18 22:15 Richard Henderson <rth@tamu.edu>
1632 Since sigset_t no longer fits in a register, we can't pass in the
1633 thread's initial mask so easily. Take this opportunity to simplify
1634 the clone implementation by only accepting a single void* argument.
1636 * linuxthreads/manager.c (__pthread_manager): Put thread vitals
1637 in the thread struct instead of as arguments through clone.
1638 (pthread_start_thread): Look for them there.
1639 * linuxthreads/internals.h (struct _pthread): Add p_initial_fn,
1640 p_initial_fn_arg, p_initial_mask. Fix __pthread_manager proto.
1641 * linuxthreads/pthread.c (pthread_initialize_manager): Revise