]> git.ipfire.org Git - thirdparty/glibc.git/blob - linuxthreads/ChangeLog
Update.
[thirdparty/glibc.git] / linuxthreads / ChangeLog
1 2002-02-01 Jakub Jelinek <jakub@redhat.com>
2
3 * Versions (__libc_internal_tsd_get, __libc_internal_tsd_set,
4 __pthread_kill_other_threads_np): Move to GLIBC_PRIVATE.
5 * sysdeps/i386/i586/Versions: Move all symbols to GLIBC_PRIVATE.
6 * sysdeps/i386/i686/Versions: Move all symbols to GLIBC_PRIVATE.
7 * sysdeps/sparc/sparc32/sparcv9/Versions: New file.
8 * sysdeps/sparc/sparc64/Versions: New file.
9 * sysdeps/ia64/Versions: Move all symbols to GLIBC_PRIVATE.
10
11 2002-01-31 Ulrich Drepper <drepper@redhat.com>
12
13 * pthread.c: _dl_cpuclock_offset is not any longer a global variable
14 in SHARED code, use GL(dl_cpuclock_offset).
15
16 2002-01-28 Andreas Jaeger <aj@suse.de>
17
18 * sysdeps/mips/pspinlock.c (__pthread_spin_init): Clear *LOCK to
19 0. Patch by Machida Hiroyuki <machida@sm.sony.co.jp>.
20
21 2002-01-16 Martin Schwidefsky <schwidefsky@de.ibm.com>
22
23 * sysdeps/s390/s390-32/pt-machine.h (MEMORY_BARRIER): Define.
24 (CURRENT_STACK_FRAME): Remove duplicate definition.
25 * sysdeps/s390/s390-64/pt-machine.h: Likewise.
26
27 2002-01-14 Martin Schwidefsky <schwidefsky@de.ibm.com>
28
29 * Makefile (CFLAGS-tst-cancel.c): Add -fno-inline-functions to prevent
30 automatic inline.
31
32 2002-01-12 Andreas Schwab <schwab@suse.de>
33
34 * Makefile (test-srcs): Add tst-signal.
35 (tests): Run tst-signal.
36 (distribute): Add tst-signal.sh.
37 * tst-signal.c, tst-signal.sh: New files.
38
39 2002-01-14 Andreas Jaeger <aj@suse.de>
40
41 * sysdeps/x86_64/pt-machine.h (INIT_THREAD_SELF): Avoid warning.
42
43 2002-01-11 Andreas Schwab <schwab@suse.de>
44
45 * signals.c (sighandler): Initialize all elements to SIG_ERR.
46 (__sigaction): Don't use value from sighandler if it is SIG_ERR.
47
48 2002-01-06 Richard Henderson <rth@redhat.com>
49
50 * sysdeps/alpha/elf/pt-initfini.c: New file.
51
52 2001-12-29 Andreas Jaeger <aj@suse.de>
53
54 * Examples/ex9.c: Add noreturn attribute for thread.
55 * Examples/ex10.c: Likewise.
56 * Examples/ex13.c (thread_start): Likewise.
57 * Examples/ex15.c (worker): Likewise.
58
59 * Examples/ex18.c: Include unistd.h for prototype of sleep.
60
61 2001-12-14 Ulrich Drepper <drepper@redhat.com>
62
63 * man/pthread_atfork.man: Adjust description of mutex handling
64 after fork for current implementation.
65 * linuxthreads.texi: Likewise [PR libc/2519].
66
67 2001-12-13 Andreas Schwab <schwab@suse.de>
68
69 * specific.c (pthread_key_delete): Don't contact the thread
70 manager if no threads have been created yet.
71
72 2001-12-12 NIIBE Yutaka <gniibe@m17n.org>
73
74 * sysdeps/sh/pt-machine.h (INIT_THREAD_SELF): Added __volatile__
75 qualifier to be safe.
76
77 2001-11-30 Andreas Schwab <schwab@suse.de>
78
79 * pthread.c (pthread_handle_sigcancel) [THREAD_SELF]: Double check
80 that self is the manager thread, and initialize the thread
81 register if not.
82 (thread_self_stack) [THREAD_SELF]: New function to find self via
83 stack pointer.
84 * manager.c (pthread_handle_create): Don't block cancel signal any
85 more.
86
87 2001-11-29 Andreas Jaeger <aj@suse.de>
88
89 * sysdeps/x86_64/pt-machine.h: Use %gs as thread specific register.
90 (THREAD_SELF): New.
91 (INIT_THREAD_SELF): New.
92 (THREAD_GETMEM): New.
93 (THREAD_GETMEM_NC):
94 (THREAD_SETMEM): New.
95 (THREAD_SETMEM_NC): New.
96 (FLOATING_STACKS): Define.
97 (ARCH_STACK_MAX_SIZE): Define.
98
99 2001-11-28 Kaz Kylheku <kaz@ashi.footprints.net>
100
101 Bugfix to pthread_key_delete. It was iterating over the thread
102 manager's linked list of threads, behind the thread manager's
103 back causing a race. The fix is to have the manager iterate over
104 the threads instead, using a new request type for doing so.
105 * internals.h (struct pthread_request): New manager request type
106 REQ_FOR_EACH_THREAD.
107 * manager.c (pthread_for_each_thread): New function.
108 (__pthread_manager): Handle new REQ_FOR_EACH_THREAD request.
109 * specific.c (struct pthread_key_delete_helper_args): New type.
110 (pthread_key_delete_helper): New static function.
111 (pthread_key_delete): Use the new thread manager
112 REQ_FOR_EACH_THREAD function to iterate over the threads and set
113 the delete key slot to a null value in each thread.
114 * Examples/ex18.c: New test.
115 * Makefile (tests): Add ex18.
116
117 2001-11-22 Wolfram Gloger <wg@malloc.de>
118
119 * pthread.c (pthread_onexit_process): Don't call free
120 after threads have been asynchronously terminated.
121
122 * manager.c (pthread_handle_exit): Surround cancellation
123 of threads with __flockfilelist()/__funlockfilelist().
124
125 2001-11-26 Andreas Schwab <schwab@suse.de>
126
127 * manager.c (pthread_handle_create): Start the child thread with
128 the cancel signal blocked, so that it does not handle it before
129 the thread register is set up. Save errno from failed clone call.
130
131 2001-11-15 Ulrich Drepper <drepper@redhat.com>
132
133 * sysdeps/i386/i686/Implies: Removed.
134 * sysdeps/i386/i686/Versions: New file.
135
136 2001-10-31 Andreas Jaeger <aj@suse.de>
137
138 * sysdeps/x86_64/Makefile: Remove, we do not need it anymore.
139
140 2001-10-05 Kevin Buettner <kevinb@cygnus.com>
141
142 * pthread.c (__linuxthread_pthread_sizeof_descr): Change name
143 to __linuxthreads_pthread_sizeof_descr to match name used by
144 symbol_list_arr[LINUXTHREADS_PTHREAD_SIZEOF_DESCR] in
145 linuxthreads_db/td_symbol_list.c.
146
147 2001-09-22 Andreas Jaeger <aj@suse.de>
148
149 * linuxthreads/tst-context.c: Avoid compile warning.
150
151 2001-09-20 Andreas Jaeger <aj@suse.de>
152
153 * shlib-versions: Add x86-64.
154
155 2001-09-19 Andreas Jaeger <aj@suse.de>
156
157 * sysdeps/x86_64/Makefile: New file.
158 * sysdeps/x86_64/pspinlock.c: New file.
159 * sysdeps/x86_64/pt-machine.h: New file.
160
161 2001-09-12 Jakub Jelinek <jakub@redhat.com>
162
163 * sysdeps/pthread/timer_delete.c (timer_delete): Thread may be NULL
164 for SIGEV_NONE.
165 * sysdeps/pthread/timer_settime.c (timer_settime): Likewise.
166
167 2001-09-11 Ulrich Drepper <drepper@redhat.com>
168 Wolfram Gloger <wg@malloc.de>
169
170 * join.c: Protect all communications from and to manager with
171 TEMP_FAILURE_RETRY.
172 * manager.c: Likewise.
173 * pthread.c: Likewise.
174 * smeaphore.c: Likewise.
175
176 2001-08-29 Ulrich Drepper <drepper@redhat.com>
177
178 * spinlock.c (__pthread_lock): Top max_count value with
179 MAX_ADAPTIVE_SPIN_COUNT.
180 * internals.h (MAX_ADAPTIVE_SPIN_COUNT): Define if not already done.
181
182 * sysdeps/i386/i686/pt-machine.h (BUSY_WAIT_NOP): New macro to
183 help P4.
184
185 2001-08-27 Jakub Jelinek <jakub@redhat.com>
186
187 * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_t): Only define to
188 non-opaque type if __USE_UNIX98.
189
190 2001-08-26 Jakub Jelinek <jakub@redhat.com>
191
192 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_t): Define
193 non-opaque lock types also if _IO_MTSAFE_IO is defined.
194
195 2001-08-23 Roland McGrath <roland@frob.com>
196
197 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start): Take
198 new first argument, skip the cleanup handler if it's zero.
199 (_LIBC_LOCK_RECURSIVE_INITIALIZER): New macro.
200 (__libc_lock_define_initialized_recursive): Use it.
201 * sysdeps/pthread/bits/stdio-lock.h: File removed.
202 The sysdeps/generic file from the main tree now suffices.
203
204 2001-08-22 Roland McGrath <roland@frob.com>
205
206 * sysdeps/pthread/bits/stdio-lock.h: Include <bits/libc-lock.h>
207 instead of <pthread.h>.
208 (_IO_lock_t): Define this typedef using __libc_lock_define_recursive.
209 (_IO_lock_initializer): Add braces.
210 (_IO_lock_lock): Use __libc_lock_lock_recursive.
211 (_IO_lock_unlock): Use __libc_lock_unlock_recursive.
212
213 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_recursive_t): New type.
214 (__libc_lock_define_initialized_recursive): Use it.
215 (__libc_lock_init_recursive): Likewise.
216 (__libc_lock_fini_recursive): Likewise.
217 (__libc_lock_lock_recursive): Likewise.
218 (__libc_lock_trylock_recursive): Likewise.
219 (__libc_lock_unlock_recursive): Likewise.
220 (__libc_lock_define_recursive): New macro.
221
222 2001-08-14 Jakub Jelinek <jakub@redhat.com>
223
224 * lockfile.c (__pthread_provide_lockfile): New variable.
225 * pthread.c (__pthread_require_lockfile): New variable.
226 * cancel.c (__pthread_require_lockfile): New variable.
227
228 2001-07-31 Ulrich Drepper <drepper@redhat.com>
229
230 * tst-context.c (threadfct): Initialize context before calling
231 makecontext.
232
233 * Examples/ex17.c: Make sure test thread is around long enough.
234
235 2001-07-26 kaz Kojima <kkojima@rr.iij4u.or.jp>
236
237 * sysdeps/sh/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF): Defined.
238
239 2001-07-24 Ulrich Drepper <drepper@redhat.com>
240
241 * tst-context.c (main): Print explanation before bailing out
242 because context handling is not supported.
243
244 2001-07-23 Ulrich Drepper <drepper@redhat.com>
245
246 * Makefile (tests): Add tst-context.
247 * tst-context.c: New file.
248
249 * sysdeps/pthread/bits/stdio-lock.h: Define
250 _IO_cleanup_region_start_noarg.
251
252 2001-07-23 Jakub Jelinek <jakub@redhat.com>
253
254 * sysdeps/alpha/pt-machine.h (FLOATING_STACKS): Define.
255 (ARCH_STACK_MAX_SIZE): Define.
256 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
257 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
258
259 2001-07-19 Jakub Jelinek <jakub@redhat.com>
260
261 * sysdeps/i386/useldt.h: Fix typo in ARCH_STACK_MAX_SIZE comment.
262
263 * sysdeps/ia64/pt-machine.h (FLOATING_STACKS): Define.
264 (ARCH_STACK_MAX_SIZE): Define.
265 * manager.c (pthread_allocate_stack): Handle FLOATING_STACKS with
266 NEED_SEPARATE_REGISTER_STACK.
267
268 2001-07-16 Andreas Schwab <schwab@suse.de>
269
270 * Makefile (before-compile): Don't add $(objpfx)crti.o.
271 (omit-deps): Add crti.
272 ($(objpfx)libpthread.so): Depend on $(objpfx)crti.o, but make sure
273 it is filtered out of the link command.
274
275 2001-07-16 Ulrich Drepper <drepper@redhat.com>
276
277 * pthread.c (pthread_initialize): For FLOATING_STACKS don't bother
278 to find the right value for __pthread_initial_thread_bos, it's not
279 used. If not FLOATING_STACKS first run
280 __pthread_init_max_stacksize.
281
282 2001-06-16 H.J. Lu <hjl@gnu.org>
283
284 * internals.h: Include <stackinfo.h>.
285
286 * attr.c: Don't include <stackinfo.h> here.
287 * cancel.c: Likewise.
288 * manager.c: Likewise.
289 * pthread.c: Likewise.
290 * ptlongjmp.c: Likewise.
291
292 2001-03-23 Matthew Wilcox <willy@ldl.fc.hp.com>
293
294 * attr.c: Make _STACK_GROWS_UP work.
295 * internals.h: Likewise.
296 * manager.c: Likewise.
297 * pthread.c: Likewise.
298
299 2001-06-15 H.J. Lu <hjl@gnu.org>
300
301 * pthread.c (__pthread_reset_main_thread): Fix a typo.
302
303 2001-02-02 John S. Marvin <jsm@udlkern.fc.hp.com>
304
305 * semaphore.h: Use struct _pthread_fastlock as an element of
306 sem_t instead of an identical struct.
307 * rwlock.c: Remove casts.
308 * semaphore.c: Likewise.
309
310 2001-04-30 Alan Modra <amodra@one.net.au>
311
312 * sysdeps/unix/sysv/linux/hppa/pt-initfini.c: New.
313
314 2001-05-25 Bruce Mitchener <bruce@cubik.org>
315
316 * linuxthreads.texi: Spelling corrections.
317
318 2001-05-25 Ulrich Drepper <drepper@redhat.com>
319
320 * oldsemaphore.c (__old_sem_wait): Clear p_nextwaiting before
321 returning successfully.
322 Patch by Gene Cooperman <gene@ccs.neu.edu>.
323
324 2001-05-24 Ulrich Drepper <drepper@redhat.com>
325
326 * spinlock.c (__pthread_lock) [HAS_COMPARE_AND_SWAP]: Before doing any
327 serious work try once whether the lock is uncontested.
328 Remove duplicate reading of __status before loop.
329 Change suggested by Hans Boehm <hans_boehm@hp.com>.
330
331 * spinlock.h (__pthread_trylock): Remove need for oldstatus variable.
332 (__pthread_alt_trylock): Likewise.
333
334 2001-05-01 Kaz Kylheku <kaz@ashi.footprints.net>
335
336 Memory barrier overhaul following line by line inspection.
337 * mutex.c (pthread_once): Missing memory barriers added.
338 * pthread.c (__pthread_wait_for_restart_signal,
339 __pthread_timedsuspend_new, __pthread_restart_new): Added
340 memory barriers ``just in case'' and for documentary value.
341 * spinlock.c (__pthread_release): New inline function for releasing
342 spinlock, to complement __pthread_acquire. Includes memory
343 barrier prior to assignment to spinlock, and __asm __volatile
344 dance to prevent reordering or optimization of the spinlock access.
345 * spinlock.c (__pthread_unlock, __pthread_alt_lock,
346 __pthread_alt_timedlock, __pthread_alt_unlock,
347 __pthread_compare_and_swap): Updated to use new __pthread_release
348 instead of updating spinlock directly.
349 * spinlock.c (__pthread_lock, __pthread_unlock, wait_node_alloc,
350 wait_node_free, wait_node_dequeue, __pthread_alt_lock,
351 __pthread_alt_timedlock, __pthread_alt_unlock, __pthread_acquire):
352 Memory barrier overhaul. Lots of missing memory barriers added,
353 a couple needless ones removed.
354 * spinlock.c (__pthread_compare_and_swap): testandset optimization
355 removed, just calls __pthread_acquire, which has the new read
356 barrier in it before its testandset.
357
358 2001-05-20 Roland McGrath <roland@frob.com>
359
360 * Makeconfig: New file, variables used to be in main libc Makeconfig.
361
362 2001-05-09 Geoff Keating <geoffk@redhat.com>
363
364 * sysdeps/powerpc/pt-machine.h
365 (HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS): Define.
366 (__compare_and_swap): Remove memory barriers.
367 (__compare_and_swap_with_release_semantics): New function.
368
369 2001-04-24 Andreas Jaeger <aj@suse.de>
370
371 * wrapsyscall.c: send* and recv* return ssize_t.
372
373 * sysdeps/pthread/timer_getoverr.c (timer_getoverrun): Unlock the
374 mutex instead of double locking it.
375 Reported by Pierre Artaud <partaud@sodatec.com>.
376
377 2001-04-23 Ulrich Drepper <drepper@redhat.com>
378
379 * sysdeps/pthread/getcpuclockid.c: Make function generic, test
380 using #ifdef whether the clock is available.
381 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c: Removed.
382
383 * sysdeps/ia64/Versions: New file.
384
385 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init): We don't
386 have to call __gmon_start__ in the libpthread DSO.
387 * sysdeps/pthread/pt-initfini.c (_init): Likewise.
388
389 * Makefile (libpthread-routines): Add ptclock_gettime and
390 ptclock_settime.
391 * internals.h: Don't use cpuclock-init.h definitions, use
392 hp-timing.h definitions.
393 * pthread.c: Likewise.
394 * manager.c: Likewise.
395 * ptclock_gettime.c: New file.
396 * ptclock_settime.c: New file.
397 * internals.h: Fix parameter type for __pthread_clock_gettime and
398 __pthread_clock_settime.
399
400 * sysdeps/i386/i586/ptclock_gettime.c: Removed.
401 * sysdeps/i386/i586/ptclock_settime.c: Removed.
402 * sysdeps/i386/i586/Makefile: Removed.
403
404 2001-04-22 Ulrich Drepper <drepper@redhat.com>
405
406 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_ASYNCH_IO.
407 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
408
409 2001-04-21 Andreas Jaeger <aj@suse.de>
410
411 * sysdeps/pthread/timer_routines.c (thread_func): Add noreturn
412 attribute, remove statements that will never be executed.
413 (thread_func): Remove mutex_unlock call since it's never executed.
414 (thread_func): Fix comment as suggested by Jakub Jelinek.
415
416 * manager.c (__pthread_manager): Add noreturn
417 attribute.
418 (pthread_start_thread): Likewise, remove return statement.
419 (pthread_start_thread_event): Likewise.
420 Add noreturn attribute for pthread_handle_exit.
421 * weaks.c: Add noreturn attribute for pthread_exit.
422
423 * internals.h: Add __pthread_clock_gettime and
424 __pthread_clock_settime prototypes.
425
426 2001-04-21 Ulrich Drepper <drepper@redhat.com>
427
428 * internals.h: Include <cpuclock-init.h>.
429 (struct _pthread_descr_struct): Add p_cpuclock_offset field if
430 CPUCLOCK_VARDEF is defined.
431 * pthread.c (__pthread_initialize_minimal): Initialize
432 p_cpuclock_offset field for main thread if CPUCLOCK_INIT is defined.
433 * manager.c (pthread_start_thread): Set p_cpuclock_offset field
434 for new thread to current CPU clock value.
435
436 * sysdeps/i386/useldt.h: Extend all the macros to handle 8-byte values.
437
438 * sysdeps/i386/i586/Makefile: New file.
439 * sysdeps/i386/i586/Versions: New file.
440 * sysdeps/i386/i586/ptclock_gettime.c: New file.
441 * sysdeps/i386/i586/ptclock_settime.c: New file.
442 * sysdeps/i386/i686/Implies: New file.
443
444 2001-04-18 Jakub Jelinek <jakub@redhat.com>
445
446 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: Put specs into
447 $generated, not $postclean-generated.
448
449 2001-04-18 Andreas Jaeger <aj@suse.de>
450
451 * Makefile (otherlibs): Added.
452
453 2001-04-18 Jakub Jelinek <jakub@redhat.com>
454
455 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
456
457 2001-04-16 Ulrich Drepper <drepper@redhat.com>
458
459 * signals.c (sigwait): NSIG is no signal number. Block all
460 signals while in signal handler for signals in SET.
461 Patch by Manfred Spraul <manfred@colorfullife.com>.
462
463 2001-04-12 Ulrich Drepper <drepper@redhat.com>
464
465 * tst-cancel.c: Disable most tests. Add new test where all
466 cleanup handlers must run.
467 * Makefile (tests): Add tst-cancel again.
468
469 * cancel.c (__pthread_perform_cleanup): Correct condition for
470 leaving cleanup loop early.
471
472 * sysdeps/i386/Makefile: Make sure gcc uses a frame pointer for
473 all the files which use CURRENT_STACK_FRAME.
474 * sysdeps/i386/pt-machine.h (CURRENT_STACK_FRAME): Define using
475 __builtin_frame_address.
476 * sysdeps/i386/i686/pt-machine.h: Likewise.
477
478 2001-04-11 Ulrich Drepper <drepper@redhat.com>
479
480 * Makefile (tests): Comment out tst-cancel for now.
481
482 * tst-cancel.c (main): Cleanup 4 is supposed to run. Create
483 temporary file in object directory.
484 * Makefile: Don't allow inlining when compiling tst-cancel.c.
485 Pass $(objpfx) to tst-cancel.
486
487 2001-04-11 David S. Miller <davem@redhat.com>
488
489 * sysdeps/sparc/sparc32/pt-machine.h (stack_pointer): Advance
490 up closer to user local variables so that new cleanup heuristics work.
491 * sysdeps/sparc/sparc64/pt-machine.h (stack_pointer): Likewise.
492
493 2001-04-11 Ulrich Drepper <drepper@redhat.com>
494
495 * cancel.c (_pthread_cleanup_push): Catch invalid __prev buffer
496 and remove it.
497 (_pthread_cleanup_push_defer): Likewise.
498
499 * tst-cancel.c (main): Fix loop printing cleanup output.
500
501 2001-04-10 kaz Kojima <kkojima@rr.iij4u.or.jp>
502
503 * sysdeps/sh/pspinlock.c (__pthread_spin_lock): Fix a reverse
504 test.
505 (__pthread_spin_trylock): Likewise.
506 * sysdeps/sh/pt-machine.h (testandset): Likewise.
507
508 2001-04-10 Ulrich Drepper <drepper@redhat.com>
509
510 * join.c (pthread_exit): Move code to new function __pthread_do_exit
511 which takes an extra parameter with the current frame pointer.
512 Call new function with CURRENT_STACK_FRAME.
513 (__pthread_do_exit): New function. Call __pthread_perform_cleanup
514 with the new parameter.
515 (pthread_join): Call __pthread_do_exit instead of pthread_exit.
516 * cancel.c (__pthread_perform_cleanup): Takes extra parameter. Use
517 this parameter as the initial value the cleanup handler records are
518 compared against. No active cleanup handler record must have an
519 address lower than the previous one and the initial record must be
520 above (below on PA) the frame address passed in.
521 (pthread_setcancelstate): Call __pthread_do_exit instead of
522 pthread_exit.
523 (pthread_setcanceltype): Likewise.
524 (pthread_testcancel): Likewise.
525 (_pthread_cleanup_pop_restore): Likewise.
526 * condvar.c (pthread_cond_wait): Likewise.
527 (pthread_cond_timedwait_relative): Likewise.
528 * manager.c (pthread_start_thread): Likewise.
529 * oldsemaphore.c (__old_sem_wait): Likewise.
530 * pthread.c (pthread_handle_sigcancel): Likewise.
531 * semaphore.c (__new_sem_wait): Likewise.
532 (sem_timedwait): Likewise.
533 * ptlongjmp.c (pthread_cleanup_upto): Also use current stack frame
534 to limit the cleanup handlers which get run.
535 * internals.h: Add prototype for __pthread_do_exit. Adjust prototype
536 for __pthread_perform_cleanup.
537
538 * Makefile (tests): Add tst-cancel.
539 * tst-cancel.c: New file.
540
541 2001-04-08 Hans-Peter Nilsson <hp@axis.com>
542
543 * sysdeps/cris/pt-machine.h: New file.
544 * sysdeps/cris/pspinlock.c: New file.
545
546 2001-04-09 Hans-Peter Nilsson <hp@axis.com>
547
548 * shlib-versions: Add case for Linux on CRIS.
549
550 2001-03-26 Ulrich Drepper <drepper@redhat.com>
551
552 * attr.c (pthread_getattr_np): Correct computation of stack size
553 for machiens with register stack.
554
555 * Examples/ex17.c (main): Correct detection of failed mmap call.
556
557 2001-03-21 Jakub Jelinek <jakub@redhat.com>
558
559 * pthread.c (__pthread_initialize_manager): Fix a typo.
560
561 2001-03-21 Jakub Jelinek <jakub@redhat.com>
562
563 * attr.c (__pthread_attr_setstack): Fix alignment check.
564 (pthread_getattr_np): __stackaddr is top of stack, not bottom.
565 * Makefile (tests): Add ex17 test.
566 * Examples/ex17.c: New test.
567
568 2001-03-20 Ulrich Drepper <drepper@redhat.com>
569
570 * Makefile: Define -D_RPC_THREAD_SAFE_ for cancel.c.
571 * cancel.c (__pthread_perform_cleanup): Call __rpc_thread_destroy.
572 * sysdeps/pthread/bits/libc-tsd.h: Define _LIBC_TSD_KEY_VARS.
573
574 2001-03-18 Ulrich Drepper <drepper@redhat.com>
575
576 * Makefile: When generating DSO link with libc_nonshared.a.
577
578 2001-02-26 Jakub Jelinek <jakub@redhat.com>
579
580 * signals.c (pthread_sighandler): Use CALL_SIGHANDLER.
581
582 2001-02-23 Jakub Jelinek <jakub@redhat.com>
583
584 * internals.h (__pthread_init_max_stacksize): New prototype.
585 * attr.c (__pthread_attr_setstacksize): Call
586 __pthread_init_max_stacksize if not yet initialized.
587 * pthread.c (__pthread_init_max_stacksize): New function.
588 (__pthread_initialize_manager): Call it.
589 Patch by <dtc@cmucl.cons.org>.
590
591 2001-03-16 Ulrich Drepper <drepper@redhat.com>
592
593 * attr.c (pthread_getattr_np): Fix __stacksize computation for IA-64.
594
595 2001-03-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
596
597 * shlib-versions: Add rule for Linux on 64 bit S/390.
598 * sysdeps/s390/s390-64/pt-machine.h: New file.
599 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
600
601 2001-03-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
602
603 * sysdeps/s390/pt-machine.h: Move to...
604 * sysdeps/s390/s390-32/pt-machine.h: ...here.
605 Add defines for FLOATING_STACK and ARCH_STACK_MAX_SIZE.
606
607 2001-03-15 Ulrich Drepper <drepper@redhat.com>
608
609 * Versions [libpthread] (GLIBC_2.2.3): Add pthread_getattr_np.
610 * attr.c: Implement pthread_getattr_np.
611 * sysdeps/pthread/pthread.h: Add prototype for pthread_getattr_np.
612 * internals.h (struct _pthread_descr_struct): Add p_inheritsched.
613 * manager.c (pthread_handle_create): Initialize p_inheritsched.
614
615 2001-03-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
616
617 * sysdeps/unix/sysv/linux/s390/pt-initfini.c: Use 0x07 padding for
618 code alignment.
619
620 2001-02-20 Hans Boehm <hans_boehm@hp.com>
621
622 * manager.c (manager_mask): Removed static vesion. Now always local
623 to __pthread_manager().
624 (manager_mask_all): Removed completely.
625 (__pthread_manager): Remove manager_mask_all initialization.
626 (pthread_handle_create): Remove code to set and reset signal mask
627 around __clone2() calls.
628
629 2001-02-17 Jakub Jelinek <jakub@redhat.com>
630
631 * spinlock.c (__pthread_lock): Force lock->__status to be read from
632 memory on every spin.
633
634 2001-02-10 Andreas Jaeger <aj@suse.de>
635
636 * Makefile (extra-objs): New.
637
638 2001-02-09 Jakub Jelinek <jakub@redhat.com>
639
640 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Add
641 __pthread_initialize_minimal prototype.
642
643 2001-02-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
644
645 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
646
647 2001-02-06 Martin Schwidefsky <schwidefsky@de.ibm.com>
648
649 * sysdeps/unix/sysv/linux/s390/pt-initfini.c: New file.
650
651 2001-02-06 Ulrich Drepper <drepper@redhat.com>
652
653 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: First attempt to fix the
654 broken code. Patch by Jes Sorensen.
655
656 2001-02-06 Andreas Jaeger <aj@suse.de>
657
658 * sysdeps/pthread/pthread.h: Move __pthread_initialize from here
659 to...
660 * internals.h: ...here.
661
662 2001-02-05 Jes Sorensen <jes@linuxcare.com>
663
664 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
665
666 2001-02-02 Ulrich Drepper <drepper@redhat.com>
667
668 * Versions: Remove __pthread_initialize_minimal.
669
670 2001-02-01 Ulrich Drepper <drepper@redhat.com>
671
672 * Makefile: Add rules to build crti.o and make it being used in
673 building libpthread.so.
674 * sysdeps/i386/Makefile: New file.
675 * sysdeps/pthread/pt-initfini.c: New file.
676
677 * pthread.c: Cleanups.
678
679 2001-01-28 Andreas Jaeger <aj@suse.de>
680
681 * oldsemaphore.c (__old_sem_init): Adjust for last change.
682 * sysdeps/pthread/bits/libc-lock.h: Likewise.
683 * spinlock.c: Likewise.
684
685 2001-01-28 Ulrich Drepper <drepper@redhat.com>
686
687 * sysdeps/pthread/bits/initspin.h: Make all names namespace clean.
688 * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: Likewise.
689 * manager.c: Adjust for namespace cleanup in bits/initspin.h.
690 * pthread.c: Likewise.
691 * spinlock.h: Likewise.
692 * sysdeps/pthread/pthread.h: Likewise.
693
694 2001-01-26 Ulrich Drepper <drepper@redhat.com>
695
696 * sysdeps/pthread/bits/pthreadtypes.h: Define pthread_attr_t also
697 as struct __pthread_attr_s.
698
699 * semaphore.h (sem_t): Cleanup namespace, rename status and
700 spinlock elements.
701
702 2001-01-13 Jakub Jelinek <jakub@redhat.com>
703
704 * pthread.c (pthread_onexit_process): Clear
705 __pthread_manager_thread_bos after freeing it.
706 * Makefile (tests): Add ex16.
707 * Examples/ex16.c: New file.
708
709 2001-01-11 Jakub Jelinek <jakub@redhat.com>
710
711 * Makefile (CFLAGS-pthread.c): Pass -DHAVE_Z_NODELETE if ld supports
712 -z nodelete.
713 * pthread.c (pthread_exit_process): Rename to...
714 (pthread_onexit_process): ...this.
715 (pthread_atexit_process, pthread_atexit_retcode): New.
716 (pthread_initialize): Call __cxa_atexit instead of __cxa_on_exit
717 and only if HAVE_Z_NODELETE is not defined.
718 (__pthread_initialize_manager): Register pthread_atexit_retcode
719 with __cxa_atexit.
720
721 2001-01-11 Ulrich Drepper <drepper@redhat.com>
722
723 * pthread.c (pthread_initialize): Use __cxs_on_exit not __cxa_atexit.
724
725 2001-01-11 Jakub Jelinek <jakub@redhat.com>
726
727 * Makefile (tests): Add ex15.
728 * Examples/ex15.c: New test.
729
730 2001-01-08 Ulrich Drepper <drepper@redhat.com>
731
732 * pthread.c (pthread_exit_process): Free memory allocated for
733 manager stack.
734
735 2000-12-31 Ulrich Drepper <drepper@redhat.com>
736
737 * manager.c (pthread_alloca_stack): Remove MAP_FIXED from mmap calls.
738 (pthread_free): Always unmap the stack. It's safe now that we don't
739 use MAP_FIXED to allocate stacks.
740
741 2000-12-31 Ulrich Drepper <drepper@redhat.com>
742
743 * sysdeps/powerpc/pspinlock.c: Don't include pt-machine.h here.
744
745 * manager.c (pthread_allocate_stack): Prepare for removal of MAP_FIXED.
746
747 2000-11-15 Wolfram Gloger <wg@malloc.de>
748
749 * manager.c (pthread_free): [!FLOATING_STACKS]: Only remap the
750 stack to PROT_NONE, don't unmap it, avoiding collisions with malloc.
751
752 2000-12-27 Andreas Jaeger <aj@suse.de>
753
754 * Examples/ex13.c: Make local functions static.
755 * ecmutex.c: Likewise.
756 * joinrace.c: Likewise.
757 * Examples/ex14.c: Likewise.
758
759 * Examples/ex2.c: Make local functions static; reformat.
760 * Examples/ex1.c: Likewise.
761 * Examples/ex4.c: Likewise.
762 * Examples/ex5.c: Likewise.
763 * Examples/ex7.c: Likewise.
764
765 * oldsemaphore.c: Add prototypes to shut up GCC.
766 * pt-machine.c: Likewise.
767
768 * weaks.c: Add prototype for pthread_exit.
769
770 * internals.h: Add some prototypes, format prototypes and add
771 missing externs.
772 Move __libc_waitpid prototype to include/sys/wait.h.
773
774 * rwlock.c: Include <bits/libc-lock.h> for prototypes.
775 * mutex.c: Likewise.
776 * specific.c: Likewise.
777 * ptfork.c: Likewise.
778
779 * lockfile.c: Include internals.h to get prototypes.
780 * events.c: Likewise.
781 * sysdeps/alpha/pspinlock.c: Likewise.
782 * sysdeps/arm/pspinlock.c: Likewise.
783 * sysdeps/hppa/pspinlock.c: Likewise.
784 * sysdeps/i386/pspinlock.c: Likewise.
785 * sysdeps/ia64/pspinlock.c: Likewise.
786 * sysdeps/m68k/pspinlock.c: Likewise.
787 * sysdeps/mips/pspinlock.c: Likewise.
788 * sysdeps/powerpc/pspinlock.c: Likewise.
789 * sysdeps/s390/pspinlock.c: Likewise.
790 * sysdeps/sh/pspinlock.c: Likewise.
791 * sysdeps/sparc/sparc32/pspinlock.c: Likewise.
792 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: Likewise.
793 * sysdeps/sparc/sparc64/pspinlock.c: Likewise.
794
795 2000-12-27 Ulrich Drepper <drepper@redhat.com>
796
797 * attr.c (__pthread_attr_setstack): Fix setting of __stackaddr element.
798 (__pthread_attr_getstack): Return correct address.
799 Add warnings for using pthread_attr_getstackaddr and
800 pthread_attr_setstackaddr.
801
802 2000-12-26 Ulrich Drepper <drepper@redhat.com>
803
804 * Examples/ex6.c (test_thread): Make static.
805 * Examples/ex12.c (test_thread): Make static and add noreturn
806 attribute.
807
808 2000-12-18 Jes Sorensen <jes@linuxcare.com>
809
810 * linuxthreads/sysdeps/ia64/pt-machine.h: __compare_and_swap
811 and compare_and_swap_with_release_semantics returns int not long.
812
813 2000-12-17 Andreas Jaeger <aj@suse.de>
814
815 * sysdeps/s390/pt-machine.h (testandset): Use long int as return
816 value.
817 * sysdeps/arm/pt-machine.h (testandset): Likewise.
818 * sysdeps/hppa/pt-machine.h (testandset): Likewise.
819 * sysdeps/m68k/pt-machine.h (testandset): Likewise.
820 * sysdeps/sh/pt-machine.h (testandset): Likewise.
821 * sysdeps/sparc/sparc32/pt-machine.h (testandset): Likewise.
822 * sysdeps/sparc/sparc64/pt-machine.h (testandset): Likewise.
823
824 2000-12-17 Ulrich Drepper <drepper@redhat.com>
825
826 * sysdeps/i386/pt-machine.h (testandset): Adjust for prototype change.
827 * sysdeps/i386/i686/pt-machine.h (testandset): Likewise.
828
829 2000-12-17 Andreas Jaeger <aj@suse.de>
830
831 * internals.h: Add prototypes for testandset and
832 __compare_and_swap to shut up gcc warnings.
833
834 2000-12-06 Wolfram Gloger <wg@malloc.de>
835
836 * join.c (pthread_detach): Allow case where the thread has already
837 terminated.
838
839 2000-12-05 Andreas Jaeger <aj@suse.de>
840
841 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Don't set mips2.
842 * sysdeps/mips/pt-machine.h (testandset): Likewise.
843 (__compare_and_swap): Likewise.
844 Patches by Maciej W. Rozycki <macro@ds2.pg.gda.pl>.
845
846 2000-11-20 Jakub Jelinek <jakub@redhat.com>
847
848 * Examples/ex3.c (main): Cast int to long before casting to void *.
849 (search): Cast void * to long, not int.
850 * Examples/ex8.c (main, thread): Similarly.
851 * Examples/ex11.c (main): Similarly.
852 * Examples/ex14.c (worker, do_test): Similarly.
853 * ecmutex.c (worker, do_test): Similarly.
854 (nlocks): Cast to int.
855
856 2000-11-08 Bruce Mitchener <bruce@cubik.org>
857
858 * linuxthreads.texi: Add documentation for pthreads attributes
859 guardsize, stackaddr, stacksize, and stack. Fix typo in previous
860 patch. Document pthread_[sg]etconcurrency(). Mark
861 pthread_mutexattr_[sg]ettype() as POSIX rather than GNU.
862
863 2000-11-07 Ulrich Drepper <drepper@redhat.com>
864
865 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
866 Don't define it.
867 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
868 Reported by Christopher Yeoh <cyeoh@linuxcare.com.au>.
869
870 2000-11-06 Ulrich Drepper <drepper@redhat.com>
871
872 * cancel.c (pthread_cancel): Always set p_canceled, even if we are
873 not doing it right now.
874 Reported by Kaz Kylheku <kaz@ashi.footprints.net>.
875
876 2000-10-30 Ulrich Drepper <drepper@redhat.com>
877
878 * Examples/ex4.c (main): Don't use exit() to avoid warning with
879 broken compilers.
880
881 2000-10-29 Ulrich Drepper <drepper@redhat.com>
882
883 * attr.c (__pthread_attr_setguardsize): Don't round guardsize
884 here. Reported by Bruce Mitchener <bruce@cubik.org>.
885
886 * linuxthreads.texi: Changes terminology to 'type' from 'kind' when
887 discussing mutexes. (As per the Unix98 name for the API.)
888 Changes documentation for pthread_mutexattr_setkind_np() and
889 pthread_mutexattr_getkind_np() over to the Unix98 APIs for the
890 same: pthread_mutexattr_settype() and pthread_mutexattr_gettype().
891 Changes references to PTHREAD_MUTEXATTR_FAST_NP to
892 PTHREAD_MUTEXATTR_ADAPTIVE_NP.
893 Begins to introduce discussion of the ``timed'' mutex type. This
894 discussion is currently incomplete.
895 Patch by Bruce Mitchener <bruce@cubik.org>.
896
897 2000-10-26 Kazumoto Kojima <kkojima@rr.iij4u.or.jp>
898 Yutaka Niibe <gniibe@chroot.org>
899
900 * sysdeps/sh/pt-machine.h (testandset): Since the operand of TAS.B
901 has restrictions, use register.
902
903 2000-10-23 Andreas Schwab <schwab@suse.de>
904
905 * Examples/ex14.c (TIMEOUT): Override default timeout.
906
907 2000-10-16 Ulrich Drepper <drepper@redhat.com>
908
909 * specific.c: Protect tsd array modification in thread data
910 structures by getting the thread lock in pthread_key_delete and
911 __pthread_destroy_specifics.
912 Patch by Wolfram Gloger <Wolfram.Gloger@dent.med.uni-muenchen.de>.
913
914 2000-10-12 Alan Modra <alan@linuxcare.com.au>
915
916 * sysdeps/pthread/bits/initspin.h: New file.
917 * spinlock.h: Move LOCK_INITIALIZER definition to <bits/initspin.h>.
918 (__pthread_init_lock): Initialize lock with LT_SPINLOCK_INIT.
919 (__pthread_alt_init_lock): Likewise.
920 (__pthread_alt_trylock): Release lock with LT_SPINLOCK_INIT.
921
922 2000-10-12 David Huggins-Daines <dhd@linuxcare.com>
923
924 * oldsemaphore.c (__old_sem_init): Release lock with
925 LT_SPINLOCK_INIT, not zero.
926 * spinlock.c (__pthread_unlock): Likewise.
927 (__pthread_alt_lock): Likewise.
928 (__pthread_alt_timedlock): Likewise.
929 (__pthread_alt_unlock): Likewise.
930 * sysdeps/pthread/bits/libc-lock.h: Initialize locks with
931 LT_SPINLOCK_INIT if it is non-zero. Likewise for init-once flags.
932 * sysdeps/pthread/pthread.h: Include bits/initspin.h. Use
933 LT_SPINLOCK_INIT do initialize spinlocks not 0.
934
935 2000-10-12 David Huggins-Daines <dhd@linuxcare.com>
936
937 * shlib-versions: Add version definitions for hppa-linux.
938
939 2000-10-12 Alan Modra <alan@linuxcare.com.au>
940
941 * sysdeps/hppa/pspinlock.c: New file.
942 * sysdeps/hppa/pt-machine.h: New file.
943 * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: New file.
944
945 2000-10-05 Jakub Jelinek <jakub@redhat.com>
946
947 * mutex.c (__pthread_mutex_destroy): Correct test of
948 busy mutex for mutexes using alternate fastlocks.
949 Patch by dtc@cmucl.cons.org.
950
951 2000-09-28 Martin Schwidefsksy <schwidefsky@de.ibm.com>
952
953 * sysdeps/s390/pt-machine.h: Make %a0 the thread register.
954
955 2000-09-28 Ulrich Drepper <drepper@redhat.com>
956
957 * mutex.c (__pthread_mutex_unlock): For PTHREAD_MUTEX_RECURSIVE_NP
958 test for owner first.
959 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
960
961 * cancel.c (pthread_cancel): Don't do anything if cancelation is
962 disabled.
963
964 2000-09-26 Ulrich Drepper <drepper@redhat.com>
965
966 * spinlock.h (__pthread_set_own_extricate_if): Optimize a bit.
967 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
968
969 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
970 _POSIX_MONOTONIC_CLOCK.
971
972 * spinlock.h (__pthread_set_own_extricate_if): Add back locking
973 and explain why.
974
975 2000-09-20 Andreas Jaeger <aj@suse.de>
976
977 * pthread.c [!__ASSUME_REALTIME_SIGNALS]: Make inclusion of
978 "testrtsig.h" conditional.
979
980 2000-09-11 Ulrich Drepper <drepper@redhat.com>
981
982 * sysdeps/pthread/pthread.h: Declare pthread_attr_getstack and
983 pthread_attr_setstack.
984 * Versions [libpthread] (GLIBC_2.2): Export pthread_attr_getstack and
985 pthread_attr_setstack.
986 * attr.c (pthread_attr_getstack, pthread_attr_setstack): New functions.
987
988 2000-09-05 Ulrich Drepper <drepper@redhat.com>
989
990 * Examples/ex14.c: New file.
991 * Makefile (tests): Add ex14.
992
993 * mutex.c (__pthread_mutex_unlock): Correct test for already unlocked
994 mutex. Patch by dtc@cmucl.cons.org.
995
996 * ecmutex.c: New file.
997 * Makefile (tests): Add ecmutex.
998
999 2000-09-04 H.J. Lu <hjl@gnu.org>
1000
1001 * attr.c (__pthread_attr_setguardsize): Use page_roundup
1002 instead of roundup to round up to the page size.
1003
1004 2000-09-03 Mark Kettenis <kettenis@gnu.org>
1005
1006 * manager.c (pthread_exited): Correctly report event as TD_REAP
1007 instead of TD_DEATH. Fix comments.
1008
1009 2000-09-03 Ulrich Drepper <drepper@redhat.com>
1010
1011 * spinlock.h (testandset): Add cast to avoid warning.
1012 Patch by Franz Sirl <Franz.Sirl-kernel@lauterbach.com>.
1013
1014 2000-09-02 Andreas Jaeger <aj@suse.de>
1015
1016 * sysdeps/pthread/timer_routines.c: Include stdlib.h for abort
1017 prototype.
1018
1019 2000-09-01 Ulrich Drepper <drepper@redhat.com>
1020
1021 * sysdeps/pthread/bits/stdio-lock.h (_IO_cleanup_region_start):
1022 Fix typo in last patch (_mode -> _flags).
1023
1024 * sysdeps/pthread/bits/stdio-lock.h (_IO_cleanup_region_start):
1025 Provide definition which respects _IO_USER_LOCK flag.
1026
1027 2000-08-30 Ulrich Drepper <drepper@redhat.com>
1028
1029 * manager.c (pthread_allocate_stack): Clear descriptor only if not
1030 mmaped.
1031
1032 2000-08-25 Ulrich Drepper <drepper@redhat.com>
1033
1034 * Makefile: Add rules to build and run unload.
1035 * unload.c: New file.
1036
1037 * pthread.c (pthread_exit_process): Move thread_self use inside `if'.
1038
1039 * sysdeps/pthread/pthread.h
1040 (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Defined.
1041 (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: Defined.
1042
1043 2000-08-24 Andreas Jaeger <aj@suse.de>
1044
1045 * Examples/ex13.c: Include <string.h> for strerror prototype and
1046 <stdlib.h> for abort prototype.
1047 (pthr_cond_signal_mutex): Rewrite to silence GCC.
1048 (thread_start): Remove unused variable err.
1049 (main): Silence GCC warnings.
1050
1051 2000-08-22 Andreas Jaeger <aj@suse.de>
1052
1053 * Examples/ex13.c: New test by Kurt Garloff <garloff@suse.de>.
1054
1055 * Makefile (tests): Add ex13.
1056
1057 2000-08-20 Ulrich Drepper <drepper@redhat.com>
1058
1059 * semaphore.h: Add restrict where required by AGd4.
1060 * sysdeps/pthread/pthread.h: Likewise.
1061 * sysdeps/pthread/unix/sysv/linux/bits/sigthread.h: Likewise.
1062
1063 2000-08-15 Ulrich Drepper <drepper@redhat.com>
1064
1065 * Makefile (tests): Add ex12. Add rule to build it.
1066 * Examples/ex12.c: New file.
1067
1068 2000-08-13 Ulrich Drepper <drepper@redhat.com>
1069
1070 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_SEMAPHORES
1071 even though the implementation is not quite complete (but it reports
1072 it). Define _POSIX_MESSAGE_PASSING to -1.
1073 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1074
1075 2000-08-12 Andreas Jaeger <aj@suse.de>
1076
1077 * sysdeps/mips/pt-machine.h (testandset): Add .set mips2 for
1078 assembler.
1079 (__compare_and_swap): Likewise.
1080 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Likewise.
1081
1082 2000-08-10 Ulrich Drepper <drepper@redhat.com>
1083
1084 * pthread.c (__pthread_initial_thread): Initialize p_errnop and
1085 p_h_errnop correctly and not to NULL.
1086
1087 2000-08-05 Ulrich Drepper <drepper@redhat.com>
1088
1089 * Banner: Bump version number to 0.9.
1090
1091 2000-08-04 Ulrich Drepper <drepper@redhat.com>
1092
1093 * Makefile (tests): Add tststack. Add rule to build the program.
1094 * tststack.c: New file.
1095
1096 * internals.h: Declare __pthread_max_stacksize.
1097 * pthread.c (__pthread_max_stacksize): New variable.
1098 (__pthread_initialize_manager): Determine __pthread_initialize_manager
1099 value.
1100 * manager.c (thread_segment): Return always NULL if FLOATING_STACKS.
1101 (pthread_allocate_stack): Allow kernel to choose stack address if
1102 FLOATING_STACKS. This also handles variable-sized stacks.
1103 Always allocate stack and guardpage together. Use mprotect to
1104 change guardpage access.
1105 * sysdeps/i386/useldt.h: Define FLOATING_STACKS and
1106 ARCH_STACK_MAX_SIZE.
1107
1108 * attr.c (__pthread_attr_setstacksize): Also test value against
1109 upper limit.
1110
1111 * manager.c (__pthread_nonstandard_stacks): Define only if
1112 THREAD_SELF is not defined.
1113 (pthread_allocate_stack): Always initialize gardaddr to a correct
1114 value.
1115 (pthread_handle_create): Unmap thread with one call.
1116 (pthread_free): Remove test for initial thread before removing stack.
1117 Unmap stack with one call.
1118
1119 * pthread.c (__pthread_initial_thread): Initialize p_userstack to
1120 1 to avoid removing the stack.
1121
1122 2000-07-27 Jes Sorensen <jes@linuxcare.com>
1123
1124 * sysdeps/ia64/pspinlock.c (__pthread_spin_lock): Add
1125 load of spin lock to prime the cache before the atomic compare and
1126 exchange operation (cmpxchg4). This avoids the spinning on the
1127 cmpxchg4 instruction and reduces movement of the cache line back
1128 and forth between the processors (explanation by Asis K. Mallick
1129 from Intel). This basically makes the implementation operate the
1130 same as the Linux kernel implementation.
1131
1132 * shlib-versions: Use GLIBC_2_2 for Linux/ia64.
1133 * sysdeps/ia64/pspinlock.c: New file.
1134
1135 2000-08-03 Ulrich Drepper <drepper@redhat.com>
1136
1137 * pthread.c: Move definition of __pthread_set_own_extricate_if...
1138 * spinlock.h: ...here. Remove locking.
1139 * internals.h: Remove __pthread_set_own_extricate_if prototype.
1140
1141 * rwlock.c: Use THREAD_GETMEM And THREAD_SETMEM.
1142 (rwlock_rd_extricate_func): Don't determine self, let
1143 __pthread_lock do it.
1144 (rwlock_wr_extricate_func): Likewise.
1145 (rwlock_have_already): Optimize *pself handling a bit.
1146
1147 * mutex.c: Use __builtin_expect.
1148 * pthread.c: Likewise.
1149
1150 2000-08-02 Andreas Jaeger <aj@suse.de>
1151
1152 * sysdeps/s390/pspinlock.c: New file.
1153 * sysdeps/s390/pt-machine.h: New file.
1154 Patches by Martin Schwidefsky <schwidefsky@de.ibm.com>.
1155
1156 2000-07-12 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
1157
1158 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Implement for
1159 R3K.
1160 * sysdeps/mips/pt-machine.h (testandset): Likewise.
1161
1162 2000-07-26 Andreas Jaeger <aj@suse.de>
1163
1164 * pthread.c: Initialize p_sem_avail.
1165
1166 2000-07-25 Ulrich Drepper <drepper@redhat.com>
1167
1168 * internals.h (struct __pthread_descr_struct): Add p_sem_avail.
1169 * semaphore.c: Handle spurious wakeups.
1170
1171 * sysdeps/pthread/pthread.h: Add back PTHREAD_MUTX_FAST_NP as an alias
1172 for PTHREAD_MUTEX_ADAPTIVE_NP for source code compatibility.
1173
1174 * pthread.c (__pthread_set_own_extricate): Use THREAD_GETMEM.
1175 (__pthread_wait_for_restart): Likewise.
1176
1177 * condvar.c (pthread_cond_wait): Also check whether thread is
1178 cancelable before aborting loop.
1179 (pthread_cond_timedwait): Likewise.
1180
1181 * signals.c (pthread_sighandler): Remove special code to restrore
1182 %gs on x86.
1183 (pthread_sighandler_t): Likewise.
1184
1185 2000-07-25 Mark Kettenis <kettenis@gnu.org>
1186
1187 * internals.h (__RES_PTHREAD_INTERNAL): Remove define.
1188 * pthread.c: Include <resolv.h>.
1189 (_res): Undefine. Add extern declaration.
1190
1191 2000-07-24 Ulrich Drepper <drepper@redhat.com>
1192
1193 * pthread.c (__pthread_initial_thread): Update initializer.
1194 (__pthread_manager_thread): Likewise.
1195 (pthread_initialize): Move setrlimit call to...
1196 (__pthread_initialize_manager): ...here.
1197 (__pthread_reset_main_thread): Reset also soft limit on stack size.
1198
1199 * condvar.c: Handle spurious wakeups. [PR libc/1749].
1200 * internals.h (struct _pthread_descr_struct): Add p_condvar_avail.
1201
1202 2000-07-21 Ulrich Drepper <drepper@redhat.com>
1203
1204 * spinlock.h: If IMPLEMENT_TAS_WITH_CAS is defined use
1205 __compare_and_swap to define testandset.
1206 * sysdeps/powerpc/pt-machine.h: Add volatile to asms.
1207 Define IMPLEMENT_TAS_WITH_CAS.
1208
1209 2000-07-20 Ulrich Drepper <drepper@redhat.com>
1210
1211 * Makefile: Pass -z nodelete to linker for libpthread.so
1212 generation if it understand this option.
1213
1214 2000-07-18 Mark Kettenis <kettenis@gnu.org>
1215
1216 * manager.c (pthread_handle_create): Remove initialization of
1217 new_thread->p_res._sock.
1218
1219 2000-07-19 Kaz Kylheku <kaz@ashi.footprints.net>
1220
1221 Bugfixes to the variant of the code for machines with no compare
1222 and swap.
1223
1224 * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Wait
1225 node was not being properly enqueued, due to failing to update
1226 the lock->__status field.
1227
1228 * spinlock.c (__pthread_alt_timedlock): The oldstatus variable was
1229 being set inappropriately, causing the suspend function to be called
1230 with a null self pointer and crash.
1231
1232 2000-07-18 Ulrich Drepper <drepper@redhat.com>
1233
1234 * spinlock.h (__pthread_alt_trylock): Fix code used if no
1235 compare&swap is available.
1236
1237 * spinlock.h (__pthread_trylock): Use __compare_and_swap, not
1238 compare_and_swap.
1239
1240 * pthread.c (pthread_initialize): Don't use sysconf to determine
1241 whether the machine has more than one processor.
1242
1243 * spinlock.c (__pthread_alt_timedlock): Add back one of the
1244 removed thread_self calls.
1245
1246 2000-07-18 Kaz Kylheku <kaz@ashi.footprints.net>
1247
1248 * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Changed
1249 __compare_and_swap to compare_and_swap in code which assumes
1250 compare swap is available.
1251
1252 2000-07-18 Kaz Kylheku <kaz@ashi.footprints.net>
1253
1254 * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Fixed
1255 bug whereby thr field of waitnode structure would not be correctly
1256 set unless a null self pointer is passed to the functions.
1257 Eliminated redundant calls to thread_self().
1258
1259 2000-07-18 Jakub Jelinek <jakub@redhat.com>
1260
1261 * pthread.c (__pthread_initialize_manager): Lock
1262 __pthread_manager_thread.p_lock before calling clone.
1263
1264 2000-05-05 H.J. Lu <hjl@gnu.org>
1265
1266 * sysdeps/ia64/pt-machine.h (__compare_and_swap): Change it to
1267 have acquire semantics.
1268 (__compare_and_swap_with_release_semantics): New inline
1269 function.
1270 (HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS): New macro.
1271
1272 2000-01-28 Hans Boehm <hboehm@exch.hpl.hp.com>
1273
1274 * manager.c: Fix the problem with signals at startup.
1275 Change the way that thread stacks are allocated on IA64.
1276 Clean up some of the guard page allocation stuff.
1277
1278 1999-12-19 H.J. Lu <hjl@gnu.org>
1279
1280 * internals.h (page_roundup): New.
1281 * attr.c (__pthread_attr_setguardsize); Use page_roundup
1282 instead of roundup.
1283 * manager.c (pthread_allocate_stack): Make sure guardaddr is
1284 page aligned with page_roundup if NEED_SEPARATE_REGISTER_STACK
1285 is define.
1286
1287 1999-12-17 Hans Boehm <hboehm@exch.hpl.hp.com>
1288
1289 * manager.c (pthread_allocate_stack): Unmap the stack top
1290 if failed to map the stack bottom.
1291 Fix the guard page.
1292 (pthread_free): Fix the guard page.
1293
1294 * pthread.c (pthread_initialize): Set rlimit correctly for
1295 NEED_SEPARATE_REGISTER_STACK.
1296
1297 1999-12-16 H.J. Lu <hjl@gnu.org>
1298
1299 * pthread.c (__pthread_initialize_manager): Pass
1300 __pthread_manager_thread_bos instead of
1301 __pthread_manager_thread_tos to __clone2.
1302
1303 1999-12-16 H.J. Lu <hjl@gnu.org>
1304
1305 * manager.c (pthread_allocate_stack): Correct the calculation
1306 of "new_thread_bottom". Remove MAP_GROWSDOWN from mmap for
1307 stack bottom.
1308
1309 1999-12-13 H.J. Lu <hjl@gnu.org>
1310
1311 * sysdeps/ia64/pt-machine.h (__compare_and_swap): Added a stop
1312 bit after setting ar.ccv.
1313
1314 1999-12-12 H.J. Lu <hjl@gnu.org>
1315
1316 * manager.c (pthread_allocate_stack): Make the starting
1317 address of the stack bottom page aligned. FIXME: it may
1318 need changes in other places.
1319 (pthread_handle_create): Likewise.
1320
1321 1999-12-11 Hans Boehm <hboehm@exch.hpl.hp.com>
1322
1323 * manager.c (pthread_allocate_stack): Handle
1324 NEED_SEPARATE_REGISTER_STACK.
1325 (pthread_handle_create): Likewise.
1326 * pthread.c (__pthread_initialize_manager): Likewise.
1327
1328 * sysdeps/ia64/pt-machine.h: Use r13 for thread pointer.
1329
1330 1999-12-02 H.J. Lu <hjl@gnu.org>
1331
1332 * sysdeps/ia64/pt-machine.h: New.
1333
1334 2000-07-13 Ulrich Drepper <drepper@redhat.com>
1335
1336 * wrapsyscall.c: Mark non-__ protected names as weak.
1337 PR libc/1466.
1338
1339 2000-07-12 Bruno Haible <haible@clisp.cons.org>
1340
1341 * Examples/ex8.c: Include <sys/wait.h>, not <wait.h>.
1342
1343 2000-07-12 Ulrich Drepper <drepper@redhat.com>
1344
1345 * spinlock.c: Fix code for TEST_FOR_COMPARE_AND_SWAP being defined.
1346 Add tests also to new alternative spinlock implementation.
1347 * spinlock.h: Likewise.
1348 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1349
1350 2000-07-06 Ulrich Drepper <drepper@redhat.com>
1351
1352 * Version: Export __sigaction.
1353 * signals.c: Define __sigaction alias. Use __libc_sigaction instead
1354 of __sigaction.
1355 * pthread.c: Use __libc_sigaction instead of __sigaction.
1356
1357 * condvar.c: Implement pthread_condattr_getpshared and
1358 pthread_condattr_setpshared.
1359 * mutex.c: Implement pthread_mutexattr_getpshared and
1360 pthread_mutexattr_setpshared.
1361 * Versions: Export new functions.
1362 * sysdeps/pthread/pthread.h: Add prototypes for new functions.
1363
1364 * rwlock.c (pthread_rwlockattr_init): Use PTHREAD_PROCESS_PRIVATE.
1365 (pthread_rwlockattr_setpshared): Fail if PTHREAD_PROCESS_PRIVATE
1366 is not selected.
1367
1368 2000-07-04 Greg McGary <greg@mcgary.org>
1369
1370 * sysdeps/pthread/bits/libc-lock.h: Remove BP_SYM from
1371 pragmas. Include bp-sym.h only if _LIBC.
1372
1373 2000-07-04 Ulrich Drepper <drepper@redhat.com>
1374
1375 * spinlock.c (__pthread_unlock): Properly place write barrier.
1376 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1377
1378 2000-07-03 Ulrich Drepper <drepper@redhat.com>
1379
1380 * spinlock.c: Replace fast spinlocks by adaptive spinlocks which are
1381 faster on SMP systems. No more emulation of compare&swap for adaptive
1382 spinlocks.
1383 * spinlock.h: Likewise.
1384 * sysdeps/pthread/pthread.h: Shuffle PTHREAD_MUTEX_* values around.
1385 Replace fast with adaptive mutex.
1386 * mutex.c: Rewrite for replacement of fast by adaptive mutex.
1387 * condvar.c: Likewise.
1388 * pthread.c: Define and initialize __pthread_smp_kernel variable.
1389 * internals.h: Declare __pthread_smp_kernel.
1390 * sysdeps/pthread/bits/pthreadtypes.h: Update comment of
1391 _pthread_fastlock structure.
1392 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1393
1394 * pthread.c: Remove initialization to zero from global variables.
1395
1396 2000-06-29 Jakub Jelinek <jakub@redhat.com>
1397
1398 * shlib-versions: Make sparc64 GLIBC_2.2+ only.
1399
1400 2000-06-28 Greg McGary <greg@mcgary.org>
1401
1402 * weaks.c: Wrap BP_SYM () around weak extern declarations of
1403 pthread functions that have pointers in their return+arg signatures.
1404
1405 2000-06-27 Greg McGary <greg@mcgary.org>
1406
1407 * sysdeps/pthread/bits/libc-lock.h: Wrap BP_SYM () around weak
1408 extern declarations of pthread functions that have pointers in
1409 their return+arg signatures.
1410
1411 2000-06-26 Ulrich Drepper <drepper@redhat.com>
1412
1413 * Makefile (tests): Add ex11. Add rules to build it.
1414 * Examples/ex11.c: New file.
1415 * rwlock.c: Fix complete braindamaged previous try to implement
1416 timedout functions.
1417
1418 * spinlock.c: Pretty print.
1419
1420 2000-06-25 Ulrich Drepper <drepper@redhat.com>
1421
1422 * Makefile (tests): Add ex10. Add rules to build it.
1423 * Versions [GLIBC_2.2] (libpthread): Add pthread_mutex_timedlock,
1424 pthread_rwlock_timedrdlock, and pthread_rwlock_timedwrlock.
1425 * condvar.c (pthread_cond_wait): Allow mutex of kind
1426 PTHREAD_MUTEX_TIMED_NP.
1427 (pthread_cond_timedwait_relative): Likewise.
1428 * mutex.c (__pthread_mutex_init): Default is PTHREAD_MUTEX_TIMED_NP.
1429 (__pthread_mutex_trylock): Use __pthread_alt_trylock for
1430 PTHREAD_MUTEX_ERRORCHECK_NP. Handle PTHREAD_MUTEX_TIMED_NP.
1431 (__pthread_mutex_lock): Use __pthread_alt_lock for
1432 PTHREAD_MUTEX_ERRORCHECK_NP. Handle PTHREAD_MUTEX_TIMED_NP.
1433 (__pthread_mutex_timedlock): New function.
1434 (__pthread_mutex_unlock): Use __pthread_alt_unlock for
1435 PTHREAD_MUTEX_ERRORCHECK_NP. Handle PTHREAD_MUTEX_TIMED_NP.
1436 (__pthread_mutexattr_init): Use PTHREAD_MUTEX_TIMED_NP.
1437 (__pthread_mutexattr_settype): Allow PTHREAD_MUTEX_TIMED_NP.
1438 * spinlock.c: Implement alternate fastlocks.
1439 * spinlock.h: Add prototypes.
1440 * Examples/ex10.c: New file.
1441 * sysdeps/pthread/pthread.h: Add prototypes for new functions.
1442 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1443
1444 * rwlock.c (__pthread_rwlock_rdlock): Optimize loop a bit.
1445 (__pthread_rwlock_timedrdlock): New function.
1446 (__pthread_rwlock_timedwrlock): New function.
1447 Use laternate fastlock function everywhere.
1448
1449 2000-06-21 Andreas Jaeger <aj@suse.de>
1450
1451 * sysdeps/pthread/timer_routines.c: Include <string.h> for memset
1452 prototype.
1453
1454 * join.c: Include <stdlib.h> for exit prototype.
1455
1456 2000-06-20 Ulrich Drepper <drepper@redhat.com>
1457
1458 * sysdeps/i386/useldt.h: Include <stdlib.h>.
1459
1460 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_BARRIERS.
1461 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1462
1463 * Makefile (libpthread-routines): Add barrier.
1464 (tests): Add ex9. Add rule to build ex9.
1465 * Versions: Export barrier functions.
1466 * barrier.c: New file.
1467 * Examples/ex9.c: New file.
1468 * sysdeps/pthread/pthread.h: Add barrier data types and declarations.
1469 * sysdeps/pthread/bits/pthreadtypes.h: Likewise.
1470 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1471
1472 2000-06-19 H.J. Lu <hjl@gnu.org>
1473
1474 * spinlock.h (HAS_COMPARE_AND_SWAP): Defined if
1475 HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS is defined.
1476 (compare_and_swap_with_release_semantics): New. Default to
1477 compare_and_swap if HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS
1478 is not defined.
1479
1480 * spinlock.c (__pthread_unlock): Call
1481 compare_and_swap_with_release_semantics () instead of
1482 compare_and_swap ().
1483
1484 2000-06-19 Ulrich Drepper <drepper@redhat.com>
1485
1486 * sysdeps/pthread/timer_create.c: Use _set_errno instead of assigning
1487 to errno directly.
1488 * sysdeps/pthread/timer_delete.c: Likewise.
1489 * sysdeps/pthread/timer_getoverr.c: Likewise.
1490 * sysdeps/pthread/timer_gettime.c: Likewise.
1491 * sysdeps/pthread/timer_settime.c: Likewise.
1492
1493 2000-06-13 Kaz Kylheku <kaz@ashi.footprints.net>
1494
1495 Timer nodes are now reference counted, and can be marked
1496 as deleted. This allows for the safe release of the global mutex
1497 in the middle without losing the timer being operated on.
1498
1499 * sysdeps/pthread/posix-timer.h (struct timer_node): The inuse
1500 member is now an enum with three values, so that an intermediate
1501 state can be represented (deleted but not free for reuse yet).
1502 New refcount member added.
1503 * sysdeps/pthread/timer_routines.c: Likewise.
1504
1505 * sysdeps/pthread/posix-timer.h (timer_addref, timer_delref,
1506 timer_valid): New inline functions added.
1507
1508 * sysdeps/pthread/timer_gettime.c (timer_gettime): Function
1509 restructured, recursive deadlock bug fixed.
1510
1511 * sysdeps/pthread/timer_gettime.c (timer_gettime): Uses new
1512 timer_addref to ensure that timer won't be deleted while mutex is not
1513 held. Also uses timer_invalid to perform validation of timer handle.
1514 * sysdeps/pthread/timer_settime.c (timer_settime): Likewise.
1515 * sysdeps/pthread/timer_getoverr.c (timer_getoverrun): Likewise.
1516
1517 2000-06-14 Ulrich Drepper <drepper@redhat.com>
1518
1519 * shlib-versions: Add entry for SH.
1520 Patch by Kaz Kojima <kkojima@rr.iij4u.or.jp>.
1521
1522 2000-06-13 Kaz Kylheku <kaz@ashi.footprints.net>
1523
1524 A few optimizations. Got rid of unnecessary wakeups of timer threads,
1525 tightened up some critical regions and micro-optimized some list
1526 manipulation code.
1527
1528 * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
1529 Returns int value now to indicate whether timer was queued at head.
1530 * sysdeps/pthread/posix-timer.h: Likewise.
1531 * sysdeps/pthread/timer_settime.c (timer_settime): Takes advantage of
1532 new return value from __timer_thread_queue_timer to avoid waking
1533 up timer thread unnecessarily.
1534
1535 * sysdeps/pthread/posix-timer.h (timer_id2ptr): No longer checks
1536 inuse flag, because this requires mutex to be held. Callers updated
1537 to do the check when they have the mutex.
1538 * sysdeps/pthread/timer_getoverr.c: Add check for inuse here.
1539
1540 * sysdeps/pthread/timer_settime.c (timer_settime): Tighter critical
1541 regions: avoids making system calls while holding timer mutex, and
1542 a few computations were moved outside of the mutex as well.
1543 * sysdeps/pthread/timer_gettime.c (timer_gettime): Likewise.
1544
1545 * sysdeps/pthread/posix-timer.h (list_unlink_ip): Function name changed
1546 to list_unlink_ip, meaning idempotent. Pointer manipulation
1547 changed to get better better code out of gcc.
1548 * sysdeps/pthread/timer_routines.c (list_unlink): Non-idempotent
1549 version of list_unlink added here.
1550 * sysdeps/pthread/timer_delete.c: Use appropriate list unlink
1551 function in all places: idempotent one for timers, non-idempotent
1552 one for thread nodes.
1553 * sysdeps/pthread/timer_settime: Likewise.
1554 * sysdeps/pthread/timer_routines.c: Likewise.
1555
1556 2000-06-13 Ulrich Drepper <drepper@redhat.com>
1557
1558 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_TIMERS): Define.
1559 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1560
1561 * sysdeps/pthread/Makefile: Remove tests definition.
1562
1563 2000-06-12 Kazumoto Kojima <kkojima@rr.iij4u.or.jp>
1564 Yutaka Niibe <gniibe@chroot.org>
1565
1566 * sysdeps/sh/pspinlock.c: New file.
1567 * sysdeps/sh/pt-machine.h: New file.
1568
1569 2000-06-12 Ulrich Drepper <drepper@redhat.com>
1570
1571 * Makefile (tests): Add joinrace.
1572
1573 * Examples/ex6.c: Test return value of pthread_join.
1574
1575 2000-06-11 Geoff Keating <geoffk@cygnus.com>
1576
1577 * sysdeps/powerpc/pspinlock.c (__pthread_spin_lock): Implement.
1578 (__pthread_spin_trylock): Implement.
1579 (__pthread_spin_unlock): Implement.
1580 (__pthread_spin_init): Implement.
1581 (__pthread_spin_destroy): Implement.
1582
1583 2000-06-10 Ulrich Drepper <drepper@redhat.com>
1584
1585 * sysdeps/pthread/timer_routines.c (list_append): Little fix to
1586 really append the entry.
1587
1588 2000-06-10 Andreas Jaeger <aj@suse.de>
1589
1590 * lockfile.c (__fresetlockfiles): Remove unused variable fp.
1591
1592 2000-06-10 Kaz Kylheku <kaz@ashi.footprints.net>
1593
1594 * sysdeps/pthread/timer_create.c: Thread matching now done on
1595 clock type as well as thread attributes.
1596 There are individual global signal-delivering threads for
1597 different clock types.
1598 * sysdeps/pthread/posix-timer.h: Likewise.
1599 * sysdeps/pthread/timer_routines.c: Likewise.
1600
1601 * sysdeps/pthread/timer_routines.c: Thread allocation and
1602 deallocation function now remembers to put thread on active
1603 list and remove from active list.
1604 Thus now the feature of binding multiple timers
1605 to a single thread actually works.
1606
1607 2000-06-10 Ulrich Drepper <drepper@redhat.com>
1608
1609 * pthread.c (__pthread_create_2_1): Optimize a bit.
1610
1611 * internals.h (invalid_handle): Also test for p_terminated != 0.
1612 (nonexisting_handle): New function. Same as old invalid_handle.
1613 * join.c (pthread_join): Use nonexisting_handle instead of
1614 invalid_handle to test for acceptable thread handle.
1615 * manager.c (pthread_handle_free): Likewise.
1616 * joinrace.c: New file.
1617 Reported by Permaine Cheung <pcheung@cygnus.com>.
1618
1619 2000-06-08 Ulrich Drepper <drepper@redhat.com>
1620
1621 * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
1622 Correct handling of matching variable.
1623
1624 * sysdeps/pthread/tst-timer.c (main): Rewrite initializers to
1625 avoid warnings.
1626
1627 * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
1628 Be prepared for empty timer list.
1629
1630 * sysdeps/pthread/timer_create.c (timer_create): Correct names of
1631 CPUTIME clock ID. Add support for thread clocks.
1632
1633 * sysdeps/pthread/posix-timer.h (timer_ptr2id): Operands in
1634 subtraction were switched.
1635
1636 * sysdeps/pthread/timer_routines.c (init_module): Use
1637 THREAD_MAXNODES threads.
1638
1639 * sysdeps/pthread/posix-timer.h (struct timer_node): Add creator_pid.
1640 * sysdeps/pthread/timer_create.c: Fill in creator_pid.
1641 * sysdeps/pthread/timer_routines.c (thread_expire_timer): Send signal
1642 with sigqueueinfo is this system call is available.
1643
1644 * sysdeps/pthread/timer_create.c (timer_create): Allow
1645 CLOCK_CPUTIME if _POSIX_CPUTIME is defined.
1646
1647 * sysdeps/pthread/Makefile: New file. Add rules to build timer
1648 functionality.
1649 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add TIMER_MAX.
1650
1651 2000-06-04 Kaz Kylheku <kaz@ashi.footprints.net>
1652
1653 * sysdeps/pthread/posix-timer.h: New file.
1654 * sysdeps/pthread/timer_create.c: New file.
1655 * sysdeps/pthread/timer_delete.c: New file.
1656 * sysdeps/pthread/timer_getoverr.c: New file.
1657 * sysdeps/pthread/timer_gettime.c: New file.
1658 * sysdeps/pthread/timer_routines.c: New file.
1659 * sysdeps/pthread/timer_settime.c: New file.
1660 * sysdeps/pthread/tst-timer.c: New file.
1661
1662 2000-06-08 Ulrich Drepper <drepper@redhat.com>
1663
1664 * sysdeps/unix/sysv/linux/bits/local_lim.h: Remove OPEN_MAX and
1665 LINK_MAX definitions if necessary.
1666
1667 2000-06-04 Kaz Kylheku <kaz@ashi.footprints.net>
1668
1669 Added missing fork time handling of global libio lock.
1670
1671 * lockfile.c (__fresetlockfiles): Now also resets the list lock,
1672 not just the individual stream locks. Rewritten to use new
1673 iterator interface provided by libio rather than accessing
1674 global variable.
1675
1676 * lockfile.c (__flockfilelist, _funlockfilelist): New functions
1677 which lock and unlock the stream list using the new interface
1678 provied by libio.
1679 * internals.h: Likewise.
1680
1681 * ptfork.c (__fork): Now calls __flockfilelist before fork,
1682 and __funlockfilelist in the parent after the fork.
1683 Child still calls __fresetlockfiles as before.
1684
1685 * linuxthreads.texi: Now explains what happens to streams at
1686 fork time. Also whole new section on forking and thread added.
1687 Definition of pthread_atfork moved out of Miscellaneous Functions
1688 to this new section.
1689
1690 2000-06-04 Jakub Jelinek <jakub@redhat.com>
1691
1692 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c (__pthread_spin_lock):
1693 Add missing register.
1694 * sysdeps/sparc/sparc64/pspinlock.c (__pthread_spin_lock): Likewise.
1695
1696 2000-06-02 Jakub Jelinek <jakub@redhat.com>
1697
1698 * sysdeps/sparc/sparc32/pspinlock.c: Implement spinlocks.
1699 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: New.
1700 * sysdeps/sparc/sparc64/pspinlock.c: Implement spinlocks.
1701
1702 2000-05-31 Andreas Jaeger <aj@suse.de>
1703
1704 * sysdeps/mips/pspinlock.c: Implement spinlocks.
1705
1706 2000-05-28 Ulrich Drepper <drepper@redhat.com>
1707
1708 * spinlock.c (__pthread_lock): Remove ASSERT.
1709
1710 * Makefile (tests): Add ex8.
1711 * Examples/ex8.c: New file.
1712
1713 2000-05-12 Kaz Kylheku <kaz@ashi.footprints.net>
1714
1715 Bugfix: The pthread_atfork mechanism now takes care of its
1716 own internal mutex at fork time.
1717
1718 * ptfork.c (__fork): Revised so that the mutex is held across
1719 the fork operation and while the handlers are called, and so that
1720 the child resets the mutex.
1721
1722 * linuxthreads.texi: Updated pthread_atfork documentation to make
1723 it clear that fork and pthread_atfork can't be reentered from
1724 atfork handlers, that pthread_atfork and fork are mutually atomic,
1725 and that the handlers are inherited by the child process.
1726
1727 2000-05-24 Ulrich Drepper <drepper@redhat.com>
1728
1729 * Makefile (libpthread-routines): Add pspinlock.
1730 * cancel.c: Rename __pthread_spin_unlock back to __pthread_unlock.
1731 Use struct _pthread_fastlock instead of pthread_spinlock_t.
1732 * condvar.c: Likewise.
1733 * internals.h: Likewise.
1734 * join.c: Likewise.
1735 * manager.c: Likewise.
1736 * mutex.c: Likewise.
1737 * pthread.c: Likewise.
1738 * rwlock.c: Likewise.
1739 * semaphore.c: Likewise.
1740 * signals.c: Likewise.
1741 * spinlock.h: Likewise.
1742 * spinlock.c: Likewise. Remove pthread_spin_lock functions.
1743 * sysdeps/alpha/pspinlock.c: New file.
1744 * sysdeps/arm/pspinlock.c: New file.
1745 * sysdeps/i386/pspinlock.c: New file.
1746 * sysdeps/m68k/pspinlock.c: New file.
1747 * sysdeps/mips/pspinlock.c: New file.
1748 * sysdeps/powerpc/pspinlock.c: New file.
1749 * sysdeps/sparc/sparc32/pspinlock.c: New file.
1750 * sysdeps/sparc/sparc64/pspinlock.c: New file.
1751 * sysdeps/pthread/bits/pthreadtypes.h: Remove pthread_spinlock_t
1752 back to _pthread_fastlock. Define new pthread_spinlock_t.
1753
1754 2000-05-24 Andreas Jaeger <aj@suse.de>
1755
1756 * sysdeps/i386/i686/pt-machine.h: Only use LDT on newer kernels.
1757
1758 2000-05-21 Jakub Jelinek <jakub@redhat.com>
1759
1760 * manager.c (pthread_handle_create): Initialize p_res._sock to -1.
1761
1762 2000-05-13 Jakub Jelinek <jakub@redhat.com>
1763
1764 * internals.h (__RES_PTHREAD_INTERNAL): Define.
1765
1766 2000-05-06 Kaz Kylheku <kaz@ashi.footprints.net>
1767
1768 * mutex.c (pthread_once): IN_PROGRESS state of pthread_once_t
1769 object state is represented with additional bits which distinguish
1770 whether that state was set up in the current process, or
1771 in an ancestor process. If that state was set in an ancestor,
1772 it means that a fork happened while thread was executing the init
1773 function. In that case, the state is reset to NEVER.
1774 * mutex.c (__pthread_once_fork_prepare): New function.
1775 (__pthread_once_fork_child): Likewise
1776 (__pthread_once_fork_parent): Likewise
1777 (__pthread_reset_pthread_once): Removed.
1778 * ptfork.c (__fork): Call new handlers in mutex.c.
1779 * internals.h: Declarations of new mutex.c functions added.
1780 Declaration of removed function deleted.
1781 * linuxthreads.texi: Updated documentation about pthread_once
1782 to clarify what happens under cancellation and forking.
1783
1784 2000-05-06 Kaz Kylheku <kaz@ashi.footprints.net>
1785
1786 * internals.h: New thread manager request type, REQ_KICK.
1787 * join.c (pthread_exit): main thread now calls exit() instead
1788 of _exit() in order to proper process cleanup.
1789 * manager.c (__pthread_manager): Do not terminate manager
1790 after unblocking main thread; wait for main thread's
1791 REQ_PROCESS_EXIT request instead.
1792 Also, added REQ_KICK case to handle new request; this just does
1793 nothing.
1794 * manager.c (pthread_exited): Do not terminate manager after
1795 unblocking main thread.
1796 * manager.c (__pthread_manager_sighandler): If the main thread
1797 is waiting for all other threads to die, send a REQ_KICK into
1798 the thread manager request pipe to get it to clean out the threads
1799 and unblock the main thread as soon as possible. This fixes
1800 the 2000 millisecond hang on shutdown bug.
1801 * Examples/ex7.c: New file, tests shutdown behavior when all threads
1802 including the main one call pthread_exit(), or implicitly do so.
1803 * Makefile (tests): Add ex7.
1804
1805 2000-05-05 Andreas Jaeger <aj@suse.de>
1806
1807 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
1808 (pthread_getcpuclockid): Correct test for ourselves.
1809
1810 2000-05-05 Ulrich Drepper <drepper@redhat.com>
1811
1812 * internals.h (struct _pthread_descr_struct): Reorganization.
1813 Allocate room for 16 pointers at head of the structure for future
1814 thread-local data handling. Move p_self member in this area.
1815 * manager.c (pthread_handle_create): Adjust use of p_self.
1816 * sysdeps/i386/useldt.h (THREAD_SELF): Likewise.
1817 * pthread.c (__pthread_initial_thread): Adjust initialization.
1818 (__pthread_manager_thread): Likewise.
1819
1820 2000-04-29 Bruno Haible <haible@clisp.cons.org>
1821
1822 * join.c (pthread_exit): Use THREAD_GETMEM_NC instead of THREAD_GETMEM
1823 for eventmask larger than 1 word.
1824
1825 2000-04-27 Ulrich Drepper <drepper@redhat.com>
1826
1827 * Versions [libpthread] (GLIBC_2.2): Add __pthread_initialize_minimal.
1828 * pthread.c (__pthread_initialize_minimal): New function. Perform
1829 minimal initialization.
1830 (pthread_initialize): Remove this code here.
1831 * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h" again. We
1832 are working around the problem in glibc.
1833
1834 2000-04-25 Ulrich Drepper <drepper@redhat.com>
1835
1836 * sysdeps/i386/i686/pt-machine.h: Do not use "../useldt.h" for
1837 now. First gcc must be fixed (more concrete: libgcc).
1838
1839 2000-04-24 Ulrich Drepper <drepper@redhat.com>
1840
1841 * pthread.c: Remove special treatement for interrupt handlers on x86.
1842 * manager.c (pthread_free): Use FREE_THREAD not FREE_THREAD_SELF.
1843 * sysdeps/i386/useldt.h: Use "q" constraint instead of "r" where
1844 necessary.
1845 * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h".
1846
1847 2000-04-24 Mark Kettenis <kettenis@gnu.org>
1848
1849 * join.c (pthread_exit): Set p_terminated after reporting the
1850 termination event instead of before.
1851
1852 2000-04-20 Jakub Jelinek <jakub@redhat.com>
1853
1854 * sysdeps/pthread/bits/libc-lock.h: Only declare __pthread_rwlock_*
1855 if __USE_UNIX98.
1856
1857 2000-04-18 Andreas Jaeger <aj@suse.de>
1858
1859 * Versions: Use ld instead of ld.so.
1860
1861 2000-04-18 Jakub Jelinek <jakub@redhat.com>
1862
1863 * sysdeps/unix/sysv/linux/sparc/bits/sigcontext.h (struct sigcontext):
1864 Remove the typedef keyword.
1865
1866 2000-04-18 Jakub Jelinek <jakub@redhat.com>
1867
1868 * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Use membar,
1869 not stbar.
1870 (READ_MEMORY_BARRIER): Define.
1871 * spinlock.c (__pthread_spin_unlock): Use READ_MEMORY_BARRIER, not
1872 MEMORY_BARRIER.
1873 * internals.h (READ_MEMORY_BARRIER): Define if not defined in sysdep
1874 headers.
1875
1876 2000-04-17 Ulrich Drepper <drepper@redhat.com>
1877
1878 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
1879 (pthread_getcpuclockid): Don't compare thread_id with thread_self,
1880 use thread_handle().
1881
1882 2000-04-16 Ulrich Drepper <drepper@redhat.com>
1883
1884 * condvar.c (pthread_cond_timedwait_relative): Don't test for owner
1885 if fast mutex is used. Don't initialize `already_canceled' twice.
1886 Correctly test for return value of timedsuspend.
1887
1888 * pthread.c: Correct long-time braino. We never set SA_SIGINFO and
1889 therefore don't need the _rt versions of the signal handlers.
1890
1891 2000-04-15 Ulrich Drepper <drepper@redhat.com>
1892
1893 * pthread.c (pthread_yield): New function.
1894 * sysdeps/pthread/pthread.h (pthread_yield): Add prototype.
1895 * Versions [libpthread] (GLIBC_2.2): Add pthread_yield.
1896 * internals.h: Declare __pthread_yield.
1897
1898 * pthread.c (pthread_initialize): Avoid a bit more code if
1899 realtime signals are known to exist.
1900
1901 * pthread.c: Is __ASSUME_REALTIME_SIGNALS then avoid generating code
1902 to dynamically detect RT signals and avoid generating compatibility
1903 functions with old kernel.
1904 * restart.h (restart) [__ASSUME_REALTIME_SIGNALS]: Use
1905 __pthread_restart_new directly.
1906 (suspend) [__ASSUME_REALTIME_SIGNALS]: Use
1907 __pthread_wait_for_restart_signal directly.
1908 (timedsuspend) [__ASSUME_REALTIME_SIGNALS]: Use
1909 __pthread_timedsuspend_new directly.
1910
1911 2000-04-15 Ulrich Drepper <drepper@redhat.com>
1912
1913 * condvar.c: Remove all the special code to handle cond_timedwait.
1914 Use timedsuspend instead.
1915 * internals.h: Declare __pthread_timedsuspend_old,
1916 __pthread_timedsuspend_new, and __pthread_timedsuspend.
1917 Remove declaration of __pthread_init_condvar.
1918 * pthread.c: Define __pthread_timedsuspend variable.
1919 (__pthread_timedsuspend_old): New function. Timed suspension
1920 implementation for old Linux kernels.
1921 (__pthread_timedsuspend_new): New function. Timed suspension
1922 implementation for new Linux kernels.
1923 * restart.h (timedsuspend): New function. Call appropriate
1924 suspension function through __pthread_timedsuspend.
1925 * semaphore.c (sem_timedwait): Use timedsuspend, don't duplicate
1926 the code.
1927 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1928
1929 * internals.h (WRITE_MEMORY_BARRIER): Define as MEMORY_BARRIER if
1930 undefined.
1931 * spinlock.c: Use WRITE_MEMORY_BARRIER instead of MEMORY_BARRIER
1932 where possible.
1933 * sysdeps/alpha/pt-machine.h: Define WRITE_MEMORY_BARRIER.
1934 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
1935
1936 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _POSIX_SPAWN.
1937 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1938
1939 2000-04-14 Andreas Jaeger <aj@suse.de>
1940
1941 * weaks.c: Fix typo.
1942
1943 * shlib-versions (mips.*-.*-linux.*): Support only GLIBC 2.0 and
1944 2.2 for linuxthreads.
1945
1946 2000-04-13 Ulrich Drepper <drepper@redhat.com>
1947
1948 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
1949 (pthread_getcpuclockid): Fix typo.
1950
1951 2000-04-12 Ulrich Drepper <drepper@redhat.com>
1952
1953 * Makefile (libpthread-routines): Add getcpuclockid.
1954 * Versions [libpthread] (GLIBC_2.2): Add pthread_getcpuclockid.
1955 * sysdeps/pthread/getcpuclockid.c: New file.
1956 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c: New file.
1957 * sysdeps/pthread/pthread.h: Add prototype for pthread_getcpuclockid.
1958
1959 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_SPIN_LOCKS):
1960 Defined.
1961 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1962
1963 * sysdeps/pthread/pthread.h: Add prototypes for pthread_spin_init,
1964 pthread_spin_destroy, pthread_spin_lock, pthread_spin_trylock,
1965 and pthread_spin_unlock.
1966 * sysdeps/pthread/bits/pthreadtypes.h: Change struct _pthread_fastlock
1967 into pthread_spinlock_t. Change all uses.
1968 * spinlock.c: Implement pthread_spin_lock.
1969 Rename __pthread_unlock to __pthread_spin_unlock and define weak
1970 alias for real name.
1971 Define pthread_spin_trylock, pthread_spin_init, and
1972 pthread_spin_destroy.
1973 Change all uses of _pthread_fastlock to pthread_spinlock_t.
1974 * spinlock.h: Rename __pthread_unlock to __pthread_spin_unlock.
1975 Change all uses of _pthread_fastlock to pthread_spinlock_t.
1976 * Versions [libpthread] (GLIBC_2.2): Add pthread_spin_init,
1977 pthread_spin_destroy, pthread_spin_lock, pthread_spin_trylock,
1978 and pthread_spin_unlock.
1979 * cancel.c: Use __pthread_spin_unlock instead of __pthread_unlock.
1980 Change all uses of _pthread_fastlock to pthread_spinlock_t.
1981 * condvar.c: Likewise.
1982 * internals.h: Likewise.
1983 * join.c: Likewise.
1984 * manager.c: Likewise.
1985 * mutex.c: Likewise.
1986 * pthread.c: Likewise.
1987 * rwlock.c: Likewise.
1988 * semaphore.c: Likewise.
1989 * signals.c: Likewise.
1990
1991 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add various new POSIX
1992 macros.
1993 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
1994
1995 2000-04-11 Ulrich Drepper <drepper@redhat.com>
1996
1997 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add
1998 _POSIX_SHARED_MEMORY_OBJECTS.
1999
2000 2000-04-11 Andreas Jaeger <aj@suse.de>
2001
2002 * sysdeps/mips/pt-machine.h (MEMORY_BARRIER): Define.
2003 (__compare_and_swap): Mark as modifying memory.
2004
2005 2000-04-11 Geoff Keating <geoffk@cygnus.com>
2006
2007 * sysdeps/powerpc/pt-machine.h (MEMORY_BARRIER): Don't be
2008 __volatile__.
2009 (__compare_and_swap): Replace other 'sync' with MEMORY_BARRIER.
2010 Don't have the 'asm' __volatile__.
2011
2012 2000-04-11 Ulrich Drepper <drepper@redhat.com>
2013
2014 * internals.h: Define MEMORY_BARRIER as empty if not defined already.
2015 * spinlock.c (__pthread_lock): Add memory barriers.
2016 (__pthread_unlock): Likewise.
2017 * sysdeps/alpha/pt-machine.h (MEMORY_BARRIER): Define using mb
2018 instruction.
2019 (RELEASE): Not needed anymore.
2020 (__compare_and_swap): Mark asm as modifying memory.
2021 * sysdeps/powerpc/pt-machine.h (sync): Remove. Replace with definition
2022 of MEMORY_BARRIER.
2023 (__compare_and_swap): Use MEMORY_BARRIER instead of sync.
2024 * sysdeps/sparc/sparc32/pt-machine.h (RELEASE): Not needed anymore.
2025 (MEMORY_BARRIER): Define using stbar.
2026 * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Define using
2027 stbar.
2028 (__compare_and_swap): Use MEMORY_BARRIER to ensure ordering.
2029 Patch by Xavier Leroy <Xavier.Leroy@inria.fr> based on comments by
2030 Mike Burrows <m3b@pa.dec.com>.
2031
2032 2000-04-09 Ulrich Drepper <drepper@redhat.com>
2033
2034 * signals.c (sigaction): Fix return value for the case SIG is one
2035 of the signals the implementation uses.
2036 Patch by Xavier.Leroy@inria.fr.
2037
2038 2000-04-01 Andreas Jaeger <aj@suse.de>
2039
2040 * attr.c: Use shlib-compat macros.
2041 * oldsemaphore.c: Likewise.
2042 * pthread.c: Likewise.
2043 * weaks.c: Likewise.
2044
2045 2000-03-26 Ulrich Drepper <drepper@redhat.com>
2046
2047 * semaphore.c (sem_timedwait): New function.
2048 Patch by Carl Mailloux <carlm@oricom.ca>.
2049 * semaphore.h: Declare sem_timedwait.
2050 * Versions [libpthread] (GLIBC_2.2): Add sem_timedwait.
2051
2052 2000-03-26 Roland McGrath <roland@baalperazim.frob.com>
2053
2054 * sysdeps/pthread/Makefile: File removed.
2055
2056 2000-03-23 Ulrich Drepper <drepper@redhat.com>
2057
2058 * mutex.c (__pthread_reset_pthread_once): Reset once_masterlock.
2059 * internals.h (__pthread_reset_pthread_once): Add prototype.
2060 * ptfork.c (__fork): Call __pthread_reset_pthread_once.
2061
2062 * manager.c (pthread_handle_create): Store ID of new thread before
2063 clone call.
2064
2065 2000-03-21 Ulrich Drepper <drepper@redhat.com>
2066
2067 * attr.c: Use new macros from shlib-compat.h to define versions.
2068 * oldsemaphore.c: Likewise.
2069 * semaphore.c: Likewise.
2070 * weaks.c: Likewise.
2071
2072 * pthread.c: Update for new SHLIB_COMPAT definition.
2073
2074 * manager.c (__pthread_manager): Unmask debug signal.
2075
2076 * pthread.c (pthread_initialize): Test for address of __dso_handle
2077 being NULL, not value. Use __on_exit, not on_exit.
2078 Patch by Andreas Jaeger <aj@suse.de>.
2079
2080 * pthread.c: Use new macros from shlib-compat.h to define versions.
2081
2082 2000-03-19 Ulrich Drepper <drepper@redhat.com>
2083
2084 * pthread.c (pthread_initialize): Instead of on_exit use
2085 __cxa_atexit if __dso_label is available to allow unloading the
2086 libpthread shared library.
2087
2088 2000-03-16 Ulrich Drepper <drepper@redhat.com>
2089
2090 * condvar.c: Make tests for ownership of mutex less strict.
2091
2092 2000-03-14 Ulrich Drepper <drepper@redhat.com>
2093
2094 * condvar.c (pthread_cond_wait): Check whether mutex is owned by
2095 current thread and return error if not.
2096 (pthread_cond_timedwait_relative_old): Likewise.
2097 (pthread_cond_timedwait_relative_new): Likewise.
2098
2099 * mutex.c (__pthread_once): Handle cancelled init function correctly.
2100 (pthread_once_cancelhandler): New function.
2101 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2102
2103 2000-03-14 Andreas Jaeger <aj@suse.de>
2104
2105 * pthread.c (pthread_handle_sigcancel_rt): GS has been renamed to
2106 REG_GS.
2107 (pthread_handle_sigrestart_rt): Likewise.
2108 * signals.c (pthread_sighandler_rt): Likewise.
2109
2110 2000-03-02 Andreas Jaeger <aj@suse.de>
2111
2112 * sysdeps/pthread/bits/libc-lock.h: Fix typo.
2113 Reported by Sean Chen <sean.chen@turbolinux.com>.
2114
2115 2000-02-28 Andreas Jaeger <aj@suse.de>
2116
2117 * rwlock.c: Fix typo.
2118
2119 2000-02-27 Ulrich Drepper <drepper@redhat.com>
2120
2121 * rwlock.c: Define __* variants of the functions and make old names
2122 aliases.
2123 * Versions [GLIBC_2.2]: Export the __pthread_rwlock_* functions.
2124 * sysdeps/pthread/bits/libc-lock.h: Define __libc_rwlock_* macros.
2125
2126 2000-02-25 Andreas Jaeger <aj@suse.de>
2127
2128 * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
2129 pwrite64, lseek64, open64, and __open64 with version 2.2.
2130
2131 2000-02-22 Ulrich Drepper <drepper@redhat.com>
2132
2133 * semaphore.h (SEM_FAILED): Use 0 not NULL.
2134
2135 2000-02-14 Ulrich Drepper <drepper@redhat.com>
2136
2137 * condvar.c (pthread_cond_timedwait_relative_old): Tight loop with
2138 nanosleep does not work either. Get absolute time inside the
2139 loop.
2140 (pthread_cond_timedwait_relative_new): Likewise.
2141 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2142
2143 2000-02-13 Andreas Jaeger <aj@suse.de>
2144
2145 * condvar.c (pthread_cond_timedwait_relative_new): Fix last patch.
2146 (pthread_cond_timedwait_relative_old): Likewise.
2147
2148 2000-02-13 Ulrich Drepper <drepper@redhat.com>
2149
2150 * condvar.c (pthread_cond_timedwait_relative_old): Undo last patch
2151 but keep the code around. A bug in the kernel prevent us from
2152 using the code.
2153 (pthread_cond_timedwait_relative_new): Likewise.
2154 (PR libc/1597 and libc/1598).
2155
2156 2000-02-01 Kaz Kylheku <kaz@ashi.footprints.net>
2157
2158 * condvar.c (pthread_cond_timedwait_relative_old): Do tight
2159 loop around nanosleep calls instead of around most of the function
2160 (pthread_cond_timedwait_relative_new): Likewise.
2161 body. Got rid of backwards goto and one local.
2162
2163 2000-01-31 Ulrich Drepper <drepper@redhat.com>
2164
2165 * condvar.c (pthread_cond_timedwait_relative_old): Recompute time
2166 before every nanosleep call to account for time spent in the rest
2167 of the function.
2168 (pthread_cond_timedwait_relative_new): Likewise.
2169 Patch by khendricks@ivey.uwo.ca (PR libc/1564).
2170
2171 2000-01-29 Ulrich Drepper <drepper@redhat.com>
2172
2173 * condvar.c (pthread_cond_timedwait_relative_old): Get remaining time
2174 from nanosleep call so that in case we restart we only wait for the
2175 remaining time.
2176 (pthread_cond_timedwait_relative_new): Likewise.
2177 Patch by khendricks@ivey.uwo.ca (PR libc/1561).
2178
2179 2000-01-18 Ulrich Drepper <drepper@cygnus.com>
2180
2181 * manager.c (pthread_allocate_stack): Compute guard page address
2182 correctly. Patch by HJ Lu.
2183
2184 * sysdeps/pthread/pthread.h: Define
2185 PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP.
2186
2187 2000-01-16 Ulrich Drepper <drepper@cygnus.com>
2188
2189 * rwlock.c (pthread_rwlock_unlock): Correct one more problem with
2190 preference handling.
2191 (pthread_rwlockattr_setkind_np): Allow
2192 PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP.
2193 Patches by Kaz Kylheku <kaz@ashi.footprints.net>.
2194
2195 2000-01-12 Ulrich Drepper <drepper@cygnus.com>
2196
2197 * internals.h (pthread_readlock_info): New structure.
2198 (_pthread_descr_struct): Add p_readlock_list, p_readlock_free, and
2199 p_untracked_readlock_count.
2200 * pthread.c (__pthread_initial_thread, pthread_manager_thread):
2201 Add initializers for new fields.
2202 * manager.c (pthread_free): Free read/write lock lists.
2203 * queue.h (queue_is_empty): New function.
2204 * rwlock.c: Implement requirements about when readers should get
2205 locks assigned.
2206 * sysdeps/pthread/pthread.h
2207 (PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP): New definition.
2208 * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_rwlock_t):
2209 Define this name as well.
2210 Patches by Kaz Kylheku <kaz@ashi.footprints.net>.
2211
2212 2000-01-05 Ulrich Drepper <drepper@cygnus.com>
2213
2214 * pthread.c (__pthread_initial_thread, pthread_manager_thread):
2215 Adjust initializers for struct _pthread_descr_struct change.
2216 * internals.h (struct _pthread_descr_struct): Move new elements to
2217 the end.
2218
2219 2000-01-03 Kaz Kylheku <kaz@ashi.footprints.net>
2220
2221 Redesigned how cancellation unblocks a thread from internal
2222 cancellation points (sem_wait, pthread_join,
2223 pthread_cond_{wait,timedwait}).
2224 Cancellation won't eat a signal in any of these functions
2225 (*required* by POSIX and Single Unix Spec!).
2226 * condvar.c: Spontaneous wakeup on pthread_cond_timedwait won't eat a
2227 simultaneous condition variable signal (not required by POSIX
2228 or Single Unix Spec, but nice).
2229 * spinlock.c: __pthread_lock queues back any received restarts
2230 that don't belong to it instead of assuming ownership of lock
2231 upon any restart; fastlock can no longer be acquired by two threads
2232 simultaneously.
2233 * restart.h: Restarts queue even on kernels that don't have
2234 queued real time signals (2.0, early 2.1), thanks to atomic counter,
2235 avoiding a rare race condition in pthread_cond_timedwait.
2236
2237 1999-12-31 Andreas Jaeger <aj@suse.de>
2238
2239 * internals.h: Remove duplicate prototype declarations.
2240
2241 * weaks.c: Remove __THROW from prototypes since the file is not
2242 compiled by a C++ compiler.
2243 * internals.h: Likewise.
2244
2245 1999-12-30 Andreas Jaeger <aj@suse.de>
2246
2247 * sysdeps/pthread/pthread.h: Move internal functions to...
2248 * sysdeps/pthread/bits/libc-lock.h: ...here.
2249
2250 1999-12-29 Andreas Jaeger <aj@suse.de>
2251
2252 * sysdeps/pthread/pthread.h: Fix typos, reformat comments.
2253
2254 1999-12-28 Ulrich Drepper <drepper@cygnus.com>
2255
2256 * sysdeps/alpha/pt-machine.h: Move stack_pointer definition to the
2257 beginning.
2258
2259 * manager.c (__pthread_start): Add one more cast to prevent
2260 warning on 64bit machines.
2261
2262 1999-12-21 Ulrich Drepper <drepper@cygnus.com>
2263
2264 * manager.c (pthread_handle_create): Set p_pid of new thread
2265 before calling the callback function to report a new thread.
2266
2267 1999-12-20 Andreas Jaeger <aj@suse.de>
2268
2269 * pthread.c (pthread_initialize): Move getrlimit call after
2270 setting of errno.
2271
2272 1999-12-18 Ulrich Drepper <drepper@cygnus.com>
2273
2274 * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
2275 pwrite64, lseek64, open64, and __open64.
2276 * wrapsyscall.c: Define pread, __pread64, pread64, pwrite, __pwrite64,
2277 pwrite64, lseek64, open64, and __open64.
2278
2279 * manager.c (pthread_allocate_stack): Correct computation of
2280 new_thread_bottom. Correct handling of stack size and when the
2281 rlimit method to guard for stack growth is used.
2282 * pthread.c (pthread_initialize): Stack limit must be STACK_SIZE
2283 minus one pagesize (not two).
2284
2285 1999-12-03 Andreas Jaeger <aj@suse.de>
2286
2287 * Versions: Add __res_state with version GLIBC_2.2.
2288
2289 * errno.c (__res_state): New function to return thread specific
2290 resolver state.
2291
2292 * pthread.c (pthread_initialize): Initialize p_resp.
2293 (__pthread_reset_main_thread): Also set p_resp.
2294
2295 * manager.c (pthread_handle_create): Initialize p_resp.
2296
2297 * internals.h: Add thread specific resolver state.
2298 Based on patches by Adam D. Bradley <artdodge@cs.bu.edu>.
2299
2300 1999-12-01 Ulrich Drepper <drepper@cygnus.com>
2301
2302 * sysdeps/i386/pt-machine.h: Move stack_pointer definition to the
2303 beginning.
2304 * sysdeps/i386/i686/pt-machine.h: Likewise.
2305 Patches by Alan Modra <alan@SPRI.Levels.UniSA.Edu.Au>.
2306
2307 1999-11-23 Ulrich Drepper <drepper@cygnus.com>
2308
2309 * manager.c (pthread_start_thread_event): Initialize p_pid already
2310 here.
2311
2312 1999-11-22 Ulrich Drepper <drepper@cygnus.com>
2313
2314 * internals.h: Add prototype for __pthread_manager_event.
2315 * manager.c (__pthread_manager_event): New function.
2316 (pthread_start_thread_event): Correct computation of self.
2317 Use INIT_THREAD_SELF.
2318 * pthread.c (__pthread_manager_thread): Initialize p_lock.
2319 (__pthread_initialize_manager): Respect event flags also for creation
2320 of the manager thread.
2321
2322 1999-11-08 Ulrich Drepper <drepper@cygnus.com>
2323
2324 * pthread.c (__pthread_initialize_manager): Initialize
2325 __pthread_manager_thread.p_tid.
2326
2327 1999-11-02 Ulrich Drepper <drepper@cygnus.com>
2328
2329 * internals.h: Declare __pthread_last_event.
2330 * manager.c: Define __pthread_last_event.
2331 (pthread_handle_create): Set __pthread_last_event.
2332 (pthread_exited): Likewise.
2333 * join.c (pthread_exit): Likewise.
2334
2335 * Makefile (libpthread-routines): Add events.
2336 * events.c: New file.
2337 * internals.h: Protect against multiple inclusion.
2338 Include thread_dbP.h header.
2339 (struct _pthread_descr_struct): Add new fields p_report_events and
2340 p_eventbuf.
2341 Declare event reporting functions.
2342 * join.c (pthread_exit): Signal event if this is wanted.
2343 * manager.c (__pthread_threads_events): New variable.
2344 (pthread_handle_create): Take new parameters with event information.
2345 Signal TD_CREATE event if wanted.
2346 (__pthread_manager): Adjust pthread_handle_create call.
2347 (pthread_start_thread_event): New function. Block until manager is
2348 finished and then call pthread_start_thread.
2349 (pthread_exited): Signal TD_REAP event if wanted.
2350
2351 1999-10-26 Ulrich Drepper <drepper@cygnus.com>
2352
2353 * restart.h (suspend_with_cancellation): Rewrite as a macro.
2354
2355 * condvar.c (pthread_cond_timedwait_relative): Don't mark as inline.
2356
2357 1999-10-25 Andreas Jaeger <aj@suse.de>
2358
2359 * internals.h: Remove K&R compatibility.
2360 * no-tsd.c: Likewise.
2361 * semaphore.h: Likewise.
2362 * signals.c: Likewise.
2363 * sysdeps/pthread/bits/libc-tsd.h: Likewise.
2364 * sysdeps/unix/sysv/linux/bits/sigthread.h: Likewise.
2365 * weaks.c: Likewise.
2366
2367 1999-10-21 Xavier Leroy <Xavier.Leroy@inria.fr>
2368
2369 * pthread.c: For i386, wrap pthread_handle_sigrestart and
2370 pthread_handle_sigcancel with functions that restore %gs from the
2371 signal context. For each signal handling function, two wrappers
2372 are required, one for a non-RT signal and one for a RT signal.
2373 * signal.c: For i386, add code to restore %gs from the signal
2374 context in pthread_sighandler and pthread_sighandler_rt.
2375
2376 1999-10-17 Ulrich Drepper <drepper@cygnus.com>
2377
2378 * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add cast.
2379
2380 1999-10-14 Ulrich Drepper <drepper@cygnus.com>
2381
2382 * pthread.c (__pthread_initial_thread): Pass argument to
2383 PTHREAD_START_ARGS_INITIALIZER.
2384 (__pthread_manager_thread): Likewise.
2385
2386 * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add parameter to
2387 initialize function.
2388
2389 * manager.c (pthread_handle_create): Remove p_startfct initialization.
2390
2391 * internals.h (_pthread_descr_struct): We don't need p_startfct field.
2392
2393 1999-10-12 Ulrich Drepper <drepper@cygnus.com>
2394
2395 * internals.h: Correct return types for __libc_read and __libc_write.
2396
2397 1999-10-09 Andreas Jaeger <aj@suse.de>
2398
2399 * internals.h: Add __new_sem_post to get prototype in
2400 manager.c; include semaphore.h for needed types.
2401
2402 1999-10-08 Ulrich Drepper <drepper@cygnus.com>
2403
2404 * manager.c (__pthread_manager) [REQ_POST]: Use __new_sem_post
2405 directly instead of calling sem_post which should not be necessary
2406 but is faster and might help in some case to work around problems.
2407 Patch by khendricks@ivey.uwo.ca [libc/1382].
2408
2409 1999-10-08 Andreas Schwab <schwab@suse.de>
2410
2411 * sysdeps/pthread/Subdirs: New file.
2412 * Implies: Removed.
2413
2414 1999-10-07 Ulrich Drepper <drepper@cygnus.com>
2415
2416 * Implies: New file.
2417 * internals.h (struct _pthread_descr_struct): Add p_startfct.
2418 * manager.c (pthread_handle_create): Initialize p_startfct.
2419 * pthread.c: Define __linuxthread_pthread_sizeof_descr variable.
2420
2421 1999-09-25 Ulrich Drepper <drepper@cygnus.com>
2422
2423 * manager.c (__linuxthreads_pthread_threads_max): New variable.
2424 * specific.c (__linuxthreads_pthread_keys_max): New variable.
2425 (__linuxthreads_pthread_key_2ndlevel_size): New variable.
2426
2427 * condvar.c (pthread_cond_timedwait_relative): Never return with
2428 EINTR. Patch by Andreas Schwab.
2429
2430 1999-09-19 Ulrich Drepper <drepper@cygnus.com>
2431
2432 * signals.c (sigaction): Correct last patch. Don't select
2433 pthread_sighandler_rt based on the signal number but instead of
2434 the SA_SIGINFO flag.
2435
2436 1999-09-23 Ulrich Drepper <drepper@cygnus.com>
2437
2438 * specific.c: Move definitions of struct pthread_key_struct and
2439 destr_function to ...
2440 * internals.h: ...here.
2441
2442 1999-09-18 Ulrich Drepper <drepper@cygnus.com>
2443
2444 * pthread.c (pthread_handle_sigrestart_rt): New function. Use
2445 this instead of pthread_handle_sigrestart if the signal is an RT
2446 signal.
2447
2448 * signals.c: Handle passing through of sighandler arguments also
2449 for real-time signals.
2450
2451 1999-09-03 Andreas Schwab <schwab@suse.de>
2452
2453 * ptfork.c (__fork): Renamed from fork and use __libc_fork. Add
2454 fork as weak alias.
2455 (__vfork): New function, alias vfork.
2456 * Versions: Export __fork, vfork, and __vfork in libpthread.
2457
2458 1999-08-23 Andreas Schwab <schwab@suse.de>
2459
2460 * signals.c (pthread_sighandler): Add SIGCONTEXT_EXTRA_ARGS to
2461 call to signal handler.
2462
2463 1999-08-20 Ulrich Drepper <drepper@cygnus.com>
2464
2465 * pthread.c (__pthread_reset_main_thread): Undo last change.
2466 (__pthread_kill_other_threads_np): Reset signal handlers for the
2467 signals we used in the thread implementation here.
2468
2469 1999-08-19 Ulrich Drepper <drepper@cygnus.com>
2470
2471 * pthread.c (__pthread_reset_main_thread): Reset signal handlers
2472 for the signals we used in the thread implementation [PR libc/1234].
2473
2474 * Versions: Export __pthread_kill_other_threads_np from libpthread
2475 for GLIBC_2.1.2.
2476
2477 * signals.c: Pass sigcontext through wrapper to the user function.
2478
2479 1999-08-01 Ulrich Drepper <drepper@cygnus.com>
2480
2481 * Versions [ld.so] (GLIBC_2.0): Export __libc_internal_tsd_get and
2482 __libc_internal_tsd_set.
2483
2484 1999-07-29 Andreas Jaeger <aj@arthur.rhein-neckar.de>
2485
2486 * manager.c: Remove inclusion of <linux/tasks.h> since it's not
2487 needed anymore.
2488
2489 1999-07-16 Andreas Jaeger <aj@arthur.rhein-neckar.de>
2490
2491 * internals.h: Align _pthread_descr_struct to 32 bytes.
2492 Reported by Tim Hockin <thockin@cobaltnet.com>, close PR
2493 libc/1206.
2494
2495 1999-07-09 Ulrich Drepper <drepper@cygnus.com>
2496
2497 * oldsemaphore.c (sem_compare_and_swap): Fix use of compare and
2498 swap function.
2499
2500 1999-07-09 Cristian Gafton <gafton@redhat.com>
2501
2502 * Makefile (libpthread-routines): Add oldsemaphore routine.
2503 * Versions: Add sem_destroy, sem_getvalue, sem_init, sem_post,
2504 sem_trywait, and sem_wait to GLIBC_2.1.
2505 * oldsemaphore.c: New file.
2506 * semaphore.c: Add default_symbol_versions for the changed functions.
2507 (__new_sem_init): Rename from sem_init.
2508 (__new_sem_post): Rename from sem_post.
2509 (__new_sem_wait): Rename from sem_wait.
2510 (__new_sem_trywait): Rename from sem_trywait.
2511 (__new_sem_getvalue): Rename from sem_getvalue.
2512 (__new_sem_destroy): Rename from sem_destroy.
2513
2514 1999-06-23 Robey Pointer <robey@netscape.com>
2515
2516 * internals.h: Added p_nextlock entry to separate queueing for a
2517 lock from queueing for a CV (sometimes a thread queues on a lock
2518 to serialize removing itself from a CV queue).
2519 * pthread.c: Added p_nextlock to initializers.
2520 * spinlock.c: Changed to use p_nextlock instead of p_nextwaiting.
2521
2522 1999-07-09 Ulrich Drepper <drepper@cygnus.com>
2523
2524 * manager.c (pthread_handle_create): Free mmap region after stack
2525 if clone failed. Patch by Kaz Kylheku <kaz@ashi.FootPrints.net>.
2526
2527 1999-05-23 Andreas Jaeger <aj@arthur.rhein-neckar.de>
2528
2529 * man/pthread_cond_init.man: Correct example.
2530 Reported by Tomas Berndtsson <tomas@nocrew.org>.
2531
2532 * linuxthreads.texi (Condition Variables): Likewise.
2533
2534 1999-05-18 Jakub Jelinek <jj@ultra.linux.cz>
2535
2536 * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): Use
2537 casx not cas, also successful casx returns the old value in rd
2538 and not the new value.
2539
2540 1999-05-16 Xavier Leroy <Xavier.Leroy@inria.fr>
2541
2542 * manager.c: If pthread_create() is given a NULL attribute
2543 and the thread manager runs with a realtime policy, set the
2544 scheduling policy of the newly created thread back to SCHED_OTHER.
2545 * manager.c: If the PTHREAD_INHERIT_SCHED attribute is given,
2546 initialize the schedpolicy field of new_thread->p_start_args
2547 to that of the calling thread.
2548
2549 1999-04-29 Ulrich Drepper <drepper@cygnus.com>
2550
2551 * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): cas
2552 instruction does not allow memory element to use offset.
2553
2554 1999-04-28 Ulrich Drepper <drepper@cygnus.com>
2555
2556 * manager.c (pthread_allocate_stack): Optimize initialization of new
2557 thread descriptor.
2558
2559 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_define_initialized):
2560 Don't use initializer since it is all zeroes.
2561 (__libc_once_define): Likewise.
2562
2563 1999-04-16 Andreas Jaeger <aj@arthur.rhein-neckar.de>
2564
2565 * sysdeps/arm/Implies: Removed since cmpxchg/no-cmpxchg
2566 doesn't exist anymore.
2567 * sysdeps/i386/Implies: Likewise.
2568 * sysdeps/m68k/Implies: Likewise.
2569 * sysdeps/mips/Implies: Likewise.
2570 * sysdeps/powerpc/Implies: Likewise.
2571 * sysdeps/sparc/sparc32/Implies: Likewise.
2572 * sysdeps/sparc/sparc64/Implies: Likewise.
2573
2574 1999-04-15 Ulrich Drepper <drepper@cygnus.com>
2575
2576 * sysdeps/alpha/bits/semaphore.h: Removed.
2577 * sysdeps/powerpc/bits/semaphore.h: Removed.
2578 * sysdeps/pthread/cmpxchg/bits/semaphore.h: Removed.
2579 * sysdeps/pthread/no-cmpxchg/bits/semaphore.h: Removed.
2580 * Makefile (headers): Remove bits/semaphore.h.
2581
2582 * semaphore.h: Define _pthread_descr if necessary.
2583 Don't include limits.h. Define SEM_VALUE_MAX directly.
2584 Define SEM_FAILED.
2585 (sem_t): Protect element names with leading __.
2586 Add declarations for sem_close, sem_open, and sem_unlink.
2587 * semaphore.c: Adjust all functions for new element names.
2588 Define sem_close, sem_open, and sem_unlink.
2589 * Versions (libthread): Add sem_close, sem_open, and sem_unlink for
2590 GLIBC_2.1.1.
2591 * sysdeps/pthread/bits/pthreadtypes.h: Define _pthread_descr only if
2592 necessary.
2593
2594 1999-03-16 H.J. Lu <hjl@gnu.org>
2595
2596 * specific.c (pthread_key_delete): Check th->p_terminated to see
2597 if the thread is running.
2598
2599 * Versions (__libc_internal_tsd_get, __libc_internal_tsd_set):
2600 Added to GLIBC_2.0 for libc.so.
2601
2602 1999-02-12 H.J. Lu <hjl@gnu.org>
2603
2604 * Versions (__libc_current_sigrtmin, __libc_current_sigrtmax,
2605 __libc_allocate_rtsig): Added to GLIBC_2.1.
2606
2607 * internals.h (DEFAULT_SIG_RESTART): Removed.
2608 (DEFAULT_SIG_CANCEL): Removed.
2609
2610 * pthread.c (init_rtsigs, __libc_current_sigrtmin,
2611 __libc_current_sigrtmax, __libc_allocate_rtsig): New functions.
2612 (__pthread_sig_restart, __pthread_sig_cancel,
2613 __pthread_sig_debug): Initialized.
2614 (pthread_initialize): Call init_rtsigs () to initialize
2615 real-time signals.
2616
2617 1999-02-03 H.J. Lu <hjl@gnu.org>
2618
2619 * manager.c (__pthread_manager): Do block __pthread_sig_debug.
2620 Don't restart the thread which sent REQ_DEBUG.
2621 (pthread_start_thread): Check if __pthread_sig_debug > 0
2622 before debugging.
2623
2624 * pthread.c (__pthread_initialize_manager): Suspend ourself
2625 after sending __pthread_sig_debug to gdb instead of
2626 __pthread_sig_cancel.
2627
2628 1999-01-24 H.J. Lu <hjl@gnu.org>
2629
2630 * manager.c (__pthread_manager): Delete __pthread_sig_debug
2631 from mask if __pthread_sig_debug > 0.
2632 (pthread_handle_create): Increment __pthread_handles_num.
2633
2634 * manager.c (pthread_handle_create): Don't pass CLONE_PTRACE to clone.
2635 * pthread.c (__pthread_initialize_manager): Likewise.
2636
2637 * pthread.c (pthread_initialize): Use __libc_allocate_rtsig (1)
2638 instead of __libc_allocate_rtsig (2).
2639 (__pthread_initialize_manager): Send __pthread_sig_debug to gdb
2640 instead of __pthread_sig_cancel.
2641 (pthread_handle_sigdebug): Fix comments.
2642
2643 1999-01-21 Ulrich Drepper <drepper@cygnus.com>
2644
2645 * manager.c (pthread_allocate_stack): Set
2646 __pthread_nonstandard_stacks if user-specified stack is used.
2647
2648 1999-01-16 Ulrich Drepper <drepper@cygnus.com>
2649
2650 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _LFS_ASYNCHRONOUS_IO,
2651 _LFS_LARGEFILE, _LFS64_LARGEFILE, and _LFS64_STDIO from Unix98.
2652
2653 1999-01-07 Xavier Leroy <Xavier.Leroy@inria.fr>
2654
2655 * pthread.c: Use a third signal __pthread_sig_debug distinct
2656 from __pthread_sig_cancel to notify gdb when a thread is
2657 created
2658 * manager.c: Likewise.
2659 * internals.h: Likewise.
2660 * signals.c: The implementation of sigwait(s) assumed that
2661 all signals in s have signal handlers already attached.
2662 This is not required by the standard, so make it work
2663 also if some of the signals have no handlers.
2664
2665 1999-01-05 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
2666
2667 * linuxthreads.texi: Remove pointers from first @node. Move old
2668 @node spec inside comment.
2669
2670 1998-12-31 Ulrich Drepper <drepper@cygnus.com>
2671
2672 * sysdeps/pthread/bits/stdio-lock.h: Define _IO_lock_lock and
2673 _IO_lock_unlock.
2674
2675 1998-12-29 Ulrich Drepper <drepper@cygnus.com>
2676
2677 * semaphore.c (sem_trywait): Don't forget to unlock the semaphore
2678 lock. Patch by Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>.
2679
2680 1998-12-21 Ulrich Drepper <drepper@cygnus.com>
2681
2682 * manager.c: Threads now send __pthread_sig_cancel on termination.
2683 Change clone call and signal masks.
2684 * thread.c (pthread_handle_sigrestart): Remove special code for
2685 manager.
2686 (pthread_handle_sigcancel): In manager thread call
2687 __pthread_manager_sighandler.
2688 * sysdeps/i386/pt-machine.h (__compare_and_swap): Add memory clobber.
2689 * sysdeps/i386/i686/pt-machine.h: Likewise.
2690 Patches by Xavier Leroy.
2691
2692 1998-12-14 Ulrich Drepper <drepper@cygnus.com>
2693
2694 * spinlock.c (__pthread_unlock): Don't crash if called for an
2695 untaken mutex. Reported by Ruslan V. Brushkoff <rus@Snif.Te.Net.UA>.
2696
2697 * Examples/ex6.c: Unbuffer stdout and reduce sleep time to reduce
2698 overall runtime.
2699
2700 1998-12-13 Ulrich Drepper <drepper@cygnus.com>
2701
2702 * Examples/ex3.c: Wait until all threads are started before
2703 searching for the number to avoid race condition on very fast
2704 systems.
2705
2706 1998-12-08 Andreas Jaeger <aj@arthur.rhein-neckar.de>
2707
2708 * sysdeps/pthread/pthread.h: Remove __pthread_setcanceltype
2709 declaration since it's not needed.
2710
2711 * sysdeps/pthread/pthread.h: Move internal functions to ...
2712 * internals.h: ...here.
2713
2714 1998-12-02 H.J. Lu <hjl@gnu.org>
2715
2716 * pthread.c (__pthread_sig_restart): Initiliaze to 0 if
2717 SIGRTMIN is defined.
2718 (__pthread_sig_cancel): Likewise.
2719
2720 1998-12-01 Andreas Jaeger <aj@arthur.rhein-neckar.de>
2721
2722 * wrapsyscall.c: Include <sys/mman.h> for msync,
2723 <stdlib.h> for system and <termios.h> for tcdrain prototype.
2724 Correct msync declaration.
2725
2726 1998-11-29 Roland McGrath <roland@baalperazim.frob.com>
2727
2728 * sysdeps/pthread/bits/libc-tsd.h (__libc_tsd_define, __libc_tsd_get,
2729 __libc_tsd_set): New macros for new interface.
2730 * no-tsd.c: New file, provide uninitialized defns of
2731 __libc_internal_tsd_get and __libc_internal_tsd_set.
2732 * Makefile (routines): Add no-tsd.
2733
2734 1998-10-12 Roland McGrath <roland@baalperazim.frob.com>
2735
2736 * internals.h: Include <bits/libc-tsd.h>, not <bits/libc-lock.h>.
2737 * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
2738 __libc_internal_tsd_set): Move decls to ...
2739 * sysdeps/pthread/bits/libc-tsd.h: New file for __libc_internal_tsd_*
2740 declarations.
2741
2742 * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
2743 __libc_internal_tsd_set): Make these pointers to functions, not
2744 functions; remove #pragma weak decls for them.
2745 * specific.c (__libc_internal_tsd_get, __libc_internal_tsd_set):
2746 Define static functions and initialized pointers to them.
2747
2748 1998-11-18 Ulrich Drepper <drepper@cygnus.com>
2749
2750 * Makefile (CFLAGS-mutex.c): Define as -D__NO_WEAK_PTHREAD_ALIASES.
2751 (CFLAGS-specific.c): Likewise.
2752 (CFLAGS-pthread.c): Likewise.
2753 (CFLAGS-ptfork.c): Likewise.
2754 (CFLAGS-cancel.c): Likewise.
2755 * sysdeps/pthread/bits/libc-lock.h: Don't mark __pthread_* functions
2756 as weak references if __NO_WEAK_PTHREAD_ALIASES is defined.
2757
2758 * mutex.c (pthread_mutex_init): Define as strong symbol.
2759 (pthread_mutex_destroy): Likewise.
2760 (pthread_mutex_trylock): Likewise.
2761 (pthread_mutex_lock): Likewise.
2762 (pthread_mutex_unlock): Likewise.
2763 (pthread_mutexattr_init): Likewise.
2764 (pthread_mutexattr_destroy): Likewise.
2765 (pthread_once): Likewise.
2766 * ptfork.c (pthread_atfork): Likewise.
2767 * specific.c (pthread_key_create): Likewise.
2768 (pthread_setspecific): Likewise.
2769 (pthread_getspecific): Likewise.
2770
2771 1998-11-15 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
2772
2773 * linuxthreads.texi: Fix punctuation after xref.
2774
2775 1998-11-10 H.J. Lu <hjl@gnu.org>
2776
2777 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine NR_OPEN
2778 if it is defined in <linux/limits.h>.
2779
2780 1998-10-29 14:28 Ulrich Drepper <drepper@cygnus.com>
2781
2782 * spinlock.h (__pthread_trylock): Define inline.
2783 (__pthread_lock): Add extra parameter to declaration. Declare
2784 using internal_function.
2785 (__pthread_unlock): Declare using internal_function.
2786 * spinlock.c (__pthread_lock): Add new parameter. Use it instead
2787 of local variable self. Avoid recomputing self. Define using
2788 internal_function.
2789 (__pthread_trylock): Remove.
2790 (__pthread_unlock): Define using internal_function.
2791 * cancel.c: Adjust for __pthread_lock interface change. Use already
2792 computed self value is possible.
2793 * condvar.c: Likewise.
2794 * join.c: Likewise.
2795 * manager.c: Likewise.
2796 * mutex.c: Likewise.
2797 * pthread.c: Likewise.
2798 * rwlock.c: Likewise.
2799 * semaphore.c: Likewise.
2800 * signals.c: Likewise.
2801
2802 1998-10-27 13:46 Ulrich Drepper <drepper@cygnus.com>
2803
2804 * sysdeps/pthread/pthread.h (struct _pthread_cleanup_buffer): Prepend
2805 __ to field names of the struct.
2806 * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_fastlock):
2807 Likewise.
2808 (pthread_attr_t): Likewise.
2809 (pthread_cond_t): Likewise.
2810 (pthread_condattr_t): Likewise.
2811 (pthread_mutex_t): Likewise.
2812 (pthread_mutexattr_t): Likewise.
2813 (pthread_rwlock_t): Likewise.
2814 (pthread_rwlockattr_t): Likewise.
2815 * attr.c: Adjust for pthread.h and pthreadtypes.h change.
2816 * cancel.c: Likewise.
2817 * condvar.c: Likewise.
2818 * manager.c: Likewise.
2819 * mutex.c: Likewise.
2820 * pthread.c: Likewise.
2821 * ptlongjmp.c: Likewise.
2822 * rwlock.c: Likewise.
2823 * spinlock.c: Likewise.
2824
2825 1998-10-09 Ulrich Drepper <drepper@cygnus.com>
2826
2827 * sysdeps/i386/pt-machine.h (get_eflags, set_eflags): Mark these
2828 also with PT_EI.
2829
2830 * sysdeps/i386/i686/pt-machine.h: Remove unused inline
2831 definitions.
2832
2833 * Makefile (libpthread-routines): Add pt-machine.
2834 * pt-machine.c: New file.
2835 * sysdeps/alpha/pt-machine.h: Define PT_EI as extern inline is not
2836 yet defined. Use PT_EI in extern inline definitions.
2837 * sysdeps/arm/pt-machine.h: Likewise.
2838 * sysdeps/i386/pt-machine.h: Likewise.
2839 * sysdeps/i386/i686/pt-machine.h: Likewise.
2840 * sysdeps/m68k/pt-machine.h: Likewise.
2841 * sysdeps/mips/pt-machine.h: Likewise.
2842 * sysdeps/powerpc/pt-machine.h: Likewise.
2843 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
2844 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
2845
2846 1998-10-02 Andreas Jaeger <aj@arthur.rhein-neckar.de>
2847
2848 * semaphore.h: Include <sys/types.h> so that _pthread_descr
2849 is declared.
2850
2851 1998-09-15 David S. Miller <davem@pierdol.cobaltmicro.com>
2852
2853 * sysdeps/sparc/sparc32/pt-machine.h (INIT_THREAD_SELF): Add nr
2854 argument.
2855 * sysdeps/sparc/sparc64/pt-machine.h (INIT_THREAD_SELF): Likewise.
2856
2857 1998-09-12 14:24 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu>
2858
2859 * sysdeps/unix/sysv/linux/bits/sigthread.h: Add multiple inclusion
2860 guard.
2861
2862 1998-09-02 11:08 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2863
2864 * signals.c (sigaction): Check that sig is less than NSIG to avoid
2865 array index overflow.
2866
2867 1998-09-06 10:56 Ulrich Drepper <drepper@cygnus.com>
2868
2869 * sysdeps/pthread/semaphore.h: New file.
2870
2871 1998-09-06 09:08 Ulrich Drepper <drepper@cygnus.com>
2872
2873 * sysdeps/pthread/bits/libc-lock.h (enum __libc_tsd_key_t): Add
2874 _LIBC_TSD_KEY_DL_ERROR.
2875
2876 1998-08-31 Ulrich Drepper <drepper@cygnus.com>
2877
2878 * sysdeps/i386/i686/pt-machine.h (testandset): Add memory clobber.
2879 * sysdeps/i386/pt-machine.h: Likewise.
2880 Suggested by Roland McGrath.
2881
2882 1998-08-28 13:58 Ulrich Drepper <drepper@cygnus.com>
2883
2884 * internals.h: Also define THREAD_GETMEM_NC and THREAD_SETMEM_NC to
2885 access thread data with non-constant offsets.
2886 * specific.c: Use THREAD_GETMEM_NC and THREAD_SETMEM_NC where
2887 necessary.
2888
2889 * sysdeps/i386/useldt.h: Fix typo. Add THREAD_GETMEM_NC and
2890 THREAD_SETMEM_NC definitions.
2891
2892 * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM_NC and
2893 THREAD_SETMEM_NC.
2894 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
2895
2896 1998-08-26 15:46 Ulrich Drepper <drepper@cygnus.com>
2897
2898 * internals.h: Define THREAD_GETMEM and THREAD_SETMEM to default if
2899 not already defined.
2900 (struct _pthread_descr_struct): Add p_self and p_nr field.
2901 * manager.c (__pthread_handles): Define second element to point
2902 to manager thread.
2903 (__pthread_handles_num): Initialize to 2.
2904 (__pthread_manager): Use INIT_THREAD_SELF with two arguments.
2905 (pthread_start_thread): Likewise.
2906 (pthread_handle_create): Start search for free slot at entry 2.
2907 Initialize new fields p_self and p_nr.
2908 Call __clone with CLONE_PTRACE if available.
2909 (pthread_free): Call FREE_THREAD_SELF if available.
2910 * pthread.c (__pthread_initial_thread): Initialize new fields.
2911 (__pthread_manager_thread): Likewise.
2912 (__pthread_initialize_manager): Call __clone with CLONE_PTRACE.
2913
2914 * cancel.c: Use THREAD_GETMEM and THREAD_SETMEM to access the
2915 elements of the thread descriptor.
2916 * condvar.c: Likewise.
2917 * errno.c: Likewise.
2918 * join.c: Likewise.
2919 * manager.c: Likewise.
2920 * pthread.c: Likewise.
2921 * ptlongjmp.c: Likewise.
2922 * semaphore.c: Likewise.
2923 * signals.c: Likewise.
2924 * specific.c: Likewise.
2925 * spinlock.c: Likewise.
2926
2927 * sysdeps/alpha/pt-machine.h (INIT_THREAD_SELF): Add extra parameter.
2928
2929 * sysdeps/i386/useldt.h: New file.
2930 * sysdeps/i386/i686/pt-machine.h: Show how to use this file.
2931
2932 * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM and
2933 THREAD_SETMEM using __thread_self.
2934 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
2935
2936 1998-08-24 Geoff Keating <geoffk@ozemail.com.au>
2937
2938 * spinlock.c (__pthread_lock): Reset p_nextwaiting to NULL if it
2939 turned out that we didn't need to queue after all.
2940
2941 1998-08-22 Geoff Keating <geoffk@ozemail.com.au>
2942
2943 * sysdeps/powerpc/pt-machine.h: Remove testandset, it's not used
2944 and wastes space; correct types.
2945
2946 1998-08-08 11:18 H.J. Lu <hjl@gnu.org>
2947
2948 * signals.c (sigaction): Handle NULL argument.
2949
2950 1998-08-04 Ulrich Drepper <drepper@cygnus.com>
2951
2952 * sysdeps/unix/sysv/linux/bits/sigthread.h: Use __sigset_t instead
2953 of sigset_t.
2954
2955 1998-08-02 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2956
2957 * Makefile (linuxthreads-version): Extract correct number from
2958 Banner.
2959
2960 1998-07-29 Xavier Leroy <Xavier.Leroy@inria.fr>
2961
2962 * Banner: Bump version number to 0.8
2963 * FAQ.html: Many updates, in particular w.r.t. debugging.
2964 * manager.c: Support for non-default stacksize for
2965 LinuxThreads-allocated stacks;
2966 don't use guard pages for stacks with default size, rely on
2967 rlimit(RLIMIT_STACK) instead (it's cheaper).
2968 * attr.c: Likewise.
2969 * cancel.c: Use __pthread_sig_cancel and __pthread_sig_restart
2970 everywhere instead of PTHREAD_SIG_CANCEL and PTHREAD_SIG_RESTART.
2971 * condvar.c: Likewise.
2972 * internals.h: Likewise.
2973 * restart.h: Likewise.
2974 * signals.c: Likewise.
2975 * pthread.c: Likewise; set rlimit(RLIMIT_STACK) as we need it.
2976
2977 1998-07-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2978
2979 * weaks.c: Define pthread_mutexattr_[sg]ettype instead of
2980 __pthread_mutexattr_[sg]ettype. Add more weak aliases.
2981 * Versions: Put __pthread_mutexattr_settype under version
2982 GLIBC_2.0. Don't export __pthread_mutexattr_setkind_np and
2983 __pthread_mutexattr_gettype.
2984
2985 1998-07-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2986
2987 * sysdeps/pthread/bits/libc-lock.h: Make
2988 __pthread_mutexattr_settype weak. Don't make
2989 __pthread_mutexattr_setkind_np weak.
2990
2991 1998-07-16 10:52 Ulrich Drepper <drepper@cygnus.com>
2992
2993 * manager.c (pthread_handle_create): Check whether sched_setscheduler
2994 call can succeed here.
2995
2996 * mutex.c: Define __pthread_mutexattr_settype and make
2997 __pthread_mutexattr_setkind_np an alias.
2998 Likewise for __pthread_mutexattr_gettype.
2999
3000 1998-07-15 11:00 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu>
3001
3002 * attr.c (pthread_attr_setschedpolicy): Don't check whether caller
3003 is root.
3004
3005 1998-07-14 19:38 Ulrich Drepper <drepper@cygnus.com>
3006
3007 * sysdeps/pthread/bits/libc-lock.h: Define __libc_cleanup_end.
3008
3009 1998-07-11 Andreas Jaeger <aj@arthur.rhein-neckar.de>
3010
3011 * Examples/ex6.c: Include <unistd.h> for usleep.
3012
3013 1998-06-13 11:04 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3014
3015 * Examples/ex4.c (main): Use exit, not pthread_exit.
3016
3017 1998-07-09 13:39 Ulrich Drepper <drepper@cygnus.com>
3018
3019 * Versions: Add __pthread_mutexattr_gettype and
3020 __pthread_mutexattr_settype.
3021 * lockfile.c: Use __pthread_mutexattr_settype instead of
3022 __pthread_mutexattr_setkind_np.
3023 * mutex.c: Define __pthread_mutexattr_gettype and
3024 __pthread_mutexattr_settype.
3025 * weak.c: Likewise.
3026 * sysdeps/pthread/pthread.h: Declare __pthread_mutexattr_gettype and
3027 __pthread_mutexattr_settype.
3028 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_init_recursive):
3029 Use __pthread_mutexattr_settype.
3030
3031 1998-07-08 22:26 Ulrich Drepper <drepper@cygnus.com>
3032
3033 * Versions: Add pthread_mutexattr_gettype, pthread_mutexattr_settype.
3034 * mutex.c: Define weak alias pthread_mutexattr_gettype and
3035 pthread_mutexattr_settype.
3036 * sysdeps/pthread/pthread.h: Declare these functions.
3037 Move pthread_sigmask and pthread_kill declaration in separate header.
3038 * sysdeps/unix/sysv/linux/bits/sigthread.h: New file.
3039
3040 1998-07-07 15:20 Ulrich Drepper <drepper@cygnus.com>
3041
3042 * Makefile: Add rules to compile and run tests.
3043 * Examples/ex1.c: Little changes to fix warnings.
3044 * Examples/ex2.c: Likewise.
3045 * Examples/ex3.c: Likewise.
3046 * Examples/ex4.c: Likewise.
3047 * Examples/ex5.c: Likewise.
3048 * Examples/ex6.c: New file.
3049
3050 1998-07-05 11:54 Ulrich Drepper <drepper@cygnus.com>
3051
3052 * Versions: Add pthread_attr_init to GLIBC_2.1 version in libc.
3053
3054 1998-07-01 Andreas Jaeger <aj@arthur.rhein-neckar.de>
3055
3056 * attr.c: Include <string.h>.
3057
3058 1998-06-30 11:47 Ulrich Drepper <drepper@cygnus.com>
3059
3060 * attr.c: Include errno.h. Use memcpy to copy sched_param.
3061 * internals.h: Include limits.h.
3062 * manager.c: Use memcpy to copy sched_param.
3063 * ptfork.c: Include errno.h.
3064 * pthread.c: Likewise.
3065 * semaphore.c: Likewise.
3066 * specific.c: Likewise.
3067 * spinlock.h: Likewise.
3068 * sysdeps/pthread/pthread.h: Include only allowed headers. Move
3069 type definition to ...
3070 * sysdeps/pthread/bits/pthreadtypes.h: ...here. New file.
3071
3072 1998-06-29 12:34 Ulrich Drepper <drepper@cygnus.com>
3073
3074 * sysdeps/pthread/pthread.h: Use __PMT not __P for function pointers.
3075
3076 * sysdeps/pthread/pthread.h: Define various PTHREAD_* symbols also
3077 as macros as demanded in POSIX.1, Annex C.
3078
3079 1998-06-29 12:29 Ulrich Drepper <drepper@cygnus.com>
3080
3081 * internals.h (struct pthread_request): For free use pthread_t
3082 instead of pthread_descr.
3083 * join.c (pthread_join): Pass thread_id, not th to manager.
3084 (pthread_detach): Likewise.
3085 * manager.c (__pthread_manager): Except thread ID in FREE_REQ case.
3086 (pthread_exited): Remove detached queue code.
3087 (pthread_handle_free): Expect thread ID parameter and use it to
3088 validate the thread decsriptor. Don't use detached queue.
3089 Patches by Xavier Leroy.
3090
3091 1998-06-27 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3092
3093 * libpthread.map: Export accept, longjmp, sigaction, siglongjmp,
3094 _IO_flockfile, _IO_ftrylockfile, _IO_funlockfile,
3095 __pthread_atfork, __pthread_key_create, __pthread_once.
3096 * internals.h: Doc fix.
3097 * pthread.c (__pthread_initialize): Define again.
3098
3099 1998-06-26 Ulrich Drepper <drepper@cygnus.com>
3100
3101 * manager.c (pthread_exited): If thread is not detached put it on
3102 special list.
3103 (pthread_handle_free): If thread is not on list with living threads
3104 search on list with detached threads.
3105
3106 * sysdeps/pthread/pthread.h (PTHREAD_RWLOCK_INITIALIZER): Correct
3107 for new definition of pthread_rwlock_t.
3108
3109 * spinlock.c: Correct test whether to compile
3110 __pthread_compare_and_swap or not.
3111
3112 1998-06-25 19:27 Ulrich Drepper <drepper@cygnus.com>
3113
3114 * attr.c: Finish user stack support. Change locking code to be safe
3115 in situations with different priorities.
3116 * cancel.c: Likewise.
3117 * condvar.c: Likewise.
3118 * internals.h: Likewise.
3119 * join.c: Likewise.
3120 * manager.c: Likewise.
3121 * mutex.c: Likewise.
3122 * pthread.c: Likewise.
3123 * ptlongjmp.c: Likewise.
3124 * queue.h: Likewise.
3125 * rwlock.c: Likewise.
3126 * semaphore.c: Likewise.
3127 * semaphore.h: Likewise.
3128 * signals.c: Likewise.
3129 * spinlock.c: Likewise.
3130 * spinlock.h: Likewise.
3131 * sysdeps/pthread/pthread.h: Likewise.
3132 Patches by Xavier Leroy.
3133
3134 * sysdeps/i386/i686/pt-machine.h: New file.
3135
3136 1998-06-25 Ulrich Drepper <drepper@cygnus.com>
3137
3138 * sysdeps/pthread/pthread.h: Make [sg]et_stacksize and
3139 [sg]et_stackaddr prototypes always available.
3140
3141 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
3142 _POSIX_THREAD_ATTR_STACKSIZE and _POSIX_THREAD_ATTR_STACKADDR.
3143
3144 1998-06-24 Ulrich Drepper <drepper@cygnus.com>
3145
3146 * manager.c (pthread_free): Undo patch from 980430.
3147 Reported by David Wragg <dpw@doc.ic.ac.uk>.
3148
3149 1998-06-09 15:07 Ulrich Drepper <drepper@cygnus.com>
3150
3151 * manager.c: Define __pthread_manager_adjust_prio and use it to
3152 increase priority when needed.
3153 * internals.h: Add prototype for __pthread_manager_adjust_prio.
3154 * mutex.c: Optimize mutexes to wake up only one thread.
3155 * pthread.c: Move PID of manager for global variable in structure
3156 element.
3157 Patches by Xavier Leroy.
3158
3159 1998-06-07 13:47 Ulrich Drepper <drepper@cygnus.com>
3160
3161 * sysdeps/pthread/bits/libc-lock.h: Optimize cleanup handlers a bit.
3162
3163 1998-06-03 Andreas Jaeger <aj@arthur.rhein-neckar.de>
3164
3165 * attr.c: Correct typo.
3166
3167 1998-05-01 Ulrich Drepper <drepper@cygnus.com>
3168
3169 * manager.c (pthread_free): Unmap guard before the stack.
3170 Patch by Matthias Urlichs.
3171
3172 1998-04-30 Ulrich Drepper <drepper@cygnus.com>
3173
3174 * manager.c (pthread_free): Detect already free child.
3175 Patch by Xavier Leroy, reported by Matthias Urlichs.
3176
3177 1998-04-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3178
3179 * Makefile (linuxthreads-version): Renamed back from
3180 libpthread-version.
3181
3182 1998-04-21 Ulrich Drepper <drepper@cygnus.com>
3183
3184 * ptlongjmp.c: Add prototypes for __libc_siglongjmp and
3185 __libc_longjmp.
3186
3187 1998-04-20 14:55 Ulrich Drepper <drepper@cygnus.com>
3188
3189 * Makefile (libpthread-routines): Add ptlongjmp and spinlock.
3190 * internals.h: Add definitions for new spinlock implementation.
3191 * ptlongjmp.c: New file.
3192 * spinlock.c: New file.
3193 * spinlock.h (acquire): Don't reschedule using __sched_yield, use
3194 new function __pthread_acquire to prevent deadlocks with thread
3195 with different priorities.
3196 Patches by Xavier Leroy <Xavier.Leroy@inria.fr>.
3197
3198 1998-03-16 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3199
3200 * manager.c (__pthread_manager): Reduce first argument to select
3201 to include just the needed file descriptor.
3202
3203 1998-03-17 00:06 Ulrich Drepper <drepper@cygnus.com>
3204
3205 * manager.c: Fix last patch which caused core dumps.
3206
3207 * pthread.c: Correctly handle missing SIGRTMIN.
3208
3209 1998-03-15 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3210
3211 * libpthread.map: Add __libc_internal_tsd_get and
3212 __libc_internal_tsd_set. Add missing cancelable functions. Export
3213 libc internal versions of the cancelable functions.
3214
3215 1998-03-13 16:51 Ulrich Drepper <drepper@cygnus.com>
3216
3217 * weaks.c: Define pthread_attr_init as GLIBC_2.0 and GLIBC_2.1.
3218
3219 1998-03-13 00:46 Ulrich Drepper <drepper@cygnus.com>
3220
3221 * attr.c: Implement pthread_attr_[gs]etguardsize,
3222 pthread_attr_[gs]setstackaddr, pthread_attr_[gs]etstacksize.
3223 Change pthread_attr_init to have two interfaces.
3224 * internals.h (struct _pthread_descr_struct): Add new fields for
3225 above functions.
3226 * libpthread.map: Add names in GLIBC_2.1 section.
3227 * manager.c (pthread_handle_create): Implement guardsize and
3228 user stack.
3229 (pthread_free): Likewise.
3230 * pthread.c (pthread_create): Add new interface for changed
3231 pthread_attr_t.
3232 * sysdeps/pthread/pthread.h: Add prototypes for new functions.
3233 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add definition of
3234 PTHREAD_STACK_MIN.
3235
3236 1998-03-11 00:42 Wolfram Gloger <wmglo@dent.med.uni-muenchen.de>
3237
3238 * manager.c: Enable resetting of the thread scheduling policy
3239 to SCHED_OTHER when the parent thread has a different one.
3240
3241 1998-02-01 13:51 Ulrich Drepper <drepper@cygnus.com>
3242
3243 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
3244 _POSIX_ASYNCHRONOUS_IO.
3245
3246 * sysdeps/pthread/pthread.h: Define bits for Unix98 variants of
3247 mutexes.
3248 * mutex.c: Implement new mutex types.
3249
3250 * internals.h: Include <signal.h>.
3251
3252 * libpthread.map: Add __erno_location and __h_errno_location.
3253
3254 * errno.c: Return pointer to variable actually in use. This might
3255 not be the one in the thread structure.
3256 * internals.h (struct _pthread_descr_struct): Add new fields p_errnop
3257 and p_h_errnop.
3258 * manager.c (__pthread_manager): Set p_errnop and p_h_errnop member
3259 of manager thread structure.
3260 (pthread_handle_create): Set p_errnop and p_h_errnop members for new
3261 thread.
3262 * pthread.c: Adapt initializer for thread structures.
3263 (__pthread_initial_thread): Set p_errnop and p_h_errnop member.
3264 (__pthread_reset_main_thread): Reset p_errnop and p_h_errnop of
3265 current thread to global variables.
3266
3267 1998-01-31 17:27 Ulrich Drepper <drepper@cygnus.com>
3268
3269 * rwlock.c: New file.
3270 * Makefile (libpthread-routines): Add rwlock.
3271 * sysdeps/pthread/pthread.h: Define data structures and declare
3272 functions.
3273 * libpthread.map: Add new functions.
3274
3275 1997-12-18 13:50 Philip Blundell <pb@nexus.co.uk>
3276
3277 * sysdeps/arm/pt-machine.h: New file; add ARM support.
3278 * sysdeps/arm/Implies: likewise.
3279 * README: Document it.
3280
3281 1997-12-13 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3282
3283 * signals.c: Remove unneeded initializer for sigwaited, saving a
3284 warning.
3285
3286 1997-04-11 01:18 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3287
3288 * semaphore.c (sem_init): Set sem_spinlock only if available.
3289
3290 1997-12-04 01:48 Ulrich Drepper <drepper@cygnus.com>
3291
3292 * mutex.c: Implement PTHREAD_MUTEX_CHECKERROR.
3293 * sysdeps/pthread/pthread.h: Define PTHREAD_MUTEX_CHECKERROR.
3294
3295 * Makefile: Update from LinuxThreads 0.7.
3296 * internals.h. Likewise.
3297 * manager.c: Likewise.
3298 * mutex.c: Likewise.
3299 * pthread.c: Likewise.
3300 * signals.c: Likewise.
3301 * specific.c: Likewise.
3302 * Examples/ex3.c: Likewise.
3303
3304 1997-11-20 18:13 Ulrich Drepper <drepper@cygnus.com>
3305
3306 * pthread.c (__pthread_reset_main_thread): Close pipe only if still
3307 open.
3308
3309 1997-10-29 05:38 Ulrich Drepper <drepper@cygnus.com>
3310
3311 * wrapsyscall.c: Add socket functions which are also cancelation
3312 points.
3313
3314 1997-10-19 21:40 Wolfram Gloger <wg@wolfram.dent.med.uni-muenchen.de>
3315
3316 * specific.c (__libc_internal_tsd_set, __libc_internal_tsd_get):
3317 New functions for fast thread specific data within libc.
3318
3319 * internals.h: Add new array p_libc_specific to struct
3320 _pthread_descr_struct.
3321
3322 * sysdeps/pthread/bits/libc-lock.h: Declare new functions.
3323
3324 1997-10-13 05:39 Ulrich Drepper <drepper@cygnus.com>
3325
3326 * semaphore.h: Add __BEGIN_DECLS/__END_DECLS.
3327 Reported by Ralf Corsepius <corsepiu@faw.uni-ulm.de>.
3328
3329 1997-08-29 03:05 Ulrich Drepper <drepper@cygnus.com>
3330
3331 * internals.h (struct _pthread_descr_struct): Add definitions for
3332 two-level specific key handling.
3333 * manager.c (pthread_handle_create): Initialize specific memory array.
3334 * specific.c: Implement two-level key handling.
3335 * weaks.c: Don't provide dummy key handling.
3336 * sysdeps/pthread/bits/libc-lock.h: Typedef __libc_lock_t (no #define).
3337 Add definition of __libc_key_t.
3338 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define PTHREAD_KEYS_MAX
3339 as 1024.
3340 Add definition of _POSIX_THREAD_DESTRUCTOR_ITERATIONS and
3341 PTHREAD_DESTRUCTOR_ITERATIONS.
3342
3343 * manager.c (pthread_handle_create): Compare mmap result with
3344 MAP_FAILED.
3345
3346 * ptfork.c: Rename to __pthread_atfork and make old name a weak alias.
3347 * sysdeps/pthread/bits/pthread.h: Add prototype for __pthread_atfork.
3348
3349 1997-08-22 19:04 Richard Henderson <rth@cygnus.com>
3350
3351 sysdeps/sparc -> sysdeps/sparc/sparc32
3352 sysdeps/sparc64 -> sysdeps/sparc/sparc64
3353
3354 * internals.h: Change definition of THREAD_SELF to be an expression,
3355 not a statement that did a return.
3356 * sysdeps/alpha/pt-machine.h (THREAD_SELF): Update accordingly.
3357 * sysdeps/sparc/sparc32/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF):
3358 Follow Solaris and use a "system reserved" register (%g6) to hold
3359 the thread descriptor.
3360 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
3361
3362 1997-08-03 00:09 Ulrich Drepper <drepper@cygnus.com>
3363
3364 * mutex.c: Correct pthread_once. Patch by Xavier Leroy.
3365 * sysdeps/pthread/pthread.h: Add prototype for __pthread_once.
3366 * sysdeps/pthread/bits/pthread.h: Add macros for __libc_once.
3367
3368 * semaphore.c: Include spinlock.h only when needed.
3369
3370 * specific.c (__pthread_setsepcific, __pthread_getspecific): Reject
3371 keys for entries not in use.
3372
3373 * weaks.c: Implement key handling functions for real.
3374
3375 1997-06-29 01:04 Richard Henderson <richard@gnu.ai.mit.edu>
3376
3377 Initial sparc64-linux support:
3378 * sysdeps/sparc64/Implies: New file.
3379 * sysdeps/sparc64/pt-machine.h: Likewise.
3380
3381 1997-06-29 00:48 Ulrich Drepper <drepper@cygnus.com>
3382
3383 * semaphore.c: Include spinlock.h at correct place.
3384 Patch by HJ Lu.
3385
3386 1997-06-13 10:06 Richard Henderson <rth@tamu.edu>
3387
3388 The Great Bit File Move:
3389 * sysdeps/alpha/semaphorebits.h: -> .../bits/semaphore.h.
3390 * sysdeps/powerpc/semaphorebits.h: Likewise.
3391 * sysdeps/pthread/cmpxchg/semaphorebits.h: Likewise.
3392 * sysdeps/pthread/no-cmpxchg/semaphorebits.h: Likewise.
3393 * sysdeps/pthread/libc-lock.h: -> bits/
3394 * sysdeps/pthread/stdio-lock.h: Likewise.
3395 * sysdeps/unix/sysv/linux/local_lim.h: Likewise.
3396 * sysdeps/unix/sysv/linux/posix_opt.h: Likewise.
3397 * semaphore.h: Likewise.
3398 * sysdeps/pthread/pthread.h: Likewise.
3399
3400 * lockfile.c: <foo.h> -> <bits/foo.h>.
3401 * semaphore.h: Likewise.
3402
3403 * Makefile: (headers): foo.h -> bits/foo.h.
3404 * sysdeps/pthread/Makefile: Likewise.
3405
3406 1997-04-11 01:18 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3407
3408 * semaphore.c (sem_init): Set sem_spinlock only if available.
3409
3410 * sysdeps/m68k/pt-machine.h (testandset, __compare_and_swap): Fix
3411 asm constraints.
3412
3413 1997-04-09 03:00 Ulrich Drepper <drepper@cygnus.com>
3414
3415 Update from LinuxThreads 0.6.
3416
3417 * attr.c (pthread_attr_getdetachstate): Use __sched_get_priority_max
3418 and __sched_get_priority_min instead of names without `__'.
3419
3420 * manager.c: Rewrite large parts to implement opaque pthread_t.
3421
3422 * cancel.c: Adapt for opaque pthread_t type.
3423 * condvar.c: Likewise.
3424 * errno.c: Likewise.
3425 * join.c: Likewise.
3426 * mutex.c: Likewise.
3427 * pthread.c: Likewise.
3428 * signals.c: Likewise.
3429 * specific.c: Likewise.
3430 * restart.h: Likewise.
3431 * queue.h: Likewise.
3432 * Examples/ex3.c: Likewise.
3433 * Examples/ex4.c: Likewise.
3434 * sysdeps/pthread/pthread.h: Likewise.
3435
3436 * pthread.c: Accumulate time for all threads in thread manager.
3437
3438 * semaphore.c: Implement fallback implementation for architectures
3439 sometimes missing compare-exchange operations.
3440
3441 * cancel.c (pthread_cancel): Validate handle argument.
3442 * join.c (pthread_join): Likewise.
3443 (pthread_detach): Likewise.
3444 * signals.c (pthread_kill): Likewise.
3445
3446 * spinlock.h (acquire): Use __sched_yield not sched_yield.
3447
3448 * queue.h (enqueue): Enqueue thread according to priority.
3449
3450 * internals.c (struct pthread_start_args): New struct for passing
3451 args to cloning function.
3452 (struct _pthread): Rename to _pthread_descr_struct and adapt for
3453 opaque pthread_t.
3454
3455 * Examples/Makefile (clean): Pass -f option to rm.
3456
3457 * sysdeps/i386/pt-machine.h: Add check for compare-exchange instruction
3458 and define TEST_FOR_COMPARE_AND_SWAP.
3459 * sysdeps/i386/i486/pt-machine.h: Removed.
3460
3461 * sysdeps/unix/sysv/linux/local_lim.h (PTHREAD_THREADS_MAX): Increase
3462 to 1024.
3463
3464 1997-04-04 16:38 Ulrich Drepper <drepper@cygnus.com>
3465
3466 * restart.h (suspend): Clear p_signal before suspending.
3467 (suspend_with_cancellation): Likewise.
3468 Patch by Xavier Leroy <Xavier.Leroy@inria.fr>.
3469
3470 * weaks.c: Make __pthread_key_create return 1.
3471 * sysdeps/pthread/libc-lock.h: Define __libc_key_create,
3472 __libc_getspecific, __libc_setspecific, and __libc_key_t.
3473 * sysdeps/pthread/stdio-lock.h: Don't care for implementation not
3474 using libio.
3475
3476 1997-03-19 15:13 Miguel de Icaza <miguel@nuclecu.unam.mx>
3477
3478 * sysdeps/sparc/pt-machine (RELEASE): Fix.
3479
3480 1997-03-01 07:55 Geoff Keating <geoffk@ozemail.com.au>
3481
3482 * sysdeps/powerpc/Implies: Added.
3483 * sysdeps/powerpc/pt-machine.h: Added.
3484 * sysdeps/powerpc/semaphorebits.h: Added.
3485
3486 1997-01-22 01:22 Ulrich Drepper <drepper@cygnus.com>
3487
3488 * pthread.c (__pthread_initial_thread): Correct
3489 initializer.
3490 (__pthread_manager_thread): Likewise.
3491 Reported by Andreas Jaeger.
3492
3493 1997-01-18 22:15 Richard Henderson <rth@tamu.edu>
3494
3495 Since sigset_t no longer fits in a register, we can't pass in the
3496 thread's initial mask so easily. Take this opportunity to simplify
3497 the clone implementation by only accepting a single void* argument.
3498
3499 * manager.c (__pthread_manager): Put thread vitals in the thread
3500 struct instead of as arguments through clone.
3501 (pthread_start_thread): Look for them there.
3502 * internals.h (struct _pthread): Add p_initial_fn,
3503 p_initial_fn_arg, p_initial_mask. Fix __pthread_manager proto.
3504 * pthread.c (pthread_initialize_manager): Revise clone invocation.