1 2000-06-10 Ulrich Drepper <drepper@redhat.com>
3 * pthread.c (__pthread_create_2_1): Optimize a bit.
5 * internals.h (invalid_handle): Also test for p_terminated != 0.
6 (nonexisting_handle): New function. Same as old invalid_handle.
7 * join.c (pthread_join): Use nonexisting_handle instead of
8 invalid_handle to test for acceptable thread handle.
9 * manager.c (pthread_handle_free): Likewise.
10 Reported by Permaine Cheung <pcheung@cygnus.com>.
12 2000-06-08 Ulrich Drepper <drepper@redhat.com>
14 * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
15 Correct handling of matching variable.
17 * sysdeps/pthread/tst-timer.c (main): Rewrite initializers to
20 * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
21 Be prepared for empty timer list.
23 * sysdeps/pthread/timer_create.c (timer_create): Correct names of
24 CPUTIME clock ID. Add support for thread clocks.
26 * sysdeps/pthread/posix-timer.h (timer_ptr2id): Operands in
27 subtraction were switched.
29 * sysdeps/pthread/timer_routines.c (init_module): Use
30 THREAD_MAXNODES threads.
32 * sysdeps/pthread/posix-timer.h (struct timer_node): Add creator_pid.
33 * sysdeps/pthread/timer_create.c: Fill in creator_pid.
34 * sysdeps/pthread/timer_routines.c (thread_expire_timer): Send signal
35 with sigqueueinfo is this system call is available.
37 * sysdeps/pthread/timer_create.c (timer_create): Allow
38 CLOCK_CPUTIME if _POSIX_CPUTIME is defined.
40 * sysdeps/pthread/Makefile: New file. Add rules to build timer
42 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add TIMER_MAX.
44 2000-06-04 Kaz Kylheku <kaz@ashi.footprints.net>
46 * sysdeps/pthread/posix-timer.h: New file.
47 * sysdeps/pthread/timer_create.c: New file.
48 * sysdeps/pthread/timer_delete.c: New file.
49 * sysdeps/pthread/timer_getoverr.c: New file.
50 * sysdeps/pthread/timer_gettime.c: New file.
51 * sysdeps/pthread/timer_routines.c: New file.
52 * sysdeps/pthread/timer_settime.c: New file.
53 * sysdeps/pthread/tst-timer.c: New file.
55 2000-06-08 Ulrich Drepper <drepper@redhat.com>
57 * sysdeps/unix/sysv/linux/bits/local_lim.h: Remove OPEN_MAX and
58 LINK_MAX definitions if necessary.
60 2000-06-04 Kaz Kylheku <kaz@ashi.footprints.net>
62 Added missing fork time handling of global libio lock.
64 * lockfile.c (__fresetlockfiles): Now also resets the list lock,
65 not just the individual stream locks. Rewritten to use new
66 iterator interface provided by libio rather than accessing
69 * lockfile.c (__flockfilelist, _funlockfilelist): New functions
70 which lock and unlock the stream list using the new interface
72 * internals.h: Likewise.
74 * ptfork.c (__fork): Now calls __flockfilelist before fork,
75 and __funlockfilelist in the parent after the fork.
76 Child still calls __fresetlockfiles as before.
78 * linuxthreads.texi: Now explains what happens to streams at
79 fork time. Also whole new section on forking and thread added.
80 Definition of pthread_atfork moved out of Miscellaneous Functions
83 2000-06-04 Jakub Jelinek <jakub@redhat.com>
85 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c (__pthread_spin_lock):
87 * sysdeps/sparc/sparc64/pspinlock.c (__pthread_spin_lock): Likewise.
89 2000-06-02 Jakub Jelinek <jakub@redhat.com>
91 * sysdeps/sparc/sparc32/pspinlock.c: Implement spinlocks.
92 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: New.
93 * sysdeps/sparc/sparc64/pspinlock.c: Implement spinlocks.
95 2000-05-31 Andreas Jaeger <aj@suse.de>
97 * sysdeps/mips/pspinlock.c: Implement spinlocks.
99 2000-05-28 Ulrich Drepper <drepper@redhat.com>
101 * spinlock.c (__pthread_lock): Remove ASSERT.
103 * Makefile (tests): Add ex8.
104 * Examples/ex8.c: New file.
106 2000-05-12 Kaz Kylheku <kaz@ashi.footprints.net>
108 Bugfix: The pthread_atfork mechanism now takes care of its
109 own internal mutex at fork time.
111 * ptfork.c (__fork): Revised so that the mutex is held across
112 the fork operation and while the handlers are called, and so that
113 the child resets the mutex.
115 * linuxthreads.texi: Updated pthread_atfork documentation to make
116 it clear that fork and pthread_atfork can't be reentered from
117 atfork handlers, that pthread_atfork and fork are mutually atomic,
118 and that the handlers are inherited by the child process.
120 2000-05-24 Ulrich Drepper <drepper@redhat.com>
122 * Makefile (libpthread-routines): Add pspinlock.
123 * cancel.c: Rename __pthread_spin_unlock back to __pthread_unlock.
124 Use struct _pthread_fastlock instead of pthread_spinlock_t.
125 * condvar.c: Likewise.
126 * internals.h: Likewise.
128 * manager.c: Likewise.
130 * pthread.c: Likewise.
131 * rwlock.c: Likewise.
132 * semaphore.c: Likewise.
133 * signals.c: Likewise.
134 * spinlock.h: Likewise.
135 * spinlock.c: Likewise. Remove pthread_spin_lock functions.
136 * sysdeps/alpha/pspinlock.c: New file.
137 * sysdeps/arm/pspinlock.c: New file.
138 * sysdeps/i386/pspinlock.c: New file.
139 * sysdeps/m68k/pspinlock.c: New file.
140 * sysdeps/mips/pspinlock.c: New file.
141 * sysdeps/powerpc/pspinlock.c: New file.
142 * sysdeps/sparc/sparc32/pspinlock.c: New file.
143 * sysdeps/sparc/sparc64/pspinlock.c: New file.
144 * sysdeps/pthread/bits/pthreadtypes.h: Remove pthread_spinlock_t
145 back to _pthread_fastlock. Define new pthread_spinlock_t.
147 2000-05-24 Andreas Jaeger <aj@suse.de>
149 * sysdeps/i386/i686/pt-machine.h: Only use LDT on newer kernels.
151 2000-05-21 Jakub Jelinek <jakub@redhat.com>
153 * manager.c (pthread_handle_create): Initialize p_res._sock to -1.
155 2000-05-13 Jakub Jelinek <jakub@redhat.com>
157 * internals.h (__RES_PTHREAD_INTERNAL): Define.
159 2000-05-06 Kaz Kylheku <kaz@ashi.footprints.net>
161 * mutex.c (pthread_once): IN_PROGRESS state of pthread_once_t
162 object state is represented with additional bits which distinguish
163 whether that state was set up in the current process, or
164 in an ancestor process. If that state was set in an ancestor,
165 it means that a fork happened while thread was executing the init
166 function. In that case, the state is reset to NEVER.
167 * mutex.c (__pthread_once_fork_prepare): New function.
168 (__pthread_once_fork_child): Likewise
169 (__pthread_once_fork_parent): Likewise
170 (__pthread_reset_pthread_once): Removed.
171 * ptfork.c (__fork): Call new handlers in mutex.c.
172 * internals.h: Declarations of new mutex.c functions added.
173 Declaration of removed function deleted.
174 * linuxthreads.texi: Updated documentation about pthread_once
175 to clarify what happens under cancellation and forking.
177 2000-05-06 Kaz Kylheku <kaz@ashi.footprints.net>
179 * internals.h: New thread manager request type, REQ_KICK.
180 * join.c (pthread_exit): main thread now calls exit() instead
181 of _exit() in order to proper process cleanup.
182 * manager.c (__pthread_manager): Do not terminate manager
183 after unblocking main thread; wait for main thread's
184 REQ_PROCESS_EXIT request instead.
185 Also, added REQ_KICK case to handle new request; this just does
187 * manager.c (pthread_exited): Do not terminate manager after
188 unblocking main thread.
189 * manager.c (__pthread_manager_sighandler): If the main thread
190 is waiting for all other threads to die, send a REQ_KICK into
191 the thread manager request pipe to get it to clean out the threads
192 and unblock the main thread as soon as possible. This fixes
193 the 2000 millisecond hang on shutdown bug.
194 * Examples/ex7.c: New file, tests shutdown behavior when all threads
195 including the main one call pthread_exit(), or implicitly do so.
196 * Makefile (tests): Add ex7.
198 2000-05-05 Andreas Jaeger <aj@suse.de>
200 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
201 (pthread_getcpuclockid): Correct test for ourselves.
203 2000-05-05 Ulrich Drepper <drepper@redhat.com>
205 * internals.h (struct _pthread_descr_struct): Reorganization.
206 Allocate room for 16 pointers at head of the structure for future
207 thread-local data handling. Move p_self member in this area.
208 * manager.c (pthread_handle_create): Adjust use of p_self.
209 * sysdeps/i386/useldt.h (THREAD_SELF): Likewise.
210 * pthread.c (__pthread_initial_thread): Adjust initialization.
211 (__pthread_manager_thread): Likewise.
213 2000-04-29 Bruno Haible <haible@clisp.cons.org>
215 * join.c (pthread_exit): Use THREAD_GETMEM_NC instead of THREAD_GETMEM
216 for eventmask larger than 1 word.
218 2000-04-27 Ulrich Drepper <drepper@redhat.com>
220 * Versions [libpthread] (GLIBC_2.2): Add __pthread_initialize_minimal.
221 * pthread.c (__pthread_initialize_minimal): New function. Perform
222 minimal initialization.
223 (pthread_initialize): Remove this code here.
224 * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h" again. We
225 are working around the problem in glibc.
227 2000-04-25 Ulrich Drepper <drepper@redhat.com>
229 * sysdeps/i386/i686/pt-machine.h: Do not use "../useldt.h" for
230 now. First gcc must be fixed (more concrete: libgcc).
232 2000-04-24 Ulrich Drepper <drepper@redhat.com>
234 * pthread.c: Remove special treatement for interrupt handlers on x86.
235 * manager.c (pthread_free): Use FREE_THREAD not FREE_THREAD_SELF.
236 * sysdeps/i386/useldt.h: Use "q" constraint instead of "r" where
238 * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h".
240 2000-04-24 Mark Kettenis <kettenis@gnu.org>
242 * join.c (pthread_exit): Set p_terminated after reporting the
243 termination event instead of before.
245 2000-04-20 Jakub Jelinek <jakub@redhat.com>
247 * sysdeps/pthread/bits/libc-lock.h: Only declare __pthread_rwlock_*
250 2000-04-18 Andreas Jaeger <aj@suse.de>
252 * Versions: Use ld instead of ld.so.
254 2000-04-18 Jakub Jelinek <jakub@redhat.com>
256 * sysdeps/unix/sysv/linux/sparc/bits/sigcontext.h (struct sigcontext):
257 Remove the typedef keyword.
259 2000-04-18 Jakub Jelinek <jakub@redhat.com>
261 * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Use membar,
263 (READ_MEMORY_BARRIER): Define.
264 * spinlock.c (__pthread_spin_unlock): Use READ_MEMORY_BARRIER, not
266 * internals.h (READ_MEMORY_BARRIER): Define if not defined in sysdep
269 2000-04-17 Ulrich Drepper <drepper@redhat.com>
271 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
272 (pthread_getcpuclockid): Don't compare thread_id with thread_self,
275 2000-04-16 Ulrich Drepper <drepper@redhat.com>
277 * condvar.c (pthread_cond_timedwait_relative): Don't test for owner
278 if fast mutex is used. Don't initialize `already_canceled' twice.
279 Correctly test for return value of timedsuspend.
281 * pthread.c: Correct long-time braino. We never set SA_SIGINFO and
282 therefore don't need the _rt versions of the signal handlers.
284 2000-04-15 Ulrich Drepper <drepper@redhat.com>
286 * pthread.c (pthread_yield): New function.
287 * sysdeps/pthread/pthread.h (pthread_yield): Add prototype.
288 * Versions [libpthread] (GLIBC_2.2): Add pthread_yield.
289 * internals.h: Declare __pthread_yield.
291 * pthread.c (pthread_initialize): Avoid a bit more code if
292 realtime signals are known to exist.
294 * pthread.c: Is __ASSUME_REALTIME_SIGNALS then avoid generating code
295 to dynamically detect RT signals and avoid generating compatibility
296 functions with old kernel.
297 * restart.h (restart) [__ASSUME_REALTIME_SIGNALS]: Use
298 __pthread_restart_new directly.
299 (suspend) [__ASSUME_REALTIME_SIGNALS]: Use
300 __pthread_wait_for_restart_signal directly.
301 (timedsuspend) [__ASSUME_REALTIME_SIGNALS]: Use
302 __pthread_timedsuspend_new directly.
304 2000-04-15 Ulrich Drepper <drepper@redhat.com>
306 * condvar.c: Remove all the special code to handle cond_timedwait.
307 Use timedsuspend instead.
308 * internals.h: Declare __pthread_timedsuspend_old,
309 __pthread_timedsuspend_new, and __pthread_timedsuspend.
310 Remove declaration of __pthread_init_condvar.
311 * pthread.c: Define __pthread_timedsuspend variable.
312 (__pthread_timedsuspend_old): New function. Timed suspension
313 implementation for old Linux kernels.
314 (__pthread_timedsuspend_new): New function. Timed suspension
315 implementation for new Linux kernels.
316 * restart.h (timedsuspend): New function. Call appropriate
317 suspension function through __pthread_timedsuspend.
318 * semaphore.c (sem_timedwait): Use timedsuspend, don't duplicate
320 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
322 * internals.h (WRITE_MEMORY_BARRIER): Define as MEMORY_BARRIER if
324 * spinlock.c: Use WRITE_MEMORY_BARRIER instead of MEMORY_BARRIER
326 * sysdeps/alpha/pt-machine.h: Define WRITE_MEMORY_BARRIER.
327 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
329 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _POSIX_SPAWN.
330 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
332 2000-04-14 Andreas Jaeger <aj@suse.de>
336 * shlib-versions (mips.*-.*-linux.*): Support only GLIBC 2.0 and
337 2.2 for linuxthreads.
339 2000-04-13 Ulrich Drepper <drepper@redhat.com>
341 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
342 (pthread_getcpuclockid): Fix typo.
344 2000-04-12 Ulrich Drepper <drepper@redhat.com>
346 * Makefile (libpthread-routines): Add getcpuclockid.
347 * Versions [libpthread] (GLIBC_2.2): Add pthread_getcpuclockid.
348 * sysdeps/pthread/getcpuclockid.c: New file.
349 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c: New file.
350 * sysdeps/pthread/pthread.h: Add prototype for pthread_getcpuclockid.
352 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_SPIN_LOCKS):
354 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
356 * sysdeps/pthread/pthread.h: Add prototypes for pthread_spin_init,
357 pthread_spin_destroy, pthread_spin_lock, pthread_spin_trylock,
358 and pthread_spin_unlock.
359 * sysdeps/pthread/bits/pthreadtypes.h: Change struct _pthread_fastlock
360 into pthread_spinlock_t. Change all uses.
361 * spinlock.c: Implement pthread_spin_lock.
362 Rename __pthread_unlock to __pthread_spin_unlock and define weak
364 Define pthread_spin_trylock, pthread_spin_init, and
365 pthread_spin_destroy.
366 Change all uses of _pthread_fastlock to pthread_spinlock_t.
367 * spinlock.h: Rename __pthread_unlock to __pthread_spin_unlock.
368 Change all uses of _pthread_fastlock to pthread_spinlock_t.
369 * Versions [libpthread] (GLIBC_2.2): Add pthread_spin_init,
370 pthread_spin_destroy, pthread_spin_lock, pthread_spin_trylock,
371 and pthread_spin_unlock.
372 * cancel.c: Use __pthread_spin_unlock instead of __pthread_unlock.
373 Change all uses of _pthread_fastlock to pthread_spinlock_t.
374 * condvar.c: Likewise.
375 * internals.h: Likewise.
377 * manager.c: Likewise.
379 * pthread.c: Likewise.
380 * rwlock.c: Likewise.
381 * semaphore.c: Likewise.
382 * signals.c: Likewise.
384 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add various new POSIX
386 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
388 2000-04-11 Ulrich Drepper <drepper@redhat.com>
390 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add
391 _POSIX_SHARED_MEMORY_OBJECTS.
393 2000-04-11 Andreas Jaeger <aj@suse.de>
395 * sysdeps/mips/pt-machine.h (MEMORY_BARRIER): Define.
396 (__compare_and_swap): Mark as modifying memory.
398 2000-04-11 Geoff Keating <geoffk@cygnus.com>
400 * sysdeps/powerpc/pt-machine.h (MEMORY_BARRIER): Don't be
402 (__compare_and_swap): Replace other 'sync' with MEMORY_BARRIER.
403 Don't have the 'asm' __volatile__.
405 2000-04-11 Ulrich Drepper <drepper@redhat.com>
407 * internals.h: Define MEMORY_BARRIER as empty if not defined already.
408 * spinlock.c (__pthread_lock): Add memory barriers.
409 (__pthread_unlock): Likewise.
410 * sysdeps/alpha/pt-machine.h (MEMORY_BARRIER): Define using mb
412 (RELEASE): Not needed anymore.
413 (__compare_and_swap): Mark asm as modifying memory.
414 * sysdeps/powerpc/pt-machine.h (sync): Remove. Replace with definition
416 (__compare_and_swap): Use MEMORY_BARRIER instead of sync.
417 * sysdeps/sparc/sparc32/pt-machine.h (RELEASE): Not needed anymore.
418 (MEMORY_BARRIER): Define using stbar.
419 * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Define using
421 (__compare_and_swap): Use MEMORY_BARRIER to ensure ordering.
422 Patch by Xavier Leroy <Xavier.Leroy@inria.fr> based on comments by
423 Mike Burrows <m3b@pa.dec.com>.
425 2000-04-09 Ulrich Drepper <drepper@redhat.com>
427 * signals.c (sigaction): Fix return value for the case SIG is one
428 of the signals the implementation uses.
429 Patch by Xavier.Leroy@inria.fr.
431 2000-04-01 Andreas Jaeger <aj@suse.de>
433 * attr.c: Use shlib-compat macros.
434 * oldsemaphore.c: Likewise.
435 * pthread.c: Likewise.
438 2000-03-26 Ulrich Drepper <drepper@redhat.com>
440 * semaphore.c (sem_timedwait): New function.
441 Patch by Carl Mailloux <carlm@oricom.ca>.
442 * semaphore.h: Declare sem_timedwait.
443 * Versions [libpthread] (GLIBC_2.2): Add sem_timedwait.
445 2000-03-26 Roland McGrath <roland@baalperazim.frob.com>
447 * sysdeps/pthread/Makefile: File removed.
449 2000-03-23 Ulrich Drepper <drepper@redhat.com>
451 * mutex.c (__pthread_reset_pthread_once): Reset once_masterlock.
452 * internals.h (__pthread_reset_pthread_once): Add prototype.
453 * ptfork.c (__fork): Call __pthread_reset_pthread_once.
455 * manager.c (pthread_handle_create): Store ID of new thread before
458 2000-03-21 Ulrich Drepper <drepper@redhat.com>
460 * attr.c: Use new macros from shlib-compat.h to define versions.
461 * oldsemaphore.c: Likewise.
462 * semaphore.c: Likewise.
465 * pthread.c: Update for new SHLIB_COMPAT definition.
467 * manager.c (__pthread_manager): Unmask debug signal.
469 * pthread.c (pthread_initialize): Test for address of __dso_handle
470 being NULL, not value. Use __on_exit, not on_exit.
471 Patch by Andreas Jaeger <aj@suse.de>.
473 * pthread.c: Use new macros from shlib-compat.h to define versions.
475 2000-03-19 Ulrich Drepper <drepper@redhat.com>
477 * pthread.c (pthread_initialize): Instead of on_exit use
478 __cxa_atexit if __dso_label is available to allow unloading the
479 libpthread shared library.
481 2000-03-16 Ulrich Drepper <drepper@redhat.com>
483 * condvar.c: Make tests for ownership of mutex less strict.
485 2000-03-14 Ulrich Drepper <drepper@redhat.com>
487 * condvar.c (pthread_cond_wait): Check whether mutex is owned by
488 current thread and return error if not.
489 (pthread_cond_timedwait_relative_old): Likewise.
490 (pthread_cond_timedwait_relative_new): Likewise.
492 * mutex.c (__pthread_once): Handle cancelled init function correctly.
493 (pthread_once_cancelhandler): New function.
494 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
496 2000-03-14 Andreas Jaeger <aj@suse.de>
498 * pthread.c (pthread_handle_sigcancel_rt): GS has been renamed to
500 (pthread_handle_sigrestart_rt): Likewise.
501 * signals.c (pthread_sighandler_rt): Likewise.
503 2000-03-02 Andreas Jaeger <aj@suse.de>
505 * sysdeps/pthread/bits/libc-lock.h: Fix typo.
506 Reported by Sean Chen <sean.chen@turbolinux.com>.
508 2000-02-28 Andreas Jaeger <aj@suse.de>
510 * rwlock.c: Fix typo.
512 2000-02-27 Ulrich Drepper <drepper@redhat.com>
514 * rwlock.c: Define __* variants of the functions and make old names
516 * Versions [GLIBC_2.2]: Export the __pthread_rwlock_* functions.
517 * sysdeps/pthread/bits/libc-lock.h: Define __libc_rwlock_* macros.
519 2000-02-25 Andreas Jaeger <aj@suse.de>
521 * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
522 pwrite64, lseek64, open64, and __open64 with version 2.2.
524 2000-02-22 Ulrich Drepper <drepper@redhat.com>
526 * semaphore.h (SEM_FAILED): Use 0 not NULL.
528 2000-02-14 Ulrich Drepper <drepper@redhat.com>
530 * condvar.c (pthread_cond_timedwait_relative_old): Tight loop with
531 nanosleep does not work either. Get absolute time inside the
533 (pthread_cond_timedwait_relative_new): Likewise.
534 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
536 2000-02-13 Andreas Jaeger <aj@suse.de>
538 * condvar.c (pthread_cond_timedwait_relative_new): Fix last patch.
539 (pthread_cond_timedwait_relative_old): Likewise.
541 2000-02-13 Ulrich Drepper <drepper@redhat.com>
543 * condvar.c (pthread_cond_timedwait_relative_old): Undo last patch
544 but keep the code around. A bug in the kernel prevent us from
546 (pthread_cond_timedwait_relative_new): Likewise.
547 (PR libc/1597 and libc/1598).
549 2000-02-01 Kaz Kylheku <kaz@ashi.footprints.net>
551 * condvar.c (pthread_cond_timedwait_relative_old): Do tight
552 loop around nanosleep calls instead of around most of the function
553 (pthread_cond_timedwait_relative_new): Likewise.
554 body. Got rid of backwards goto and one local.
556 2000-01-31 Ulrich Drepper <drepper@redhat.com>
558 * condvar.c (pthread_cond_timedwait_relative_old): Recompute time
559 before every nanosleep call to account for time spent in the rest
561 (pthread_cond_timedwait_relative_new): Likewise.
562 Patch by khendricks@ivey.uwo.ca (PR libc/1564).
564 2000-01-29 Ulrich Drepper <drepper@redhat.com>
566 * condvar.c (pthread_cond_timedwait_relative_old): Get remaining time
567 from nanosleep call so that in case we restart we only wait for the
569 (pthread_cond_timedwait_relative_new): Likewise.
570 Patch by khendricks@ivey.uwo.ca (PR libc/1561).
572 2000-01-18 Ulrich Drepper <drepper@cygnus.com>
574 * manager.c (pthread_allocate_stack): Compute guard page address
575 correctly. Patch by HJ Lu.
577 * sysdeps/pthread/pthread.h: Define
578 PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP.
580 2000-01-16 Ulrich Drepper <drepper@cygnus.com>
582 * rwlock.c (pthread_rwlock_unlock): Correct one more problem with
584 (pthread_rwlockattr_setkind_np): Allow
585 PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP.
586 Patches by Kaz Kylheku <kaz@ashi.footprints.net>.
588 2000-01-12 Ulrich Drepper <drepper@cygnus.com>
590 * internals.h (pthread_readlock_info): New structure.
591 (_pthread_descr_struct): Add p_readlock_list, p_readlock_free, and
592 p_untracked_readlock_count.
593 * pthread.c (__pthread_initial_thread, pthread_manager_thread):
594 Add initializers for new fields.
595 * manager.c (pthread_free): Free read/write lock lists.
596 * queue.h (queue_is_empty): New function.
597 * rwlock.c: Implement requirements about when readers should get
599 * sysdeps/pthread/pthread.h
600 (PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP): New definition.
601 * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_rwlock_t):
602 Define this name as well.
603 Patches by Kaz Kylheku <kaz@ashi.footprints.net>.
605 2000-01-05 Ulrich Drepper <drepper@cygnus.com>
607 * pthread.c (__pthread_initial_thread, pthread_manager_thread):
608 Adjust initializers for struct _pthread_descr_struct change.
609 * internals.h (struct _pthread_descr_struct): Move new elements to
612 2000-01-03 Kaz Kylheku <kaz@ashi.footprints.net>
614 Redesigned how cancellation unblocks a thread from internal
615 cancellation points (sem_wait, pthread_join,
616 pthread_cond_{wait,timedwait}).
617 Cancellation won't eat a signal in any of these functions
618 (*required* by POSIX and Single Unix Spec!).
619 * condvar.c: Spontaneous wakeup on pthread_cond_timedwait won't eat a
620 simultaneous condition variable signal (not required by POSIX
621 or Single Unix Spec, but nice).
622 * spinlock.c: __pthread_lock queues back any received restarts
623 that don't belong to it instead of assuming ownership of lock
624 upon any restart; fastlock can no longer be acquired by two threads
626 * restart.h: Restarts queue even on kernels that don't have
627 queued real time signals (2.0, early 2.1), thanks to atomic counter,
628 avoiding a rare race condition in pthread_cond_timedwait.
630 1999-12-31 Andreas Jaeger <aj@suse.de>
632 * internals.h: Remove duplicate prototype declarations.
634 * weaks.c: Remove __THROW from prototypes since the file is not
635 compiled by a C++ compiler.
636 * internals.h: Likewise.
638 1999-12-30 Andreas Jaeger <aj@suse.de>
640 * sysdeps/pthread/pthread.h: Move internal functions to...
641 * sysdeps/pthread/bits/libc-lock.h: ...here.
643 1999-12-29 Andreas Jaeger <aj@suse.de>
645 * sysdeps/pthread/pthread.h: Fix typos, reformat comments.
647 1999-12-28 Ulrich Drepper <drepper@cygnus.com>
649 * sysdeps/alpha/pt-machine.h: Move stack_pointer definition to the
652 * manager.c (__pthread_start): Add one more cast to prevent
653 warning on 64bit machines.
655 1999-12-21 Ulrich Drepper <drepper@cygnus.com>
657 * manager.c (pthread_handle_create): Set p_pid of new thread
658 before calling the callback function to report a new thread.
660 1999-12-20 Andreas Jaeger <aj@suse.de>
662 * pthread.c (pthread_initialize): Move getrlimit call after
665 1999-12-18 Ulrich Drepper <drepper@cygnus.com>
667 * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
668 pwrite64, lseek64, open64, and __open64.
669 * wrapsyscall.c: Define pread, __pread64, pread64, pwrite, __pwrite64,
670 pwrite64, lseek64, open64, and __open64.
672 * manager.c (pthread_allocate_stack): Correct computation of
673 new_thread_bottom. Correct handling of stack size and when the
674 rlimit method to guard for stack growth is used.
675 * pthread.c (pthread_initialize): Stack limit must be STACK_SIZE
676 minus one pagesize (not two).
678 1999-12-03 Andreas Jaeger <aj@suse.de>
680 * Versions: Add __res_state with version GLIBC_2.2.
682 * errno.c (__res_state): New function to return thread specific
685 * pthread.c (pthread_initialize): Initialize p_resp.
686 (__pthread_reset_main_thread): Also set p_resp.
688 * manager.c (pthread_handle_create): Initialize p_resp.
690 * internals.h: Add thread specific resolver state.
691 Based on patches by Adam D. Bradley <artdodge@cs.bu.edu>.
693 1999-12-01 Ulrich Drepper <drepper@cygnus.com>
695 * sysdeps/i386/pt-machine.h: Move stack_pointer definition to the
697 * sysdeps/i386/i686/pt-machine.h: Likewise.
698 Patches by Alan Modra <alan@SPRI.Levels.UniSA.Edu.Au>.
700 1999-11-23 Ulrich Drepper <drepper@cygnus.com>
702 * manager.c (pthread_start_thread_event): Initialize p_pid already
705 1999-11-22 Ulrich Drepper <drepper@cygnus.com>
707 * internals.h: Add prototype for __pthread_manager_event.
708 * manager.c (__pthread_manager_event): New function.
709 (pthread_start_thread_event): Correct computation of self.
710 Use INIT_THREAD_SELF.
711 * pthread.c (__pthread_manager_thread): Initialize p_lock.
712 (__pthread_initialize_manager): Respect event flags also for creation
713 of the manager thread.
715 1999-11-08 Ulrich Drepper <drepper@cygnus.com>
717 * pthread.c (__pthread_initialize_manager): Initialize
718 __pthread_manager_thread.p_tid.
720 1999-11-02 Ulrich Drepper <drepper@cygnus.com>
722 * internals.h: Declare __pthread_last_event.
723 * manager.c: Define __pthread_last_event.
724 (pthread_handle_create): Set __pthread_last_event.
725 (pthread_exited): Likewise.
726 * join.c (pthread_exit): Likewise.
728 * Makefile (libpthread-routines): Add events.
729 * events.c: New file.
730 * internals.h: Protect against multiple inclusion.
731 Include thread_dbP.h header.
732 (struct _pthread_descr_struct): Add new fields p_report_events and
734 Declare event reporting functions.
735 * join.c (pthread_exit): Signal event if this is wanted.
736 * manager.c (__pthread_threads_events): New variable.
737 (pthread_handle_create): Take new parameters with event information.
738 Signal TD_CREATE event if wanted.
739 (__pthread_manager): Adjust pthread_handle_create call.
740 (pthread_start_thread_event): New function. Block until manager is
741 finished and then call pthread_start_thread.
742 (pthread_exited): Signal TD_REAP event if wanted.
744 1999-10-26 Ulrich Drepper <drepper@cygnus.com>
746 * restart.h (suspend_with_cancellation): Rewrite as a macro.
748 * condvar.c (pthread_cond_timedwait_relative): Don't mark as inline.
750 1999-10-25 Andreas Jaeger <aj@suse.de>
752 * internals.h: Remove K&R compatibility.
753 * no-tsd.c: Likewise.
754 * semaphore.h: Likewise.
755 * signals.c: Likewise.
756 * sysdeps/pthread/bits/libc-tsd.h: Likewise.
757 * sysdeps/unix/sysv/linux/bits/sigthread.h: Likewise.
760 1999-10-21 Xavier Leroy <Xavier.Leroy@inria.fr>
762 * linuxthreads/pthread.c: For i386, wrap pthread_handle_sigrestart
763 and pthread_handle_sigcancel with functions that restore
764 %gs from the signal context. For each signal handling function,
765 two wrappers are required, one for a non-RT signal and one for
767 * linuxthreads/signal.c: For i386, add code to restore %gs
768 from the signal context in pthread_sighandler and
769 pthread_sighandler_rt.
771 1999-10-17 Ulrich Drepper <drepper@cygnus.com>
773 * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add cast.
775 1999-10-14 Ulrich Drepper <drepper@cygnus.com>
777 * pthread.c (__pthread_initial_thread): Pass argument to
778 PTHREAD_START_ARGS_INITIALIZER.
779 (__pthread_manager_thread): Likewise.
781 * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add parameter to
784 * manager.c (pthread_handle_create): Remove p_startfct initialization.
786 * internals.h (_pthread_descr_struct): We don't need p_startfct field.
788 1999-10-12 Ulrich Drepper <drepper@cygnus.com>
790 * internals.h: Correct return types for __libc_read and __libc_write.
792 1999-10-09 Andreas Jaeger <aj@suse.de>
794 * internals.h: Add __new_sem_post to get prototype in
795 manager.c; include semaphore.h for needed types.
797 1999-10-08 Ulrich Drepper <drepper@cygnus.com>
799 * manager.c (__pthread_manager) [REQ_POST]: Use __new_sem_post
800 directly instead of calling sem_post which should not be necessary
801 but is faster and might help in some case to work around problems.
802 Patch by khendricks@ivey.uwo.ca [libc/1382].
804 1999-10-08 Andreas Schwab <schwab@suse.de>
806 * sysdeps/pthread/Subdirs: New file.
809 1999-10-07 Ulrich Drepper <drepper@cygnus.com>
812 * internals.h (struct _pthread_descr_struct): Add p_startfct.
813 * manager.c (pthread_handle_create): Initialize p_startfct.
814 * pthread.c: Define __linuxthread_pthread_sizeof_descr variable.
816 1999-09-25 Ulrich Drepper <drepper@cygnus.com>
818 * manager.c (__linuxthreads_pthread_threads_max): New variable.
819 * specific.c (__linuxthreads_pthread_keys_max): New variable.
820 (__linuxthreads_pthread_key_2ndlevel_size): New variable.
822 * condvar.c (pthread_cond_timedwait_relative): Never return with
823 EINTR. Patch by Andreas Schwab.
825 1999-09-19 Ulrich Drepper <drepper@cygnus.com>
827 * signals.c (sigaction): Correct last patch. Don't select
828 pthread_sighandler_rt based on the signal number but instead of
831 1999-09-23 Ulrich Drepper <drepper@cygnus.com>
833 * specific.c: Move definitions of struct pthread_key_struct and
834 destr_function to ...
835 * internals.h: ...here.
837 1999-09-18 Ulrich Drepper <drepper@cygnus.com>
839 * pthread.c (pthread_handle_sigrestart_rt): New function. Use
840 this instead of pthread_handle_sigrestart if the signal is an RT
843 * signals.c: Handle passing through of sighandler arguments also
844 for real-time signals.
846 1999-09-03 Andreas Schwab <schwab@suse.de>
848 * ptfork.c (__fork): Renamed from fork and use __libc_fork. Add
850 (__vfork): New function, alias vfork.
851 * Versions: Export __fork, vfork, and __vfork in libpthread.
853 1999-08-23 Andreas Schwab <schwab@suse.de>
855 * signals.c (pthread_sighandler): Add SIGCONTEXT_EXTRA_ARGS to
856 call to signal handler.
858 1999-08-20 Ulrich Drepper <drepper@cygnus.com>
860 * pthread.c (__pthread_reset_main_thread): Undo last change.
861 (__pthread_kill_other_threads_np): Reset signal handlers for the
862 signals we used in the thread implementation here.
864 1999-08-19 Ulrich Drepper <drepper@cygnus.com>
866 * pthread.c (__pthread_reset_main_thread): Reset signal handlers
867 for the signals we used in the thread implementation [PR libc/1234].
869 * Versions: Export __pthread_kill_other_threads_np from libpthread
872 * signals.c: Pass sigcontext through wrapper to the user function.
874 1999-08-01 Ulrich Drepper <drepper@cygnus.com>
876 * Versions [ld.so] (GLIBC_2.0): Export __libc_internal_tsd_get and
877 __libc_internal_tsd_set.
879 1999-07-29 Andreas Jaeger <aj@arthur.rhein-neckar.de>
881 * manager.c: Remove inclusion of <linux/tasks.h> since it's not
884 1999-07-16 Andreas Jaeger <aj@arthur.rhein-neckar.de>
886 * internals.h: Align _pthread_descr_struct to 32 bytes.
887 Reported by Tim Hockin <thockin@cobaltnet.com>, close PR
890 1999-07-09 Ulrich Drepper <drepper@cygnus.com>
892 * oldsemaphore.c (sem_compare_and_swap): Fix use of compare and
895 1999-07-09 Cristian Gafton <gafton@redhat.com>
897 * Makefile (libpthread-routines): Add oldsemaphore routine.
898 * Versions: Add sem_destroy, sem_getvalue, sem_init, sem_post,
899 sem_trywait, and sem_wait to GLIBC_2.1.
900 * oldsemaphore.c: New file.
901 * semaphore.c: Add default_symbol_versions for the changed functions.
902 (__new_sem_init): Rename from sem_init.
903 (__new_sem_post): Rename from sem_post.
904 (__new_sem_wait): Rename from sem_wait.
905 (__new_sem_trywait): Rename from sem_trywait.
906 (__new_sem_getvalue): Rename from sem_getvalue.
907 (__new_sem_destroy): Rename from sem_destroy.
909 1999-06-23 Robey Pointer <robey@netscape.com>
911 * internals.h: Added p_nextlock entry to separate queueing for a
912 lock from queueing for a CV (sometimes a thread queues on a lock
913 to serialize removing itself from a CV queue).
914 * pthread.c: Added p_nextlock to initializers.
915 * spinlock.c: Changed to use p_nextlock instead of p_nextwaiting.
917 1999-07-09 Ulrich Drepper <drepper@cygnus.com>
919 * manager.c (pthread_handle_create): Free mmap region after stack
920 if clone failed. Patch by Kaz Kylheku <kaz@ashi.FootPrints.net>.
922 1999-05-23 Andreas Jaeger <aj@arthur.rhein-neckar.de>
924 * man/pthread_cond_init.man: Correct example.
925 Reported by Tomas Berndtsson <tomas@nocrew.org>.
927 * linuxthreads.texi (Condition Variables): Likewise.
929 1999-05-18 Jakub Jelinek <jj@ultra.linux.cz>
931 * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): Use
932 casx not cas, also successful casx returns the old value in rd
933 and not the new value.
935 1999-05-16 Xavier Leroy <Xavier.Leroy@inria.fr>
937 * manager.c: If pthread_create() is given a NULL attribute
938 and the thread manager runs with a realtime policy, set the
939 scheduling policy of the newly created thread back to SCHED_OTHER.
940 * manager.c: If the PTHREAD_INHERIT_SCHED attribute is given,
941 initialize the schedpolicy field of new_thread->p_start_args
942 to that of the calling thread.
944 1999-04-29 Ulrich Drepper <drepper@cygnus.com>
946 * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): cas
947 instruction does not allow memory element to use offset.
949 1999-04-28 Ulrich Drepper <drepper@cygnus.com>
951 * manager.c (pthread_allocate_stack): Optimize initialization of new
954 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_define_initialized):
955 Don't use initializer since it is all zeroes.
956 (__libc_once_define): Likewise.
958 1999-04-16 Andreas Jaeger <aj@arthur.rhein-neckar.de>
960 * sysdeps/arm/Implies: Removed since cmpxchg/no-cmpxchg
961 doesn't exist anymore.
962 * sysdeps/i386/Implies: Likewise.
963 * sysdeps/m68k/Implies: Likewise.
964 * sysdeps/mips/Implies: Likewise.
965 * sysdeps/powerpc/Implies: Likewise.
966 * sysdeps/sparc/sparc32/Implies: Likewise.
967 * sysdeps/sparc/sparc64/Implies: Likewise.
969 1999-04-15 Ulrich Drepper <drepper@cygnus.com>
971 * sysdeps/alpha/bits/semaphore.h: Removed.
972 * sysdeps/powerpc/bits/semaphore.h: Removed.
973 * sysdeps/pthread/cmpxchg/bits/semaphore.h: Removed.
974 * sysdeps/pthread/no-cmpxchg/bits/semaphore.h: Removed.
975 * Makefile (headers): Remove bits/semaphore.h.
977 * semaphore.h: Define _pthread_descr if necessary.
978 Don't include limits.h. Define SEM_VALUE_MAX directly.
980 (sem_t): Protect element names with leading __.
981 Add declarations for sem_close, sem_open, and sem_unlink.
982 * semaphore.c: Adjust all functions for new element names.
983 Define sem_close, sem_open, and sem_unlink.
984 * Versions (libthread): Add sem_close, sem_open, and sem_unlink for
986 * sysdeps/pthread/bits/pthreadtypes.h: Define _pthread_descr only if
989 1999-03-16 H.J. Lu <hjl@gnu.org>
991 * specific.c (pthread_key_delete): Check th->p_terminated to see
992 if the thread is running.
994 * Versions (__libc_internal_tsd_get, __libc_internal_tsd_set):
995 Added to GLIBC_2.0 for libc.so.
997 1999-02-12 H.J. Lu <hjl@gnu.org>
999 * Versions (__libc_current_sigrtmin, __libc_current_sigrtmax,
1000 __libc_allocate_rtsig): Added to GLIBC_2.1.
1002 * internals.h (DEFAULT_SIG_RESTART): Removed.
1003 (DEFAULT_SIG_CANCEL): Removed.
1005 * pthread.c (init_rtsigs, __libc_current_sigrtmin,
1006 __libc_current_sigrtmax, __libc_allocate_rtsig): New functions.
1007 (__pthread_sig_restart, __pthread_sig_cancel,
1008 __pthread_sig_debug): Initialized.
1009 (pthread_initialize): Call init_rtsigs () to initialize
1012 1999-02-03 H.J. Lu <hjl@gnu.org>
1014 * manager.c (__pthread_manager): Do block __pthread_sig_debug.
1015 Don't restart the thread which sent REQ_DEBUG.
1016 (pthread_start_thread): Check if __pthread_sig_debug > 0
1019 * pthread.c (__pthread_initialize_manager): Suspend ourself
1020 after sending __pthread_sig_debug to gdb instead of
1021 __pthread_sig_cancel.
1023 1999-01-24 H.J. Lu <hjl@gnu.org>
1025 * manager.c (__pthread_manager): Delete __pthread_sig_debug
1026 from mask if __pthread_sig_debug > 0.
1027 (pthread_handle_create): Increment __pthread_handles_num.
1029 * manager.c (pthread_handle_create): Don't pass CLONE_PTRACE to clone.
1030 * pthread.c (__pthread_initialize_manager): Likewise.
1032 * pthread.c (pthread_initialize): Use __libc_allocate_rtsig (1)
1033 instead of __libc_allocate_rtsig (2).
1034 (__pthread_initialize_manager): Send __pthread_sig_debug to gdb
1035 instead of __pthread_sig_cancel.
1036 (pthread_handle_sigdebug): Fix comments.
1038 1999-01-21 Ulrich Drepper <drepper@cygnus.com>
1040 * manager.c (pthread_allocate_stack): Set
1041 __pthread_nonstandard_stacks if user-specified stack is used.
1043 1999-01-16 Ulrich Drepper <drepper@cygnus.com>
1045 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _LFS_ASYNCHRONOUS_IO,
1046 _LFS_LARGEFILE, _LFS64_LARGEFILE, and _LFS64_STDIO from Unix98.
1048 1999-01-07 Xavier Leroy <Xavier.Leroy@inria.fr>
1050 * pthread.c: Use a third signal __pthread_sig_debug distinct
1051 from __pthread_sig_cancel to notify gdb when a thread is
1053 * manager.c: Likewise.
1054 * internals.h: Likewise.
1055 * signals.c: The implementation of sigwait(s) assumed that
1056 all signals in s have signal handlers already attached.
1057 This is not required by the standard, so make it work
1058 also if some of the signals have no handlers.
1060 1999-01-05 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
1062 * linuxthreads.texi: Remove pointers from first @node. Move old
1063 @node spec inside comment.
1065 1998-12-31 Ulrich Drepper <drepper@cygnus.com>
1067 * sysdeps/pthread/bits/stdio-lock.h: Define _IO_lock_lock and
1070 1998-12-29 Ulrich Drepper <drepper@cygnus.com>
1072 * semaphore.c (sem_trywait): Don't forget to unlock the semaphore
1073 lock. Patch by Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>.
1075 1998-12-21 Ulrich Drepper <drepper@cygnus.com>
1077 * manager.c: Threads now send __pthread_sig_cancel on termination.
1078 Change clone call and signal masks.
1079 * thread.c (pthread_handle_sigrestart): Remove special code for
1081 (pthread_handle_sigcancel): In manager thread call
1082 __pthread_manager_sighandler.
1083 * sysdeps/i386/pt-machine.h (__compare_and_swap): Add memory clobber.
1084 * sysdeps/i386/i686/pt-machine.h: Likewise.
1085 Patches by Xavier Leroy.
1087 1998-12-14 Ulrich Drepper <drepper@cygnus.com>
1089 * spinlock.c (__pthread_unlock): Don't crash if called for an
1090 untaken mutex. Reported by Ruslan V. Brushkoff <rus@Snif.Te.Net.UA>.
1092 * Examples/ex6.c: Unbuffer stdout and reduce sleep time to reduce
1095 1998-12-13 Ulrich Drepper <drepper@cygnus.com>
1097 * Examples/ex3.c: Wait until all threads are started before
1098 searching for the number to avoid race condition on very fast
1101 1998-12-08 Andreas Jaeger <aj@arthur.rhein-neckar.de>
1103 * sysdeps/pthread/pthread.h: Remove __pthread_setcanceltype
1104 declaration since it's not needed.
1106 * sysdeps/pthread/pthread.h: Move internal functions to ...
1107 * internals.h: ...here.
1109 1998-12-02 H.J. Lu <hjl@gnu.org>
1111 * pthread.c (__pthread_sig_restart): Initiliaze to 0 if
1112 SIGRTMIN is defined.
1113 (__pthread_sig_cancel): Likewise.
1115 1998-12-01 Andreas Jaeger <aj@arthur.rhein-neckar.de>
1117 * wrapsyscall.c: Include <sys/mman.h> for msync,
1118 <stdlib.h> for system and <termios.h> for tcdrain prototype.
1119 Correct msync declaration.
1121 1998-11-29 Roland McGrath <roland@baalperazim.frob.com>
1123 * sysdeps/pthread/bits/libc-tsd.h (__libc_tsd_define, __libc_tsd_get,
1124 __libc_tsd_set): New macros for new interface.
1125 * no-tsd.c: New file, provide uninitialized defns of
1126 __libc_internal_tsd_get and __libc_internal_tsd_set.
1127 * Makefile (routines): Add no-tsd.
1129 1998-10-12 Roland McGrath <roland@baalperazim.frob.com>
1131 * internals.h: Include <bits/libc-tsd.h>, not <bits/libc-lock.h>.
1132 * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
1133 __libc_internal_tsd_set): Move decls to ...
1134 * sysdeps/pthread/bits/libc-tsd.h: New file for __libc_internal_tsd_*
1137 * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
1138 __libc_internal_tsd_set): Make these pointers to functions, not
1139 functions; remove #pragma weak decls for them.
1140 * specific.c (__libc_internal_tsd_get, __libc_internal_tsd_set):
1141 Define static functions and initialized pointers to them.
1143 1998-11-18 Ulrich Drepper <drepper@cygnus.com>
1145 * Makefile (CFLAGS-mutex.c): Define as -D__NO_WEAK_PTHREAD_ALIASES.
1146 (CFLAGS-specific.c): Likewise.
1147 (CFLAGS-pthread.c): Likewise.
1148 (CFLAGS-ptfork.c): Likewise.
1149 (CFLAGS-cancel.c): Likewise.
1150 * sysdeps/pthread/bits/libc-lock.h: Don't mark __pthread_* functions
1151 as weak references if __NO_WEAK_PTHREAD_ALIASES is defined.
1153 * mutex.c (pthread_mutex_init): Define as strong symbol.
1154 (pthread_mutex_destroy): Likewise.
1155 (pthread_mutex_trylock): Likewise.
1156 (pthread_mutex_lock): Likewise.
1157 (pthread_mutex_unlock): Likewise.
1158 (pthread_mutexattr_init): Likewise.
1159 (pthread_mutexattr_destroy): Likewise.
1160 (pthread_once): Likewise.
1161 * ptfork.c (pthread_atfork): Likewise.
1162 * specific.c (pthread_key_create): Likewise.
1163 (pthread_setspecific): Likewise.
1164 (pthread_getspecific): Likewise.
1166 1998-11-15 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
1168 * linuxthreads.texi: Fix punctuation after xref.
1170 1998-11-10 H.J. Lu <hjl@gnu.org>
1172 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine NR_OPEN
1173 if it is defined in <linux/limits.h>.
1175 1998-10-29 14:28 Ulrich Drepper <drepper@cygnus.com>
1177 * spinlock.h (__pthread_trylock): Define inline.
1178 (__pthread_lock): Add extra parameter to declaration. Declare
1179 using internal_function.
1180 (__pthread_unlock): Declare using internal_function.
1181 * spinlock.c (__pthread_lock): Add new parameter. Use it instead
1182 of local variable self. Avoid recomputing self. Define using
1184 (__pthread_trylock): Remove.
1185 (__pthread_unlock): Define using internal_function.
1186 * cancel.c: Adjust for __pthread_lock interface change. Use already
1187 computed self value is possible.
1188 * condvar.c: Likewise.
1190 * manager.c: Likewise.
1191 * mutex.c: Likewise.
1192 * pthread.c: Likewise.
1193 * rwlock.c: Likewise.
1194 * semaphore.c: Likewise.
1195 * signals.c: Likewise.
1197 1998-10-27 13:46 Ulrich Drepper <drepper@cygnus.com>
1199 * sysdeps/pthread/pthread.h (struct _pthread_cleanup_buffer): Prepend
1200 __ to field names of the struct.
1201 * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_fastlock):
1203 (pthread_attr_t): Likewise.
1204 (pthread_cond_t): Likewise.
1205 (pthread_condattr_t): Likewise.
1206 (pthread_mutex_t): Likewise.
1207 (pthread_mutexattr_t): Likewise.
1208 (pthread_rwlock_t): Likewise.
1209 (pthread_rwlockattr_t): Likewise.
1210 * attr.c: Adjust for pthread.h and pthreadtypes.h change.
1211 * cancel.c: Likewise.
1212 * condvar.c: Likewise.
1213 * manager.c: Likewise.
1214 * mutex.c: Likewise.
1215 * pthread.c: Likewise.
1216 * ptlongjmp.c: Likewise.
1217 * rwlock.c: Likewise.
1218 * spinlock.c: Likewise.
1220 1998-10-09 Ulrich Drepper <drepper@cygnus.com>
1222 * sysdeps/i386/pt-machine.h (get_eflags, set_eflags): Mark these
1225 * sysdeps/i386/i686/pt-machine.h: Remove unused inline
1228 * Makefile (libpthread-routines): Add pt-machine.
1229 * pt-machine.c: New file.
1230 * sysdeps/alpha/pt-machine.h: Define PT_EI as extern inline is not
1231 yet defined. Use PT_EI in extern inline definitions.
1232 * sysdeps/arm/pt-machine.h: Likewise.
1233 * sysdeps/i386/pt-machine.h: Likewise.
1234 * sysdeps/i386/i686/pt-machine.h: Likewise.
1235 * sysdeps/m68k/pt-machine.h: Likewise.
1236 * sysdeps/mips/pt-machine.h: Likewise.
1237 * sysdeps/powerpc/pt-machine.h: Likewise.
1238 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
1239 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
1241 1998-10-02 Andreas Jaeger <aj@arthur.rhein-neckar.de>
1243 * semaphore.h: Include <sys/types.h> so that _pthread_descr
1246 1998-09-15 David S. Miller <davem@pierdol.cobaltmicro.com>
1248 * sysdeps/sparc/sparc32/pt-machine.h (INIT_THREAD_SELF): Add nr
1250 * sysdeps/sparc/sparc64/pt-machine.h (INIT_THREAD_SELF): Likewise.
1252 1998-09-12 14:24 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu>
1254 * linuxthreads/sysdeps/unix/sysv/linux/bits/sigthread.h: Add
1255 multiple inclusion guard.
1257 1998-09-02 11:08 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
1259 * signals.c (sigaction): Check that sig is less than NSIG to avoid
1260 array index overflow.
1262 1998-09-06 10:56 Ulrich Drepper <drepper@cygnus.com>
1264 * sysdeps/pthread/semaphore.h: New file.
1266 1998-09-06 09:08 Ulrich Drepper <drepper@cygnus.com>
1268 * sysdeps/pthread/bits/libc-lock.h (enum __libc_tsd_key_t): Add
1269 _LIBC_TSD_KEY_DL_ERROR.
1271 1998-08-31 Ulrich Drepper <drepper@cygnus.com>
1273 * sysdeps/i386/i686/pt-machine.h (testandset): Add memory clobber.
1274 * sysdeps/i386/pt-machine.h: Likewise.
1275 Suggested by Roland McGrath.
1277 1998-08-28 13:58 Ulrich Drepper <drepper@cygnus.com>
1279 * internals.h: Also define THREAD_GETMEM_NC and THREAD_SETMEM_NC to
1280 access thread data with non-constant offsets.
1281 * specific.c: Use THREAD_GETMEM_NC and THREAD_SETMEM_NC where
1284 * sysdeps/i386/useldt.h: Fix typo. Add THREAD_GETMEM_NC and
1285 THREAD_SETMEM_NC definitions.
1287 * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM_NC and
1289 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
1291 1998-08-26 15:46 Ulrich Drepper <drepper@cygnus.com>
1293 * internals.h: Define THREAD_GETMEM and THREAD_SETMEM to default if
1294 not already defined.
1295 (struct _pthread_descr_struct): Add p_self and p_nr field.
1296 * manager.c (__pthread_handles): Define second element to point
1298 (__pthread_handles_num): Initialize to 2.
1299 (__pthread_manager): Use INIT_THREAD_SELF with two arguments.
1300 (pthread_start_thread): Likewise.
1301 (pthread_handle_create): Start search for free slot at entry 2.
1302 Initialize new fields p_self and p_nr.
1303 Call __clone with CLONE_PTRACE if available.
1304 (pthread_free): Call FREE_THREAD_SELF if available.
1305 * pthread.c (__pthread_initial_thread): Initialize new fields.
1306 (__pthread_manager_thread): Likewise.
1307 (__pthread_initialize_manager): Call __clone with CLONE_PTRACE.
1309 * cancel.c: Use THREAD_GETMEM and THREAD_SETMEM to access the
1310 elements of the thread descriptor.
1311 * condvar.c: Likewise.
1312 * errno.c: Likewise.
1314 * manager.c: Likewise.
1315 * pthread.c: Likewise.
1316 * ptlongjmp.c: Likewise.
1317 * semaphore.c: Likewise.
1318 * signals.c: Likewise.
1319 * specific.c: Likewise.
1320 * spinlock.c: Likewise.
1322 * sysdeps/alpha/pt-machine.h (INIT_THREAD_SELF): Add extra parameter.
1324 * sysdeps/i386/useldt.h: New file.
1325 * sysdeps/i386/i686/pt-machine.h: Show how to use this file.
1327 * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM and
1328 THREAD_SETMEM using __thread_self.
1329 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
1331 1998-08-24 Geoff Keating <geoffk@ozemail.com.au>
1333 * spinlock.c (__pthread_lock): Reset p_nextwaiting to NULL if it
1334 turned out that we didn't need to queue after all.
1336 1998-08-22 Geoff Keating <geoffk@ozemail.com.au>
1338 * sysdeps/powerpc/pt-machine.h: Remove testandset, it's not used
1339 and wastes space; correct types.
1341 1998-08-08 11:18 H.J. Lu <hjl@gnu.org>
1343 * signals.c (sigaction): Handle NULL argument.
1345 1998-08-04 Ulrich Drepper <drepper@cygnus.com>
1347 * sysdeps/unix/sysv/linux/bits/sigthread.h: Use __sigset_t instead
1350 1998-08-02 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
1352 * Makefile (linuxthreads-version): Extract correct number from
1355 1998-07-29 Xavier Leroy <Xavier.Leroy@inria.fr>
1357 * Banner: Bump version number to 0.8
1358 * FAQ.html: Many updates, in particular w.r.t. debugging.
1359 * manager.c: Support for non-default stacksize for
1360 LinuxThreads-allocated stacks;
1361 don't use guard pages for stacks with default size, rely on
1362 rlimit(RLIMIT_STACK) instead (it's cheaper).
1364 * cancel.c: Use __pthread_sig_cancel and __pthread_sig_restart
1365 everywhere instead of PTHREAD_SIG_CANCEL and PTHREAD_SIG_RESTART.
1366 * condvar.c: Likewise.
1367 * internals.h: Likewise.
1368 * restart.h: Likewise.
1369 * signals.c: Likewise.
1370 * pthread.c: Likewise; set rlimit(RLIMIT_STACK) as we need it.
1372 1998-07-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
1374 * weaks.c: Define pthread_mutexattr_[sg]ettype instead of
1375 __pthread_mutexattr_[sg]ettype. Add more weak aliases.
1376 * Versions: Put __pthread_mutexattr_settype under version
1377 GLIBC_2.0. Don't export __pthread_mutexattr_setkind_np and
1378 __pthread_mutexattr_gettype.
1380 1998-07-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
1382 * sysdeps/pthread/bits/libc-lock.h: Make
1383 __pthread_mutexattr_settype weak. Don't make
1384 __pthread_mutexattr_setkind_np weak.
1386 1998-07-16 10:52 Ulrich Drepper <drepper@cygnus.com>
1388 * manager.c (pthread_handle_create): Check whether sched_setscheduler
1389 call can succeed here.
1391 * mutex.c: Define __pthread_mutexattr_settype and make
1392 __pthread_mutexattr_setkind_np an alias.
1393 Likewise for __pthread_mutexattr_gettype.
1395 1998-07-15 11:00 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu>
1397 * attr.c (pthread_attr_setschedpolicy): Don't check whether caller
1400 1998-07-14 19:38 Ulrich Drepper <drepper@cygnus.com>
1402 * sysdeps/pthread/bits/libc-lock.h: Define __libc_cleanup_end.
1404 1998-07-11 Andreas Jaeger <aj@arthur.rhein-neckar.de>
1406 * Examples/ex6.c: Include <unistd.h> for usleep.
1408 1998-06-13 11:04 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
1410 * Examples/ex4.c (main): Use exit, not pthread_exit.
1412 1998-07-09 13:39 Ulrich Drepper <drepper@cygnus.com>
1414 * Versions: Add __pthread_mutexattr_gettype and
1415 __pthread_mutexattr_settype.
1416 * lockfile.c: Use __pthread_mutexattr_settype instead of
1417 __pthread_mutexattr_setkind_np.
1418 * mutex.c: Define __pthread_mutexattr_gettype and
1419 __pthread_mutexattr_settype.
1421 * sysdeps/pthread/pthread.h: Declare __pthread_mutexattr_gettype and
1422 __pthread_mutexattr_settype.
1423 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_init_recursive):
1424 Use __pthread_mutexattr_settype.
1426 1998-07-08 22:26 Ulrich Drepper <drepper@cygnus.com>
1428 * Versions: Add pthread_mutexattr_gettype, pthread_mutexattr_settype.
1429 * mutex.c: Define weak alias pthread_mutexattr_gettype and
1430 pthread_mutexattr_settype.
1431 * sysdeps/pthread/pthread.h: Declare these functions.
1432 Move pthread_sigmask and pthread_kill declaration in separate header.
1433 * sysdeps/unix/sysv/linux/bits/sigthread.h: New file.
1435 1998-07-07 15:20 Ulrich Drepper <drepper@cygnus.com>
1437 * Makefile: Add rules to compile and run tests.
1438 * Examples/ex1.c: Little changes to fix warnings.
1439 * Examples/ex2.c: Likewise.
1440 * Examples/ex3.c: Likewise.
1441 * Examples/ex4.c: Likewise.
1442 * Examples/ex5.c: Likewise.
1443 * Examples/ex6.c: New file.
1445 1998-07-05 11:54 Ulrich Drepper <drepper@cygnus.com>
1447 * Versions: Add pthread_attr_init to GLIBC_2.1 version in libc.
1449 1998-07-01 Andreas Jaeger <aj@arthur.rhein-neckar.de>
1451 * attr.c: Include <string.h>.
1453 1998-06-30 11:47 Ulrich Drepper <drepper@cygnus.com>
1455 * attr.c: Include errno.h. Use memcpy to copy sched_param.
1456 * internals.h: Include limits.h.
1457 * manager.c: Use memcpy to copy sched_param.
1458 * ptfork.c: Include errno.h.
1459 * pthread.c: Likewise.
1460 * semaphore.c: Likewise.
1461 * specific.c: Likewise.
1462 * spinlock.h: Likewise.
1463 * sysdeps/pthread/pthread.h: Include only allowed headers. Move
1464 type definition to ...
1465 * sysdeps/pthread/bits/pthreadtypes.h: ...here. New file.
1467 1998-06-29 12:34 Ulrich Drepper <drepper@cygnus.com>
1469 * sysdeps/pthread/pthread.h: Use __PMT not __P for function pointers.
1471 * sysdeps/pthread/pthread.h: Define various PTHREAD_* symbols also
1472 as macros as demanded in POSIX.1, Annex C.
1474 1998-06-29 12:29 Ulrich Drepper <drepper@cygnus.com>
1476 * internals.h (struct pthread_request): For free use pthread_t
1477 instead of pthread_descr.
1478 * join.c (pthread_join): Pass thread_id, not th to manager.
1479 (pthread_detach): Likewise.
1480 * manager.c (__pthread_manager): Except thread ID in FREE_REQ case.
1481 (pthread_exited): Remove detached queue code.
1482 (pthread_handle_free): Expect thread ID parameter and use it to
1483 validate the thread decsriptor. Don't use detached queue.
1484 Patches by Xavier Leroy.
1486 1998-06-27 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
1488 * libpthread.map: Export accept, longjmp, sigaction, siglongjmp,
1489 _IO_flockfile, _IO_ftrylockfile, _IO_funlockfile,
1490 __pthread_atfork, __pthread_key_create, __pthread_once.
1491 * internals.h: Doc fix.
1492 * pthread.c (__pthread_initialize): Define again.
1494 1998-06-26 Ulrich Drepper <drepper@cygnus.com>
1496 * manager.c (pthread_exited): If thread is not detached put it on
1498 (pthread_handle_free): If thread is not on list with living threads
1499 search on list with detached threads.
1501 * sysdeps/pthread/pthread.h (PTHREAD_RWLOCK_INITIALIZER): Correct
1502 for new definition of pthread_rwlock_t.
1504 * spinlock.c: Correct test whether to compile
1505 __pthread_compare_and_swap or not.
1507 1998-06-25 19:27 Ulrich Drepper <drepper@cygnus.com>
1509 * attr.c: Finish user stack support. Change locking code to be safe
1510 in situations with different priorities.
1511 * cancel.c: Likewise.
1512 * condvar.c: Likewise.
1513 * internals.h: Likewise.
1515 * manager.c: Likewise.
1516 * mutex.c: Likewise.
1517 * pthread.c: Likewise.
1518 * ptlongjmp.c: Likewise.
1519 * queue.h: Likewise.
1520 * rwlock.c: Likewise.
1521 * semaphore.c: Likewise.
1522 * semaphore.h: Likewise.
1523 * signals.c: Likewise.
1524 * spinlock.c: Likewise.
1525 * spinlock.h: Likewise.
1526 * sysdeps/pthread/pthread.h: Likewise.
1527 Patches by Xavier Leroy.
1529 * sysdeps/i386/i686/pt-machine.h: New file.
1531 1998-06-25 Ulrich Drepper <drepper@cygnus.com>
1533 * sysdeps/pthread/pthread.h: Make [sg]et_stacksize and
1534 [sg]et_stackaddr prototypes always available.
1536 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
1537 _POSIX_THREAD_ATTR_STACKSIZE and _POSIX_THREAD_ATTR_STACKADDR.
1539 1998-06-24 Ulrich Drepper <drepper@cygnus.com>
1541 * manager.c (pthread_free): Undo patch from 980430.
1542 Reported by David Wragg <dpw@doc.ic.ac.uk>.
1544 1998-06-09 15:07 Ulrich Drepper <drepper@cygnus.com>
1546 * manager.c: Define __pthread_manager_adjust_prio and use it to
1547 increase priority when needed.
1548 * internals.h: Add prototype for __pthread_manager_adjust_prio.
1549 * mutex.c: Optimize mutexes to wake up only one thread.
1550 * pthread.c: Move PID of manager for global variable in structure
1552 Patches by Xavier Leroy.
1554 1998-06-07 13:47 Ulrich Drepper <drepper@cygnus.com>
1556 * sysdeps/pthread/bits/libc-lock.h: Optimize cleanup handlers a bit.
1558 1998-06-03 Andreas Jaeger <aj@arthur.rhein-neckar.de>
1560 * attr.c: Correct typo.
1562 1998-05-01 Ulrich Drepper <drepper@cygnus.com>
1564 * manager.c (pthread_free): Unmap guard before the stack.
1565 Patch by Matthias Urlichs.
1567 1998-04-30 Ulrich Drepper <drepper@cygnus.com>
1569 * manager.c (pthread_free): Detect already free child.
1570 Patch by Xavier Leroy, reported by Matthias Urlichs.
1572 1998-04-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
1574 * Makefile (linuxthreads-version): Renamed back from
1577 1998-04-21 Ulrich Drepper <drepper@cygnus.com>
1579 * ptlongjmp.c: Add prototypes for __libc_siglongjmp and
1582 1998-04-20 14:55 Ulrich Drepper <drepper@cygnus.com>
1584 * Makefile (libpthread-routines): Add ptlongjmp and spinlock.
1585 * internals.h: Add definitions for new spinlock implementation.
1586 * ptlongjmp.c: New file.
1587 * spinlock.c: New file.
1588 * spinlock.h (acquire): Don't reschedule using __sched_yield, use
1589 new function __pthread_acquire to prevent deadlocks with thread
1590 with different priorities.
1591 Patches by Xavier Leroy <Xavier.Leroy@inria.fr>.
1593 1998-03-16 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
1595 * manager.c (__pthread_manager): Reduce first argument to select
1596 to include just the needed file descriptor.
1598 1998-03-17 00:06 Ulrich Drepper <drepper@cygnus.com>
1600 * manager.c: Fix last patch which caused core dumps.
1602 * pthread.c: Correctly handle missing SIGRTMIN.
1604 1998-03-15 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
1606 * libpthread.map: Add __libc_internal_tsd_get and
1607 __libc_internal_tsd_set. Add missing cancelable functions. Export
1608 libc internal versions of the cancelable functions.
1610 1998-03-13 16:51 Ulrich Drepper <drepper@cygnus.com>
1612 * weaks.c: Define pthread_attr_init as GLIBC_2.0 and GLIBC_2.1.
1614 1998-03-13 00:46 Ulrich Drepper <drepper@cygnus.com>
1616 * attr.c: Implement pthread_attr_[gs]etguardsize,
1617 pthread_attr_[gs]setstackaddr, pthread_attr_[gs]etstacksize.
1618 Change pthread_attr_init to have two interfaces.
1619 * internals.h (struct _pthread_descr_struct): Add new fields for
1621 * libpthread.map: Add names in GLIBC_2.1 section.
1622 * manager.c (pthread_handle_create): Implement guardsize and
1624 (pthread_free): Likewise.
1625 * pthread.c (pthread_create): Add new interface for changed
1627 * sysdeps/pthread/pthread.h: Add prototypes for new functions.
1628 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add definition of
1631 1998-03-11 00:42 Wolfram Gloger <wmglo@dent.med.uni-muenchen.de>
1633 * manager.c: Enable resetting of the thread scheduling policy
1634 to SCHED_OTHER when the parent thread has a different one.
1636 1998-02-01 13:51 Ulrich Drepper <drepper@cygnus.com>
1638 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
1639 _POSIX_ASYNCHRONOUS_IO.
1641 * sysdeps/pthread/pthread.h: Define bits for Unix98 variants of
1643 * mutex.c: Implement new mutex types.
1645 * internals.h: Include <signal.h>.
1647 * libpthread.map: Add __erno_location and __h_errno_location.
1649 * errno.c: Return pointer to variable actually in use. This might
1650 not be the one in the thread structure.
1651 * internals.h (struct _pthread_descr_struct): Add new fields p_errnop
1653 * manager.c (__pthread_manager): Set p_errnop and p_h_errnop member
1654 of manager thread structure.
1655 (pthread_handle_create): Set p_errnop and p_h_errnop members for new
1657 * pthread.c: Adapt initializer for thread structures.
1658 (__pthread_initial_thread): Set p_errnop and p_h_errnop member.
1659 (__pthread_reset_main_thread): Reset p_errnop and p_h_errnop of
1660 current thread to global variables.
1662 1998-01-31 17:27 Ulrich Drepper <drepper@cygnus.com>
1664 * rwlock.c: New file.
1665 * Makefile (libpthread-routines): Add rwlock.
1666 * sysdeps/pthread/pthread.h: Define data structures and declare
1668 * libpthread.map: Add new functions.
1670 1997-12-18 13:50 Philip Blundell <pb@nexus.co.uk>
1672 * sysdeps/arm/pt-machine.h: New file; add ARM support.
1673 * sysdeps/arm/Implies: likewise.
1674 * README: Document it.
1676 1997-12-13 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
1678 * signals.c: Remove unneeded initializer for sigwaited, saving a
1681 1997-04-11 01:18 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
1683 * semaphore.c (sem_init): Set sem_spinlock only if available.
1685 1997-12-04 01:48 Ulrich Drepper <drepper@cygnus.com>
1687 * mutex.c: Implement PTHREAD_MUTEX_CHECKERROR.
1688 * sysdeps/pthread/pthread.h: Define PTHREAD_MUTEX_CHECKERROR.
1690 * Makefile: Update from LinuxThreads 0.7.
1691 * internals.h. Likewise.
1692 * manager.c: Likewise.
1693 * mutex.c: Likewise.
1694 * pthread.c: Likewise.
1695 * signals.c: Likewise.
1696 * specific.c: Likewise.
1697 * Examples/ex3.c: Likewise.
1699 1997-11-20 18:13 Ulrich Drepper <drepper@cygnus.com>
1701 * pthread.c (__pthread_reset_main_thread): Close pipe only if still
1704 1997-10-29 05:38 Ulrich Drepper <drepper@cygnus.com>
1706 * wrapsyscall.c: Add socket functions which are also cancelation
1709 1997-10-19 21:40 Wolfram Gloger <wg@wolfram.dent.med.uni-muenchen.de>
1711 * specific.c (__libc_internal_tsd_set, __libc_internal_tsd_get):
1712 New functions for fast thread specific data within libc.
1714 * internals.h: Add new array p_libc_specific to struct
1715 _pthread_descr_struct.
1717 * sysdeps/pthread/bits/libc-lock.h: Declare new functions.
1719 1997-10-13 05:39 Ulrich Drepper <drepper@cygnus.com>
1721 * semaphore.h: Add __BEGIN_DECLS/__END_DECLS.
1722 Reported by Ralf Corsepius <corsepiu@faw.uni-ulm.de>.
1724 1997-08-29 03:05 Ulrich Drepper <drepper@cygnus.com>
1726 * internals.h (struct _pthread_descr_struct): Add definitions for
1727 two-level specific key handling.
1728 * manager.c (pthread_handle_create): Initialize specific memory array.
1729 * specific.c: Implement two-level key handling.
1730 * weaks.c: Don't provide dummy key handling.
1731 * sysdeps/pthread/bits/libc-lock.h: Typedef __libc_lock_t (no #define).
1732 Add definition of __libc_key_t.
1733 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define PTHREAD_KEYS_MAX
1735 Add definition of _POSIX_THREAD_DESTRUCTOR_ITERATIONS and
1736 PTHREAD_DESTRUCTOR_ITERATIONS.
1738 * manager.c (pthread_handle_create): Compare mmap result with
1741 * ptfork.c: Rename to __pthread_atfork and make old name a weak alias.
1742 * sysdeps/pthread/bits/pthread.h: Add prototype for __pthread_atfork.
1744 1997-08-22 19:04 Richard Henderson <rth@cygnus.com>
1746 sysdeps/sparc -> sysdeps/sparc/sparc32
1747 sysdeps/sparc64 -> sysdeps/sparc/sparc64
1749 * internals.h: Change definition of THREAD_SELF to be an expression,
1750 not a statement that did a return.
1751 * sysdeps/alpha/pt-machine.h (THREAD_SELF): Update accordingly.
1752 * sysdeps/sparc/sparc32/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF):
1753 Follow Solaris and use a "system reserved" register (%g6) to hold
1754 the thread descriptor.
1755 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
1757 1997-08-03 00:09 Ulrich Drepper <drepper@cygnus.com>
1759 * mutex.c: Correct pthread_once. Patch by Xavier Leroy.
1760 * sysdeps/pthread/pthread.h: Add prototype for __pthread_once.
1761 * sysdeps/pthread/bits/pthread.h: Add macros for __libc_once.
1763 * semaphore.c: Include spinlock.h only when needed.
1765 * specific.c (__pthread_setsepcific, __pthread_getspecific): Reject
1766 keys for entries not in use.
1768 * weaks.c: Implement key handling functions for real.
1770 1997-06-29 01:04 Richard Henderson <richard@gnu.ai.mit.edu>
1772 Initial sparc64-linux support:
1773 * linuxthreads/sysdeps/sparc64/Implies: New file.
1774 * linuxthreads/sysdeps/sparc64/pt-machine.h: Likewise.
1776 1997-06-29 00:48 Ulrich Drepper <drepper@cygnus.com>
1778 * semaphore.c: Include spinlock.h at correct place.
1781 1997-06-13 10:06 Richard Henderson <rth@tamu.edu>
1783 The Great Bit File Move:
1784 * sysdeps/alpha/semaphorebits.h: -> .../bits/semaphore.h.
1785 * sysdeps/powerpc/semaphorebits.h: Likewise.
1786 * sysdeps/pthread/cmpxchg/semaphorebits.h: Likewise.
1787 * sysdeps/pthread/no-cmpxchg/semaphorebits.h: Likewise.
1788 * sysdeps/pthread/libc-lock.h: -> bits/
1789 * sysdeps/pthread/stdio-lock.h: Likewise.
1790 * sysdeps/unix/sysv/linux/local_lim.h: Likewise.
1791 * sysdeps/unix/sysv/linux/posix_opt.h: Likewise.
1792 * semaphore.h: Likewise.
1793 * sysdeps/pthread/pthread.h: Likewise.
1795 * lockfile.c: <foo.h> -> <bits/foo.h>.
1796 * semaphore.h: Likewise.
1798 * Makefile: (headers): foo.h -> bits/foo.h.
1799 * sysdeps/pthread/Makefile: Likewise.
1801 1997-04-11 01:18 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
1803 * semaphore.c (sem_init): Set sem_spinlock only if available.
1805 * sysdeps/m68k/pt-machine.h (testandset, __compare_and_swap): Fix
1808 1997-04-09 03:00 Ulrich Drepper <drepper@cygnus.com>
1810 Update from LinuxThreads 0.6.
1812 * attr.c (pthread_attr_getdetachstate): Use __sched_get_priority_max
1813 and __sched_get_priority_min instead of names without `__'.
1815 * manager.c: Rewrite large parts to implement opaque pthread_t.
1817 * cancel.c: Adapt for opaque pthread_t type.
1818 * condvar.c: Likewise.
1819 * errno.c: Likewise.
1821 * mutex.c: Likewise.
1822 * pthread.c: Likewise.
1823 * signals.c: Likewise.
1824 * specific.c: Likewise.
1825 * restart.h: Likewise.
1826 * queue.h: Likewise.
1827 * Examples/ex3.c: Likewise.
1828 * Examples/ex4.c: Likewise.
1829 * sysdeps/pthread/pthread.h: Likewise.
1831 * pthread.c: Accumulate time for all threads in thread manager.
1833 * semaphore.c: Implement fallback implementation for architectures
1834 sometimes missing compare-exchange operations.
1836 * cancel.c (pthread_cancel): Validate handle argument.
1837 * join.c (pthread_join): Likewise.
1838 (pthread_detach): Likewise.
1839 * signals.c (pthread_kill): Likewise.
1841 * spinlock.h (acquire): Use __sched_yield not sched_yield.
1843 * queue.h (enqueue): Enqueue thread according to priority.
1845 * internals.c (struct pthread_start_args): New struct for passing
1846 args to cloning function.
1847 (struct _pthread): Rename to _pthread_descr_struct and adapt for
1850 * Examples/Makefile (clean): Pass -f option to rm.
1852 * sysdeps/i386/pt-machine.h: Add check for compare-exchange instruction
1853 and define TEST_FOR_COMPARE_AND_SWAP.
1854 * sysdeps/i386/i486/pt-machine.h: Removed.
1856 * sysdeps/unix/sysv/linux/local_lim.h (PTHREAD_THREADS_MAX): Increase
1859 1997-04-04 16:38 Ulrich Drepper <drepper@cygnus.com>
1861 * restart.h (suspend): Clear p_signal before suspending.
1862 (suspend_with_cancellation): Likewise.
1863 Patch by Xavier Leroy <Xavier.Leroy@inria.fr>.
1865 * weaks.c: Make __pthread_key_create return 1.
1866 * sysdeps/pthread/libc-lock.h: Define __libc_key_create,
1867 __libc_getspecific, __libc_setspecific, and __libc_key_t.
1868 * sysdeps/pthread/stdio-lock.h: Don't care for implementation not
1871 1997-03-19 15:13 Miguel de Icaza <miguel@nuclecu.unam.mx>
1873 * sysdeps/sparc/pt-machine (RELEASE): Fix.
1875 1997-03-01 07:55 Geoff Keating <geoffk@ozemail.com.au>
1877 * sysdeps/powerpc/Implies: Added.
1878 * sysdeps/powerpc/pt-machine.h: Added.
1879 * sysdeps/powerpc/semaphorebits.h: Added.
1881 1997-01-22 01:22 Ulrich Drepper <drepper@cygnus.com>
1883 * linuxtheads/pthread.c (__pthread_initial_thread): Correct
1885 (__pthread_manager_thread): Likewise.
1886 Reported by Andreas Jaeger.
1888 1997-01-18 22:15 Richard Henderson <rth@tamu.edu>
1890 Since sigset_t no longer fits in a register, we can't pass in the
1891 thread's initial mask so easily. Take this opportunity to simplify
1892 the clone implementation by only accepting a single void* argument.
1894 * linuxthreads/manager.c (__pthread_manager): Put thread vitals
1895 in the thread struct instead of as arguments through clone.
1896 (pthread_start_thread): Look for them there.
1897 * linuxthreads/internals.h (struct _pthread): Add p_initial_fn,
1898 p_initial_fn_arg, p_initial_mask. Fix __pthread_manager proto.
1899 * linuxthreads/pthread.c (pthread_initialize_manager): Revise