]> sourceware.org Git - glibc.git/blame - linuxthreads/ChangeLog
Update.
[glibc.git] / linuxthreads / ChangeLog
CommitLineData
136d4332
UD
12001-03-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
2
3 * shlib-versions: Add rule for Linux on 64 bit S/390.
4 * sysdeps/s390/s390-64/pt-machine.h: New file.
5 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
6
72001-03-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
8
9 * sysdeps/s390/pt-machine.h: Move to...
10 * sysdeps/s390/s390-32/pt-machine.h: ...here.
11 Add defines for FLOATING_STACK and ARCH_STACK_MAX_SIZE.
12
3bf927cb
UD
132001-03-15 Ulrich Drepper <drepper@redhat.com>
14
15 * Versions [libpthread] (GLIBC_2.2.3): Add pthread_getattr_np.
16 * attr.c: Implement pthread_getattr_np.
17 * sysdeps/pthread/pthread.h: Add prototype for pthread_getattr_np.
18 * internals.h (struct _pthread_descr_struct): Add p_inheritsched.
19 * manager.c (pthread_handle_create): Initialize p_inheritsched.
20
832c025e
AJ
212001-03-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
22
3bf927cb 23 * sysdeps/unix/sysv/linux/s390/pt-initfini.c: Use 0x07 padding for
832c025e
AJ
24 code alignment.
25
08b3d7ad
UD
262001-02-20 Hans Boehm <hans_boehm@hp.com>
27
28 * manager.c (manager_mask): Removed static vesion. Now always local
29 to __pthread_manager().
30 (manager_mask_all): Removed completely.
31 (__pthread_manager): Remove manager_mask_all initialization.
32 (pthread_handle_create): Remove code to set and reset signal mask
33 around __clone2() calls.
34
4c48dc93
UD
352001-02-17 Jakub Jelinek <jakub@redhat.com>
36
37 * spinlock.c (__pthread_lock): Force lock->__status to be read from
38 memory on every spin.
39
596b2f0e
AJ
402001-02-10 Andreas Jaeger <aj@suse.de>
41
42 * Makefile (extra-objs): New.
43
257bdad0
UD
442001-02-09 Jakub Jelinek <jakub@redhat.com>
45
46 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Add
47 __pthread_initialize_minimal prototype.
48
441f7d1e
UD
492001-02-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
50
51 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
52
d7fce7e0
UD
532001-02-06 Martin Schwidefsky <schwidefsky@de.ibm.com>
54
55 * sysdeps/unix/sysv/linux/s390/pt-initfini.c: New file.
56
672fd41b
UD
572001-02-06 Ulrich Drepper <drepper@redhat.com>
58
59 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: First attempt to fix the
60 broken code. Patch by Jes Sorensen.
61
eb8ea10a
AJ
622001-02-06 Andreas Jaeger <aj@suse.de>
63
64 * sysdeps/pthread/pthread.h: Move __pthread_initialize from here
65 to...
66 * internals.h: ...here.
67
5a35dfca
UD
682001-02-05 Jes Sorensen <jes@linuxcare.com>
69
70 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
71
e4c785c8
UD
722001-02-02 Ulrich Drepper <drepper@redhat.com>
73
74 * Versions: Remove __pthread_initialize_minimal.
75
b71e7ce8
UD
762001-02-01 Ulrich Drepper <drepper@redhat.com>
77
78 * Makefile: Add rules to build crti.o and make it being used in
79 building libpthread.so.
80 * sysdeps/i386/Makefile: New file.
81 * sysdeps/pthread/pt-initfini.c: New file.
82
83 * pthread.c: Cleanups.
84
7dcc4ea0
AJ
852001-01-28 Andreas Jaeger <aj@suse.de>
86
87 * oldsemaphore.c (__old_sem_init): Adjust for last change.
88 * sysdeps/pthread/bits/libc-lock.h: Likewise.
89 * spinlock.c: Likewise.
90
48ba4bd2
UD
912001-01-28 Ulrich Drepper <drepper@redhat.com>
92
93 * sysdeps/pthread/bits/initspin.h: Make all names namespace clean.
94 * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: Likewise.
95 * manager.c: Adjust for namespace cleanup in bits/initspin.h.
96 * pthread.c: Likewise.
97 * spinlock.h: Likewise.
98 * sysdeps/pthread/pthread.h: Likewise.
99
edf9cc89
UD
1002001-01-26 Ulrich Drepper <drepper@redhat.com>
101
61f9d0a3
UD
102 * sysdeps/pthread/bits/pthreadtypes.h: Define pthread_attr_t also
103 as struct __pthread_attr_s.
104
edf9cc89
UD
105 * semaphore.h (sem_t): Cleanup namespace, rename status and
106 spinlock elements.
107
3f738366
UD
1082001-01-13 Jakub Jelinek <jakub@redhat.com>
109
110 * pthread.c (pthread_onexit_process): Clear
111 __pthread_manager_thread_bos after freeing it.
112 * Makefile (tests): Add ex16.
113 * Examples/ex16.c: New file.
114
5ef50d00
UD
1152001-01-11 Jakub Jelinek <jakub@redhat.com>
116
117 * Makefile (CFLAGS-pthread.c): Pass -DHAVE_Z_NODELETE if ld supports
118 -z nodelete.
119 * pthread.c (pthread_exit_process): Rename to...
120 (pthread_onexit_process): ...this.
121 (pthread_atexit_process, pthread_atexit_retcode): New.
122 (pthread_initialize): Call __cxa_atexit instead of __cxa_on_exit
123 and only if HAVE_Z_NODELETE is not defined.
124 (__pthread_initialize_manager): Register pthread_atexit_retcode
125 with __cxa_atexit.
126
7e36861e
UD
1272001-01-11 Ulrich Drepper <drepper@redhat.com>
128
129 * pthread.c (pthread_initialize): Use __cxs_on_exit not __cxa_atexit.
130
1312001-01-11 Jakub Jelinek <jakub@redhat.com>
132
133 * Makefile (tests): Add ex15.
134 * Examples/ex15.c: New test.
135
1950ebc6
UD
1362001-01-08 Ulrich Drepper <drepper@redhat.com>
137
138 * pthread.c (pthread_exit_process): Free memory allocated for
139 manager stack.
140
af8240eb 1412000-12-31 Ulrich Drepper <drepper@redhat.com>
1c566118 142
af8240eb
UD
143 * manager.c (pthread_alloca_stack): Remove MAP_FIXED from mmap calls.
144 (pthread_free): Always unmap the stack. It's safe now that we don't
145 use MAP_FIXED to allocate stacks.
1c566118 146
41b64fc4
UD
1472000-12-31 Ulrich Drepper <drepper@redhat.com>
148
149 * sysdeps/powerpc/pspinlock.c: Don't include pt-machine.h here.
150
151 * manager.c (pthread_allocate_stack): Prepare for removal of MAP_FIXED.
152
09f5e163
UD
1532000-11-15 Wolfram Gloger <wg@malloc.de>
154
155 * manager.c (pthread_free): [!FLOATING_STACKS]: Only remap the
156 stack to PROT_NONE, don't unmap it, avoiding collisions with malloc.
157
27ee0a55
AJ
1582000-12-27 Andreas Jaeger <aj@suse.de>
159
160 * Examples/ex13.c: Make local functions static.
161 * ecmutex.c: Likewise.
784d802e 162 * joinrace.c: Likewise.
27ee0a55
AJ
163 * Examples/ex14.c: Likewise.
164
165 * Examples/ex2.c: Make local functions static; reformat.
166 * Examples/ex1.c: Likewise.
167 * Examples/ex4.c: Likewise.
168 * Examples/ex5.c: Likewise.
169 * Examples/ex7.c: Likewise.
170
171 * oldsemaphore.c: Add prototypes to shut up GCC.
172 * pt-machine.c: Likewise.
173
174 * weaks.c: Add prototype for pthread_exit.
175
176 * internals.h: Add some prototypes, format prototypes and add
177 missing externs.
178 Move __libc_waitpid prototype to include/sys/wait.h.
179
180 * rwlock.c: Include <bits/libc-lock.h> for prototypes.
181 * mutex.c: Likewise.
182 * specific.c: Likewise.
183 * ptfork.c: Likewise.
184
185 * lockfile.c: Include internals.h to get prototypes.
186 * events.c: Likewise.
187 * sysdeps/alpha/pspinlock.c: Likewise.
188 * sysdeps/arm/pspinlock.c: Likewise.
189 * sysdeps/hppa/pspinlock.c: Likewise.
190 * sysdeps/i386/pspinlock.c: Likewise.
191 * sysdeps/ia64/pspinlock.c: Likewise.
192 * sysdeps/m68k/pspinlock.c: Likewise.
193 * sysdeps/mips/pspinlock.c: Likewise.
194 * sysdeps/powerpc/pspinlock.c: Likewise.
195 * sysdeps/s390/pspinlock.c: Likewise.
196 * sysdeps/sh/pspinlock.c: Likewise.
197 * sysdeps/sparc/sparc32/pspinlock.c: Likewise.
198 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: Likewise.
199 * sysdeps/sparc/sparc64/pspinlock.c: Likewise.
200
33c80ad7
UD
2012000-12-27 Ulrich Drepper <drepper@redhat.com>
202
21112857
UD
203 * attr.c (__pthread_attr_setstack): Fix setting of __stackaddr element.
204 (__pthread_attr_getstack): Return correct address.
205 Add warnings for using pthread_attr_getstackaddr and
33c80ad7
UD
206 pthread_attr_setstackaddr.
207
a6d950b9
UD
2082000-12-26 Ulrich Drepper <drepper@redhat.com>
209
210 * Examples/ex6.c (test_thread): Make static.
211 * Examples/ex12.c (test_thread): Make static and add noreturn
212 attribute.
213
ba908190
UD
2142000-12-18 Jes Sorensen <jes@linuxcare.com>
215
216 * linuxthreads/sysdeps/ia64/pt-machine.h: __compare_and_swap
217 and compare_and_swap_with_release_semantics returns int not long.
218
8cb019ed
AJ
2192000-12-17 Andreas Jaeger <aj@suse.de>
220
221 * sysdeps/s390/pt-machine.h (testandset): Use long int as return
222 value.
223 * sysdeps/arm/pt-machine.h (testandset): Likewise.
224 * sysdeps/hppa/pt-machine.h (testandset): Likewise.
225 * sysdeps/m68k/pt-machine.h (testandset): Likewise.
226 * sysdeps/sh/pt-machine.h (testandset): Likewise.
227 * sysdeps/sparc/sparc32/pt-machine.h (testandset): Likewise.
228 * sysdeps/sparc/sparc64/pt-machine.h (testandset): Likewise.
229
927a8431
UD
2302000-12-17 Ulrich Drepper <drepper@redhat.com>
231
232 * sysdeps/i386/pt-machine.h (testandset): Adjust for prototype change.
233 * sysdeps/i386/i686/pt-machine.h (testandset): Likewise.
234
b6e20712
AJ
2352000-12-17 Andreas Jaeger <aj@suse.de>
236
237 * internals.h: Add prototypes for testandset and
238 __compare_and_swap to shut up gcc warnings.
239
e3690263
UD
2402000-12-06 Wolfram Gloger <wg@malloc.de>
241
242 * join.c (pthread_detach): Allow case where the thread has already
243 terminated.
244
2e3b9976
AJ
2452000-12-05 Andreas Jaeger <aj@suse.de>
246
247 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Don't set mips2.
248 * sysdeps/mips/pt-machine.h (testandset): Likewise.
249 (__compare_and_swap): Likewise.
f172bca0 250 Patches by Maciej W. Rozycki <macro@ds2.pg.gda.pl>.
2e3b9976 251
59553897
UD
2522000-11-20 Jakub Jelinek <jakub@redhat.com>
253
254 * Examples/ex3.c (main): Cast int to long before casting to void *.
255 (search): Cast void * to long, not int.
256 * Examples/ex8.c (main, thread): Similarly.
257 * Examples/ex11.c (main): Similarly.
258 * Examples/ex14.c (worker, do_test): Similarly.
259 * ecmutex.c (worker, do_test): Similarly.
260 (nlocks): Cast to int.
261
d3d99893
UD
2622000-11-08 Bruce Mitchener <bruce@cubik.org>
263
264 * linuxthreads.texi: Add documentation for pthreads attributes
265 guardsize, stackaddr, stacksize, and stack. Fix typo in previous
266 patch. Document pthread_[sg]etconcurrency(). Mark
267 pthread_mutexattr_[sg]ettype() as POSIX rather than GNU.
268
a1e88b9a
UD
2692000-11-07 Ulrich Drepper <drepper@redhat.com>
270
271 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
272 Don't define it.
273 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
274 Reported by Christopher Yeoh <cyeoh@linuxcare.com.au>.
275
632b6761
UD
2762000-11-06 Ulrich Drepper <drepper@redhat.com>
277
278 * cancel.c (pthread_cancel): Always set p_canceled, even if we are
279 not doing it right now.
280 Reported by Kaz Kylheku <kaz@ashi.footprints.net>.
281
02fb3d17
UD
2822000-10-30 Ulrich Drepper <drepper@redhat.com>
283
284 * Examples/ex4.c (main): Don't use exit() to avoid warning with
285 broken compilers.
286
c6042c73
UD
2872000-10-29 Ulrich Drepper <drepper@redhat.com>
288
31879cd8 289 * attr.c (__pthread_attr_setguardsize): Don't round guardsize
d3d99893 290 here. Reported by Bruce Mitchener <bruce@cubik.org>.
31879cd8 291
c6042c73
UD
292 * linuxthreads.texi: Changes terminology to 'type' from 'kind' when
293 discussing mutexes. (As per the Unix98 name for the API.)
294 Changes documentation for pthread_mutexattr_setkind_np() and
295 pthread_mutexattr_getkind_np() over to the Unix98 APIs for the
296 same: pthread_mutexattr_settype() and pthread_mutexattr_gettype().
297 Changes references to PTHREAD_MUTEXATTR_FAST_NP to
298 PTHREAD_MUTEXATTR_ADAPTIVE_NP.
299 Begins to introduce discussion of the ``timed'' mutex type. This
300 discussion is currently incomplete.
d3d99893 301 Patch by Bruce Mitchener <bruce@cubik.org>.
c6042c73 302
1267f93e
UD
3032000-10-26 Kazumoto Kojima <kkojima@rr.iij4u.or.jp>
304 Yutaka Niibe <gniibe@chroot.org>
305
306 * sysdeps/sh/pt-machine.h (testandset): Since the operand of TAS.B
307 has restrictions, use register.
308
fd665070
UD
3092000-10-23 Andreas Schwab <schwab@suse.de>
310
311 * Examples/ex14.c (TIMEOUT): Override default timeout.
312
6a14016e
UD
3132000-10-16 Ulrich Drepper <drepper@redhat.com>
314
315 * specific.c: Protect tsd array modification in thread data
316 structures by getting the thread lock in pthread_key_delete and
317 __pthread_destroy_specifics.
318 Patch by Wolfram Gloger <Wolfram.Gloger@dent.med.uni-muenchen.de>.
319
b15cb495
UD
3202000-10-12 Alan Modra <alan@linuxcare.com.au>
321
322 * sysdeps/pthread/bits/initspin.h: New file.
323 * spinlock.h: Move LOCK_INITIALIZER definition to <bits/initspin.h>.
324 (__pthread_init_lock): Initialize lock with LT_SPINLOCK_INIT.
325 (__pthread_alt_init_lock): Likewise.
326 (__pthread_alt_trylock): Release lock with LT_SPINLOCK_INIT.
327
3282000-10-12 David Huggins-Daines <dhd@linuxcare.com>
329
330 * oldsemaphore.c (__old_sem_init): Release lock with
331 LT_SPINLOCK_INIT, not zero.
332 * spinlock.c (__pthread_unlock): Likewise.
333 (__pthread_alt_lock): Likewise.
334 (__pthread_alt_timedlock): Likewise.
335 (__pthread_alt_unlock): Likewise.
336 * sysdeps/pthread/bits/libc-lock.h: Initialize locks with
337 LT_SPINLOCK_INIT if it is non-zero. Likewise for init-once flags.
338 * sysdeps/pthread/pthread.h: Include bits/initspin.h. Use
339 LT_SPINLOCK_INIT do initialize spinlocks not 0.
340
3412000-10-12 David Huggins-Daines <dhd@linuxcare.com>
342
343 * shlib-versions: Add version definitions for hppa-linux.
344
3452000-10-12 Alan Modra <alan@linuxcare.com.au>
346
347 * sysdeps/hppa/pspinlock.c: New file.
348 * sysdeps/hppa/pt-machine.h: New file.
349 * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: New file.
350
172b90bb
UD
3512000-10-05 Jakub Jelinek <jakub@redhat.com>
352
353 * mutex.c (__pthread_mutex_destroy): Correct test of
354 busy mutex for mutexes using alternate fastlocks.
355 Patch by dtc@cmucl.cons.org.
356
a0386a0d
UD
3572000-09-28 Martin Schwidefsksy <schwidefsky@de.ibm.com>
358
359 * sysdeps/s390/pt-machine.h: Make %a0 the thread register.
360
8cab1d38
UD
3612000-09-28 Ulrich Drepper <drepper@redhat.com>
362
c0ac34e4
UD
363 * mutex.c (__pthread_mutex_unlock): For PTHREAD_MUTEX_RECURSIVE_NP
364 test for owner first.
365 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
366
8cab1d38
UD
367 * cancel.c (pthread_cancel): Don't do anything if cancelation is
368 disabled.
369
7c3dac53
UD
3702000-09-26 Ulrich Drepper <drepper@redhat.com>
371
75dbc100
UD
372 * spinlock.h (__pthread_set_own_extricate_if): Optimize a bit.
373 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
374
b0557314
UD
375 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
376 _POSIX_MONOTONIC_CLOCK.
377
7c3dac53
UD
378 * spinlock.h (__pthread_set_own_extricate_if): Add back locking
379 and explain why.
380
b025588a
AJ
3812000-09-20 Andreas Jaeger <aj@suse.de>
382
383 * pthread.c [!__ASSUME_REALTIME_SIGNALS]: Make inclusion of
384 "testrtsig.h" conditional.
385
b81c8961
UD
3862000-09-11 Ulrich Drepper <drepper@redhat.com>
387
388 * sysdeps/pthread/pthread.h: Declare pthread_attr_getstack and
389 pthread_attr_setstack.
390 * Versions [libpthread] (GLIBC_2.2): Export pthread_attr_getstack and
391 pthread_attr_setstack.
392 * attr.c (pthread_attr_getstack, pthread_attr_setstack): New functions.
393
42437ed1
UD
3942000-09-05 Ulrich Drepper <drepper@redhat.com>
395
f3d581b8
UD
396 * Examples/ex14.c: New file.
397 * Makefile (tests): Add ex14.
398
42437ed1
UD
399 * mutex.c (__pthread_mutex_unlock): Correct test for already unlocked
400 mutex. Patch by dtc@cmucl.cons.org.
401
402 * ecmutex.c: New file.
f3d581b8 403 * Makefile (tests): Add ecmutex.
42437ed1 404
c743652a
UD
4052000-09-04 H.J. Lu <hjl@gnu.org>
406
407 * attr.c (__pthread_attr_setguardsize): Use page_roundup
408 instead of roundup to round up to the page size.
409
2e4581e4
UD
4102000-09-03 Mark Kettenis <kettenis@gnu.org>
411
412 * manager.c (pthread_exited): Correctly report event as TD_REAP
413 instead of TD_DEATH. Fix comments.
414
5afe6c02
UD
4152000-09-03 Ulrich Drepper <drepper@redhat.com>
416
417 * spinlock.h (testandset): Add cast to avoid warning.
418 Patch by Franz Sirl <Franz.Sirl-kernel@lauterbach.com>.
419
5376629d
AJ
4202000-09-02 Andreas Jaeger <aj@suse.de>
421
422 * sysdeps/pthread/timer_routines.c: Include stdlib.h for abort
423 prototype.
424
a8e58aa9
UD
4252000-09-01 Ulrich Drepper <drepper@redhat.com>
426
aebb1faa
UD
427 * sysdeps/pthread/bits/stdio-lock.h (_IO_cleanup_region_start):
428 Fix typo in last patch (_mode -> _flags).
429
a8e58aa9
UD
430 * sysdeps/pthread/bits/stdio-lock.h (_IO_cleanup_region_start):
431 Provide definition which respects _IO_USER_LOCK flag.
432
47cae281
UD
4332000-08-30 Ulrich Drepper <drepper@redhat.com>
434
435 * manager.c (pthread_allocate_stack): Clear descriptor only if not
436 mmaped.
437
b7fb789d
UD
4382000-08-25 Ulrich Drepper <drepper@redhat.com>
439
ad7534c8
UD
440 * Makefile: Add rules to build and run unload.
441 * unload.c: New file.
442
443 * pthread.c (pthread_exit_process): Move thread_self use inside `if'.
7045878b 444
b7fb789d
UD
445 * sysdeps/pthread/pthread.h
446 (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Defined.
447 (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: Defined.
448
7e98470d
AJ
4492000-08-24 Andreas Jaeger <aj@suse.de>
450
c5ded983
AJ
451 * Examples/ex13.c: Include <string.h> for strerror prototype and
452 <stdlib.h> for abort prototype.
7e98470d
AJ
453 (pthr_cond_signal_mutex): Rewrite to silence GCC.
454 (thread_start): Remove unused variable err.
455 (main): Silence GCC warnings.
456
64f6b8f3
AJ
4572000-08-22 Andreas Jaeger <aj@suse.de>
458
459 * Examples/ex13.c: New test by Kurt Garloff <garloff@suse.de>.
460
461 * Makefile (tests): Add ex13.
462
98cbe360
UD
4632000-08-20 Ulrich Drepper <drepper@redhat.com>
464
465 * semaphore.h: Add restrict where required by AGd4.
466 * sysdeps/pthread/pthread.h: Likewise.
467 * sysdeps/pthread/unix/sysv/linux/bits/sigthread.h: Likewise.
468
9df76933
UD
4692000-08-15 Ulrich Drepper <drepper@redhat.com>
470
471 * Makefile (tests): Add ex12. Add rule to build it.
472 * Examples/ex12.c: New file.
473
91bc38d0
UD
4742000-08-13 Ulrich Drepper <drepper@redhat.com>
475
476 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_SEMAPHORES
477 even though the implementation is not quite complete (but it reports
478 it). Define _POSIX_MESSAGE_PASSING to -1.
479 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
480
facd11c2
AJ
4812000-08-12 Andreas Jaeger <aj@suse.de>
482
483 * sysdeps/mips/pt-machine.h (testandset): Add .set mips2 for
484 assembler.
485 (__compare_and_swap): Likewise.
486 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Likewise.
487
3459f702
UD
4882000-08-10 Ulrich Drepper <drepper@redhat.com>
489
490 * pthread.c (__pthread_initial_thread): Initialize p_errnop and
491 p_h_errnop correctly and not to NULL.
492
c9326ed5
UD
4932000-08-05 Ulrich Drepper <drepper@redhat.com>
494
495 * Banner: Bump version number to 0.9.
496
0a8d9231
UD
4972000-08-04 Ulrich Drepper <drepper@redhat.com>
498
fcd31f5a
UD
499 * Makefile (tests): Add tststack. Add rule to build the program.
500 * tststack.c: New file.
501
234dd7a6
UD
502 * internals.h: Declare __pthread_max_stacksize.
503 * pthread.c (__pthread_max_stacksize): New variable.
504 (__pthread_initialize_manager): Determine __pthread_initialize_manager
505 value.
506 * manager.c (thread_segment): Return always NULL if FLOATING_STACKS.
507 (pthread_allocate_stack): Allow kernel to choose stack address if
508 FLOATING_STACKS. This also handles variable-sized stacks.
c9326ed5 509 Always allocate stack and guardpage together. Use mprotect to
234dd7a6
UD
510 change guardpage access.
511 * sysdeps/i386/useldt.h: Define FLOATING_STACKS and
512 ARCH_STACK_MAX_SIZE.
513
514 * attr.c (__pthread_attr_setstacksize): Also test value against
515 upper limit.
516
0a8d9231
UD
517 * manager.c (__pthread_nonstandard_stacks): Define only if
518 THREAD_SELF is not defined.
519 (pthread_allocate_stack): Always initialize gardaddr to a correct
520 value.
521 (pthread_handle_create): Unmap thread with one call.
522 (pthread_free): Remove test for initial thread before removing stack.
523 Unmap stack with one call.
524
525 * pthread.c (__pthread_initial_thread): Initialize p_userstack to
526 1 to avoid removing the stack.
527
0d019734
UD
5282000-07-27 Jes Sorensen <jes@linuxcare.com>
529
d364e525 530 * sysdeps/ia64/pspinlock.c (__pthread_spin_lock): Add
0d019734
UD
531 load of spin lock to prime the cache before the atomic compare and
532 exchange operation (cmpxchg4). This avoids the spinning on the
533 cmpxchg4 instruction and reduces movement of the cache line back
534 and forth between the processors (explanation by Asis K. Mallick
535 from Intel). This basically makes the implementation operate the
536 same as the Linux kernel implementation.
537
d364e525
UD
538 * shlib-versions: Use GLIBC_2_2 for Linux/ia64.
539 * sysdeps/ia64/pspinlock.c: New file.
0d019734 540
139a4d95
UD
5412000-08-03 Ulrich Drepper <drepper@redhat.com>
542
543 * pthread.c: Move definition of __pthread_set_own_extricate_if...
544 * spinlock.h: ...here. Remove locking.
545 * internals.h: Remove __pthread_set_own_extricate_if prototype.
546
547 * rwlock.c: Use THREAD_GETMEM And THREAD_SETMEM.
548 (rwlock_rd_extricate_func): Don't determine self, let
549 __pthread_lock do it.
550 (rwlock_wr_extricate_func): Likewise.
551 (rwlock_have_already): Optimize *pself handling a bit.
552
553 * mutex.c: Use __builtin_expect.
554 * pthread.c: Likewise.
555
9016e55c
AJ
5562000-08-02 Andreas Jaeger <aj@suse.de>
557
d364e525
UD
558 * sysdeps/s390/pspinlock.c: New file.
559 * sysdeps/s390/pt-machine.h: New file.
9016e55c
AJ
560 Patches by Martin Schwidefsky <schwidefsky@de.ibm.com>.
561
fdfb2ecc
AJ
5622000-07-12 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
563
564 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Implement for
565 R3K.
566 * sysdeps/mips/pt-machine.h (testandset): Likewise.
567
b98a450f
AJ
5682000-07-26 Andreas Jaeger <aj@suse.de>
569
570 * pthread.c: Initialize p_sem_avail.
571
a956d045
UD
5722000-07-25 Ulrich Drepper <drepper@redhat.com>
573
a99db924 574 * internals.h (struct __pthread_descr_struct): Add p_sem_avail.
9ec9e34e
UD
575 * semaphore.c: Handle spurious wakeups.
576
577 * sysdeps/pthread/pthread.h: Add back PTHREAD_MUTX_FAST_NP as an alias
578 for PTHREAD_MUTEX_ADAPTIVE_NP for source code compatibility.
579
580 * pthread.c (__pthread_set_own_extricate): Use THREAD_GETMEM.
581 (__pthread_wait_for_restart): Likewise.
582
583 * condvar.c (pthread_cond_wait): Also check whether thread is
584 cancelable before aborting loop.
585 (pthread_cond_timedwait): Likewise.
586
a956d045
UD
587 * signals.c (pthread_sighandler): Remove special code to restrore
588 %gs on x86.
589 (pthread_sighandler_t): Likewise.
590
70e392a3
UD
5912000-07-25 Mark Kettenis <kettenis@gnu.org>
592
593 * internals.h (__RES_PTHREAD_INTERNAL): Remove define.
594 * pthread.c: Include <resolv.h>.
595 (_res): Undefine. Add extern declaration.
596
5122880a
UD
5972000-07-24 Ulrich Drepper <drepper@redhat.com>
598
f3d5834e
UD
599 * pthread.c (__pthread_initial_thread): Update initializer.
600 (__pthread_manager_thread): Likewise.
601 (pthread_initialize): Move setrlimit call to...
602 (__pthread_initialize_manager): ...here.
603 (__pthread_reset_main_thread): Reset also soft limit on stack size.
604
5122880a 605 * condvar.c: Handle spurious wakeups. [PR libc/1749].
ad0c66a0 606 * internals.h (struct _pthread_descr_struct): Add p_condvar_avail.
5122880a 607
0c0c8bde
UD
6082000-07-21 Ulrich Drepper <drepper@redhat.com>
609
5122880a 610 * spinlock.h: If IMPLEMENT_TAS_WITH_CAS is defined use
0c0c8bde 611 __compare_and_swap to define testandset.
d364e525 612 * sysdeps/powerpc/pt-machine.h: Add volatile to asms.
0c0c8bde
UD
613 Define IMPLEMENT_TAS_WITH_CAS.
614
0fb7851f
UD
6152000-07-20 Ulrich Drepper <drepper@redhat.com>
616
617 * Makefile: Pass -z nodelete to linker for libpthread.so
618 generation if it understand this option.
619
4e8286ac
UD
6202000-07-18 Mark Kettenis <kettenis@gnu.org>
621
622 * manager.c (pthread_handle_create): Remove initialization of
623 new_thread->p_res._sock.
624
80ec4993
UD
6252000-07-19 Kaz Kylheku <kaz@ashi.footprints.net>
626
627 Bugfixes to the variant of the code for machines with no compare
628 and swap.
629
630 * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Wait
631 node was not being properly enqueued, due to failing to update
632 the lock->__status field.
633
634 * spinlock.c (__pthread_alt_timedlock): The oldstatus variable was
635 being set inappropriately, causing the suspend function to be called
636 with a null self pointer and crash.
637
70c5b33d
UD
6382000-07-18 Ulrich Drepper <drepper@redhat.com>
639
056f707c
UD
640 * spinlock.h (__pthread_alt_trylock): Fix code used if no
641 compare&swap is available.
642
a48297fd
UD
643 * spinlock.h (__pthread_trylock): Use __compare_and_swap, not
644 compare_and_swap.
645
89bc5366 646 * pthread.c (pthread_initialize): Don't use sysconf to determine
247c8869
UD
647 whether the machine has more than one processor.
648
70c5b33d
UD
649 * spinlock.c (__pthread_alt_timedlock): Add back one of the
650 removed thread_self calls.
651
83142e8f
UD
6522000-07-18 Kaz Kylheku <kaz@ashi.footprints.net>
653
654 * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Changed
655 __compare_and_swap to compare_and_swap in code which assumes
656 compare swap is available.
657
89bc5366 6582000-07-18 Kaz Kylheku <kaz@ashi.footprints.net>
e6574c9c
UD
659
660 * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Fixed
661 bug whereby thr field of waitnode structure would not be correctly
662 set unless a null self pointer is passed to the functions.
663 Eliminated redundant calls to thread_self().
664
c6df09ad
UD
6652000-07-18 Jakub Jelinek <jakub@redhat.com>
666
667 * pthread.c (__pthread_initialize_manager): Lock
668 __pthread_manager_thread.p_lock before calling clone.
669
9aae19cd
UD
6702000-05-05 H.J. Lu <hjl@gnu.org>
671
672 * sysdeps/ia64/pt-machine.h (__compare_and_swap): Change it to
673 have acquire semantics.
674 (__compare_and_swap_with_release_semantics): New inline
675 function.
676 (HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS): New macro.
677
6782000-01-28 Hans Boehm <hboehm@exch.hpl.hp.com>
679
680 * manager.c: Fix the problem with signals at startup.
681 Change the way that thread stacks are allocated on IA64.
682 Clean up some of the guard page allocation stuff.
683
6841999-12-19 H.J. Lu <hjl@gnu.org>
685
686 * internals.h (page_roundup): New.
687 * attr.c (__pthread_attr_setguardsize); Use page_roundup
688 instead of roundup.
689 * manager.c (pthread_allocate_stack): Make sure guardaddr is
690 page aligned with page_roundup if NEED_SEPARATE_REGISTER_STACK
691 is define.
692
6931999-12-17 Hans Boehm <hboehm@exch.hpl.hp.com>
694
695 * manager.c (pthread_allocate_stack): Unmap the stack top
696 if failed to map the stack bottom.
697 Fix the guard page.
698 (pthread_free): Fix the guard page.
699
700 * pthread.c (pthread_initialize): Set rlimit correctly for
701 NEED_SEPARATE_REGISTER_STACK.
702
7031999-12-16 H.J. Lu <hjl@gnu.org>
704
705 * pthread.c (__pthread_initialize_manager): Pass
706 __pthread_manager_thread_bos instead of
707 __pthread_manager_thread_tos to __clone2.
708
7091999-12-16 H.J. Lu <hjl@gnu.org>
710
711 * manager.c (pthread_allocate_stack): Correct the calculation
712 of "new_thread_bottom". Remove MAP_GROWSDOWN from mmap for
713 stack bottom.
714
7151999-12-13 H.J. Lu <hjl@gnu.org>
716
717 * sysdeps/ia64/pt-machine.h (__compare_and_swap): Added a stop
718 bit after setting ar.ccv.
719
7201999-12-12 H.J. Lu <hjl@gnu.org>
721
722 * manager.c (pthread_allocate_stack): Make the starting
723 address of the stack bottom page aligned. FIXME: it may
724 need changes in other places.
725 (pthread_handle_create): Likewise.
726
7271999-12-11 Hans Boehm <hboehm@exch.hpl.hp.com>
728
729 * manager.c (pthread_allocate_stack): Handle
730 NEED_SEPARATE_REGISTER_STACK.
731 (pthread_handle_create): Likewise.
732 * pthread.c (__pthread_initialize_manager): Likewise.
733
734 * sysdeps/ia64/pt-machine.h: Use r13 for thread pointer.
735
7361999-12-02 H.J. Lu <hjl@gnu.org>
737
738 * sysdeps/ia64/pt-machine.h: New.
739
f218b5f5
UD
7402000-07-13 Ulrich Drepper <drepper@redhat.com>
741
742 * wrapsyscall.c: Mark non-__ protected names as weak.
743 PR libc/1466.
744
0d655550
UD
7452000-07-12 Bruno Haible <haible@clisp.cons.org>
746
747 * Examples/ex8.c: Include <sys/wait.h>, not <wait.h>.
748
9f835f5f
UD
7492000-07-12 Ulrich Drepper <drepper@redhat.com>
750
751 * spinlock.c: Fix code for TEST_FOR_COMPARE_AND_SWAP being defined.
752 Add tests also to new alternative spinlock implementation.
753 * spinlock.h: Likewise.
754 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
755
a85d5c80
UD
7562000-07-06 Ulrich Drepper <drepper@redhat.com>
757
c0f53cdd
UD
758 * Version: Export __sigaction.
759 * signals.c: Define __sigaction alias. Use __libc_sigaction instead
760 of __sigaction.
761 * pthread.c: Use __libc_sigaction instead of __sigaction.
762
a85d5c80
UD
763 * condvar.c: Implement pthread_condattr_getpshared and
764 pthread_condattr_setpshared.
765 * mutex.c: Implement pthread_mutexattr_getpshared and
766 pthread_mutexattr_setpshared.
767 * Versions: Export new functions.
768 * sysdeps/pthread/pthread.h: Add prototypes for new functions.
769
770 * rwlock.c (pthread_rwlockattr_init): Use PTHREAD_PROCESS_PRIVATE.
771 (pthread_rwlockattr_setpshared): Fail if PTHREAD_PROCESS_PRIVATE
772 is not selected.
773
66c5b9aa
GM
7742000-07-04 Greg McGary <greg@mcgary.org>
775
776 * sysdeps/pthread/bits/libc-lock.h: Remove BP_SYM from
777 pragmas. Include bp-sym.h only if _LIBC.
778
83b1b6d8
UD
7792000-07-04 Ulrich Drepper <drepper@redhat.com>
780
781 * spinlock.c (__pthread_unlock): Properly place write barrier.
782 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
783
a88b96f4
UD
7842000-07-03 Ulrich Drepper <drepper@redhat.com>
785
786 * spinlock.c: Replace fast spinlocks by adaptive spinlocks which are
787 faster on SMP systems. No more emulation of compare&swap for adaptive
788 spinlocks.
789 * spinlock.h: Likewise.
790 * sysdeps/pthread/pthread.h: Shuffle PTHREAD_MUTEX_* values around.
791 Replace fast with adaptive mutex.
792 * mutex.c: Rewrite for replacement of fast by adaptive mutex.
793 * condvar.c: Likewise.
794 * pthread.c: Define and initialize __pthread_smp_kernel variable.
795 * internals.h: Declare __pthread_smp_kernel.
796 * sysdeps/pthread/bits/pthreadtypes.h: Update comment of
797 _pthread_fastlock structure.
798 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
799
800 * pthread.c: Remove initialization to zero from global variables.
801
1a6d7967
UD
8022000-06-29 Jakub Jelinek <jakub@redhat.com>
803
804 * shlib-versions: Make sparc64 GLIBC_2.2+ only.
805
1efd15e3
GM
8062000-06-28 Greg McGary <greg@mcgary.org>
807
808 * weaks.c: Wrap BP_SYM () around weak extern declarations of
809 pthread functions that have pointers in their return+arg signatures.
810
3210bef0
GM
8112000-06-27 Greg McGary <greg@mcgary.org>
812
1efd15e3
GM
813 * sysdeps/pthread/bits/libc-lock.h: Wrap BP_SYM () around weak
814 extern declarations of pthread functions that have pointers in
815 their return+arg signatures.
3210bef0 816
c49ebf76
UD
8172000-06-26 Ulrich Drepper <drepper@redhat.com>
818
819 * Makefile (tests): Add ex11. Add rules to build it.
820 * Examples/ex11.c: New file.
821 * rwlock.c: Fix complete braindamaged previous try to implement
822 timedout functions.
823
824 * spinlock.c: Pretty print.
825
d82e4c7b
UD
8262000-06-25 Ulrich Drepper <drepper@redhat.com>
827
828 * Makefile (tests): Add ex10. Add rules to build it.
829 * Versions [GLIBC_2.2] (libpthread): Add pthread_mutex_timedlock,
830 pthread_rwlock_timedrdlock, and pthread_rwlock_timedwrlock.
831 * condvar.c (pthread_cond_wait): Allow mutex of kind
832 PTHREAD_MUTEX_TIMED_NP.
833 (pthread_cond_timedwait_relative): Likewise.
834 * mutex.c (__pthread_mutex_init): Default is PTHREAD_MUTEX_TIMED_NP.
835 (__pthread_mutex_trylock): Use __pthread_alt_trylock for
836 PTHREAD_MUTEX_ERRORCHECK_NP. Handle PTHREAD_MUTEX_TIMED_NP.
837 (__pthread_mutex_lock): Use __pthread_alt_lock for
838 PTHREAD_MUTEX_ERRORCHECK_NP. Handle PTHREAD_MUTEX_TIMED_NP.
839 (__pthread_mutex_timedlock): New function.
840 (__pthread_mutex_unlock): Use __pthread_alt_unlock for
841 PTHREAD_MUTEX_ERRORCHECK_NP. Handle PTHREAD_MUTEX_TIMED_NP.
842 (__pthread_mutexattr_init): Use PTHREAD_MUTEX_TIMED_NP.
843 (__pthread_mutexattr_settype): Allow PTHREAD_MUTEX_TIMED_NP.
844 * spinlock.c: Implement alternate fastlocks.
845 * spinlock.h: Add prototypes.
846 * Examples/ex10.c: New file.
847 * sysdeps/pthread/pthread.h: Add prototypes for new functions.
848 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
849
850 * rwlock.c (__pthread_rwlock_rdlock): Optimize loop a bit.
851 (__pthread_rwlock_timedrdlock): New function.
852 (__pthread_rwlock_timedwrlock): New function.
853 Use laternate fastlock function everywhere.
854
3d8e9510
AJ
8552000-06-21 Andreas Jaeger <aj@suse.de>
856
efa24b51 857 * sysdeps/pthread/timer_routines.c: Include <string.h> for memset
3d8e9510
AJ
858 prototype.
859
860 * join.c: Include <stdlib.h> for exit prototype.
861
697568d1
UD
8622000-06-20 Ulrich Drepper <drepper@redhat.com>
863
bdf09fab
UD
864 * sysdeps/i386/useldt.h: Include <stdlib.h>.
865
697568d1
UD
866 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_BARRIERS.
867 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
868
869 * Makefile (libpthread-routines): Add barrier.
870 (tests): Add ex9. Add rule to build ex9.
871 * Versions: Export barrier functions.
872 * barrier.c: New file.
873 * Examples/ex9.c: New file.
874 * sysdeps/pthread/pthread.h: Add barrier data types and declarations.
875 * sysdeps/pthread/bits/pthreadtypes.h: Likewise.
bdf09fab 876 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
697568d1 877
ba80a015
UD
8782000-06-19 H.J. Lu <hjl@gnu.org>
879
880 * spinlock.h (HAS_COMPARE_AND_SWAP): Defined if
881 HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS is defined.
882 (compare_and_swap_with_release_semantics): New. Default to
883 compare_and_swap if HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS
884 is not defined.
885
886 * spinlock.c (__pthread_unlock): Call
887 compare_and_swap_with_release_semantics () instead of
888 compare_and_swap ().
889
d2dfc5de
UD
8902000-06-19 Ulrich Drepper <drepper@redhat.com>
891
892 * sysdeps/pthread/timer_create.c: Use _set_errno instead of assigning
893 to errno directly.
894 * sysdeps/pthread/timer_delete.c: Likewise.
895 * sysdeps/pthread/timer_getoverr.c: Likewise.
896 * sysdeps/pthread/timer_gettime.c: Likewise.
897 * sysdeps/pthread/timer_settime.c: Likewise.
898
8992000-06-13 Kaz Kylheku <kaz@ashi.footprints.net>
900
901 Timer nodes are now reference counted, and can be marked
902 as deleted. This allows for the safe release of the global mutex
903 in the middle without losing the timer being operated on.
904
905 * sysdeps/pthread/posix-timer.h (struct timer_node): The inuse
906 member is now an enum with three values, so that an intermediate
907 state can be represented (deleted but not free for reuse yet).
908 New refcount member added.
909 * sysdeps/pthread/timer_routines.c: Likewise.
910
911 * sysdeps/pthread/posix-timer.h (timer_addref, timer_delref,
912 timer_valid): New inline functions added.
913
914 * sysdeps/pthread/timer_gettime.c (timer_gettime): Function
915 restructured, recursive deadlock bug fixed.
916
917 * sysdeps/pthread/timer_gettime.c (timer_gettime): Uses new
918 timer_addref to ensure that timer won't be deleted while mutex is not
919 held. Also uses timer_invalid to perform validation of timer handle.
920 * sysdeps/pthread/timer_settime.c (timer_settime): Likewise.
921 * sysdeps/pthread/timer_getoverr.c (timer_getoverrun): Likewise.
922
e26dd47f
UD
9232000-06-14 Ulrich Drepper <drepper@redhat.com>
924
925 * shlib-versions: Add entry for SH.
926 Patch by Kaz Kojima <kkojima@rr.iij4u.or.jp>.
927
38161ac7
UD
9282000-06-13 Kaz Kylheku <kaz@ashi.footprints.net>
929
930 A few optimizations. Got rid of unnecessary wakeups of timer threads,
931 tightened up some critical regions and micro-optimized some list
932 manipulation code.
933
934 * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
935 Returns int value now to indicate whether timer was queued at head.
936 * sysdeps/pthread/posix-timer.h: Likewise.
937 * sysdeps/pthread/timer_settime.c (timer_settime): Takes advantage of
938 new return value from __timer_thread_queue_timer to avoid waking
939 up timer thread unnecessarily.
940
941 * sysdeps/pthread/posix-timer.h (timer_id2ptr): No longer checks
942 inuse flag, because this requires mutex to be held. Callers updated
943 to do the check when they have the mutex.
944 * sysdeps/pthread/timer_getoverr.c: Add check for inuse here.
945
946 * sysdeps/pthread/timer_settime.c (timer_settime): Tighter critical
947 regions: avoids making system calls while holding timer mutex, and
948 a few computations were moved outside of the mutex as well.
949 * sysdeps/pthread/timer_gettime.c (timer_gettime): Likewise.
950
951 * sysdeps/pthread/posix-timer.h (list_unlink_ip): Function name changed
952 to list_unlink_ip, meaning idempotent. Pointer manipulation
953 changed to get better better code out of gcc.
954 * sysdeps/pthread/timer_routines.c (list_unlink): Non-idempotent
955 version of list_unlink added here.
956 * sysdeps/pthread/timer_delete.c: Use appropriate list unlink
957 function in all places: idempotent one for timers, non-idempotent
958 one for thread nodes.
959 * sysdeps/pthread/timer_settime: Likewise.
960 * sysdeps/pthread/timer_routines.c: Likewise.
961
7ae1fe4d
UD
9622000-06-13 Ulrich Drepper <drepper@redhat.com>
963
490dc9aa
UD
964 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_TIMERS): Define.
965 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
966
7ae1fe4d
UD
967 * sysdeps/pthread/Makefile: Remove tests definition.
968
3846ef75
UD
9692000-06-12 Kazumoto Kojima <kkojima@rr.iij4u.or.jp>
970 Yutaka Niibe <gniibe@chroot.org>
971
972 * sysdeps/sh/pspinlock.c: New file.
973 * sysdeps/sh/pt-machine.h: New file.
974
a5b97402
UD
9752000-06-12 Ulrich Drepper <drepper@redhat.com>
976
55985355
UD
977 * Makefile (tests): Add joinrace.
978
a5b97402
UD
979 * Examples/ex6.c: Test return value of pthread_join.
980
2b72ebac
GK
9812000-06-11 Geoff Keating <geoffk@cygnus.com>
982
983 * sysdeps/powerpc/pspinlock.c (__pthread_spin_lock): Implement.
984 (__pthread_spin_trylock): Implement.
985 (__pthread_spin_unlock): Implement.
986 (__pthread_spin_init): Implement.
987 (__pthread_spin_destroy): Implement.
988
425638fb
UD
9892000-06-10 Ulrich Drepper <drepper@redhat.com>
990
991 * sysdeps/pthread/timer_routines.c (list_append): Little fix to
2b72ebac 992 really append the entry.
425638fb 993
6948d763
AJ
9942000-06-10 Andreas Jaeger <aj@suse.de>
995
996 * lockfile.c (__fresetlockfiles): Remove unused variable fp.
997
45dc1187
UD
9982000-06-10 Kaz Kylheku <kaz@ashi.footprints.net>
999
1000 * sysdeps/pthread/timer_create.c: Thread matching now done on
1001 clock type as well as thread attributes.
1002 There are individual global signal-delivering threads for
1003 different clock types.
1004 * sysdeps/pthread/posix-timer.h: Likewise.
1005 * sysdeps/pthread/timer_routines.c: Likewise.
1006
1007 * sysdeps/pthread/timer_routines.c: Thread allocation and
1008 deallocation function now remembers to put thread on active
425638fb 1009 list and remove from active list.
45dc1187
UD
1010 Thus now the feature of binding multiple timers
1011 to a single thread actually works.
1012
ee5d4855
UD
10132000-06-10 Ulrich Drepper <drepper@redhat.com>
1014
1015 * pthread.c (__pthread_create_2_1): Optimize a bit.
1016
1017 * internals.h (invalid_handle): Also test for p_terminated != 0.
1018 (nonexisting_handle): New function. Same as old invalid_handle.
1019 * join.c (pthread_join): Use nonexisting_handle instead of
1020 invalid_handle to test for acceptable thread handle.
41b37cb5 1021 * manager.c (pthread_handle_free): Likewise.
15109bd4 1022 * joinrace.c: New file.
ee5d4855
UD
1023 Reported by Permaine Cheung <pcheung@cygnus.com>.
1024
2715f28a
UD
10252000-06-08 Ulrich Drepper <drepper@redhat.com>
1026
8aa8fc7f
UD
1027 * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
1028 Correct handling of matching variable.
1029
480a06df
UD
1030 * sysdeps/pthread/tst-timer.c (main): Rewrite initializers to
1031 avoid warnings.
1032
18e4e446
UD
1033 * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
1034 Be prepared for empty timer list.
1035
165ab1d7
UD
1036 * sysdeps/pthread/timer_create.c (timer_create): Correct names of
1037 CPUTIME clock ID. Add support for thread clocks.
1038
f2a5974b
UD
1039 * sysdeps/pthread/posix-timer.h (timer_ptr2id): Operands in
1040 subtraction were switched.
1041
c0f79a04
UD
1042 * sysdeps/pthread/timer_routines.c (init_module): Use
1043 THREAD_MAXNODES threads.
1044
55938273
UD
1045 * sysdeps/pthread/posix-timer.h (struct timer_node): Add creator_pid.
1046 * sysdeps/pthread/timer_create.c: Fill in creator_pid.
1047 * sysdeps/pthread/timer_routines.c (thread_expire_timer): Send signal
1048 with sigqueueinfo is this system call is available.
1049
1050 * sysdeps/pthread/timer_create.c (timer_create): Allow
1051 CLOCK_CPUTIME if _POSIX_CPUTIME is defined.
1052
2715f28a
UD
1053 * sysdeps/pthread/Makefile: New file. Add rules to build timer
1054 functionality.
1055 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add TIMER_MAX.
1056
10572000-06-04 Kaz Kylheku <kaz@ashi.footprints.net>
1058
1059 * sysdeps/pthread/posix-timer.h: New file.
1060 * sysdeps/pthread/timer_create.c: New file.
1061 * sysdeps/pthread/timer_delete.c: New file.
1062 * sysdeps/pthread/timer_getoverr.c: New file.
1063 * sysdeps/pthread/timer_gettime.c: New file.
1064 * sysdeps/pthread/timer_routines.c: New file.
1065 * sysdeps/pthread/timer_settime.c: New file.
1066 * sysdeps/pthread/tst-timer.c: New file.
1067
1b579f91
UD
10682000-06-08 Ulrich Drepper <drepper@redhat.com>
1069
1070 * sysdeps/unix/sysv/linux/bits/local_lim.h: Remove OPEN_MAX and
1071 LINK_MAX definitions if necessary.
1072
dc3b5786
UD
10732000-06-04 Kaz Kylheku <kaz@ashi.footprints.net>
1074
1075 Added missing fork time handling of global libio lock.
1076
1077 * lockfile.c (__fresetlockfiles): Now also resets the list lock,
1078 not just the individual stream locks. Rewritten to use new
1079 iterator interface provided by libio rather than accessing
1080 global variable.
1081
1082 * lockfile.c (__flockfilelist, _funlockfilelist): New functions
1083 which lock and unlock the stream list using the new interface
1084 provied by libio.
1085 * internals.h: Likewise.
1086
1087 * ptfork.c (__fork): Now calls __flockfilelist before fork,
1088 and __funlockfilelist in the parent after the fork.
1089 Child still calls __fresetlockfiles as before.
1090
1091 * linuxthreads.texi: Now explains what happens to streams at
1092 fork time. Also whole new section on forking and thread added.
1093 Definition of pthread_atfork moved out of Miscellaneous Functions
1094 to this new section.
1095
1dd54850
UD
10962000-06-04 Jakub Jelinek <jakub@redhat.com>
1097
1098 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c (__pthread_spin_lock):
1099 Add missing register.
1100 * sysdeps/sparc/sparc64/pspinlock.c (__pthread_spin_lock): Likewise.
1101
554eca5c
AJ
11022000-06-02 Jakub Jelinek <jakub@redhat.com>
1103
1104 * sysdeps/sparc/sparc32/pspinlock.c: Implement spinlocks.
1105 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: New.
1106 * sysdeps/sparc/sparc64/pspinlock.c: Implement spinlocks.
1107
a3a99e01
AJ
11082000-05-31 Andreas Jaeger <aj@suse.de>
1109
1110 * sysdeps/mips/pspinlock.c: Implement spinlocks.
1111
c0f3519d
UD
11122000-05-28 Ulrich Drepper <drepper@redhat.com>
1113
84838b8f
UD
1114 * spinlock.c (__pthread_lock): Remove ASSERT.
1115
c0f3519d
UD
1116 * Makefile (tests): Add ex8.
1117 * Examples/ex8.c: New file.
1118
11192000-05-12 Kaz Kylheku <kaz@ashi.footprints.net>
1120
1121 Bugfix: The pthread_atfork mechanism now takes care of its
1122 own internal mutex at fork time.
1123
1124 * ptfork.c (__fork): Revised so that the mutex is held across
1125 the fork operation and while the handlers are called, and so that
1126 the child resets the mutex.
c0f3519d
UD
1127
1128 * linuxthreads.texi: Updated pthread_atfork documentation to make
1129 it clear that fork and pthread_atfork can't be reentered from
1130 atfork handlers, that pthread_atfork and fork are mutually atomic,
1131 and that the handlers are inherited by the child process.
1132
378fbeb4
UD
11332000-05-24 Ulrich Drepper <drepper@redhat.com>
1134
1135 * Makefile (libpthread-routines): Add pspinlock.
1136 * cancel.c: Rename __pthread_spin_unlock back to __pthread_unlock.
1137 Use struct _pthread_fastlock instead of pthread_spinlock_t.
1138 * condvar.c: Likewise.
1139 * internals.h: Likewise.
1140 * join.c: Likewise.
1141 * manager.c: Likewise.
1142 * mutex.c: Likewise.
1143 * pthread.c: Likewise.
1144 * rwlock.c: Likewise.
1145 * semaphore.c: Likewise.
1146 * signals.c: Likewise.
1147 * spinlock.h: Likewise.
1148 * spinlock.c: Likewise. Remove pthread_spin_lock functions.
1149 * sysdeps/alpha/pspinlock.c: New file.
1150 * sysdeps/arm/pspinlock.c: New file.
1151 * sysdeps/i386/pspinlock.c: New file.
1152 * sysdeps/m68k/pspinlock.c: New file.
1153 * sysdeps/mips/pspinlock.c: New file.
1154 * sysdeps/powerpc/pspinlock.c: New file.
1155 * sysdeps/sparc/sparc32/pspinlock.c: New file.
1156 * sysdeps/sparc/sparc64/pspinlock.c: New file.
1157 * sysdeps/pthread/bits/pthreadtypes.h: Remove pthread_spinlock_t
1158 back to _pthread_fastlock. Define new pthread_spinlock_t.
1159
fff82885
AJ
11602000-05-24 Andreas Jaeger <aj@suse.de>
1161
1162 * sysdeps/i386/i686/pt-machine.h: Only use LDT on newer kernels.
1163
5d1fba6d
AJ
11642000-05-21 Jakub Jelinek <jakub@redhat.com>
1165
1166 * manager.c (pthread_handle_create): Initialize p_res._sock to -1.
1167
f14273c5
AJ
11682000-05-13 Jakub Jelinek <jakub@redhat.com>
1169
1170 * internals.h (__RES_PTHREAD_INTERNAL): Define.
1171
93414bb9
UD
11722000-05-06 Kaz Kylheku <kaz@ashi.footprints.net>
1173
1174 * mutex.c (pthread_once): IN_PROGRESS state of pthread_once_t
1175 object state is represented with additional bits which distinguish
1176 whether that state was set up in the current process, or
1177 in an ancestor process. If that state was set in an ancestor,
1178 it means that a fork happened while thread was executing the init
1179 function. In that case, the state is reset to NEVER.
1180 * mutex.c (__pthread_once_fork_prepare): New function.
1181 (__pthread_once_fork_child): Likewise
1182 (__pthread_once_fork_parent): Likewise
1183 (__pthread_reset_pthread_once): Removed.
1184 * ptfork.c (__fork): Call new handlers in mutex.c.
1185 * internals.h: Declarations of new mutex.c functions added.
1186 Declaration of removed function deleted.
1187 * linuxthreads.texi: Updated documentation about pthread_once
1188 to clarify what happens under cancellation and forking.
1189
fc08075d
UD
11902000-05-06 Kaz Kylheku <kaz@ashi.footprints.net>
1191
1192 * internals.h: New thread manager request type, REQ_KICK.
1193 * join.c (pthread_exit): main thread now calls exit() instead
1194 of _exit() in order to proper process cleanup.
1195 * manager.c (__pthread_manager): Do not terminate manager
1196 after unblocking main thread; wait for main thread's
1197 REQ_PROCESS_EXIT request instead.
1198 Also, added REQ_KICK case to handle new request; this just does
1199 nothing.
1200 * manager.c (pthread_exited): Do not terminate manager after
1201 unblocking main thread.
1202 * manager.c (__pthread_manager_sighandler): If the main thread
1203 is waiting for all other threads to die, send a REQ_KICK into
1204 the thread manager request pipe to get it to clean out the threads
1205 and unblock the main thread as soon as possible. This fixes
1206 the 2000 millisecond hang on shutdown bug.
1207 * Examples/ex7.c: New file, tests shutdown behavior when all threads
1208 including the main one call pthread_exit(), or implicitly do so.
1209 * Makefile (tests): Add ex7.
1210
b19b7383
AJ
12112000-05-05 Andreas Jaeger <aj@suse.de>
1212
1213 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
1214 (pthread_getcpuclockid): Correct test for ourselves.
1215
c77ec56d
UD
12162000-05-05 Ulrich Drepper <drepper@redhat.com>
1217
1218 * internals.h (struct _pthread_descr_struct): Reorganization.
1219 Allocate room for 16 pointers at head of the structure for future
1220 thread-local data handling. Move p_self member in this area.
1221 * manager.c (pthread_handle_create): Adjust use of p_self.
1222 * sysdeps/i386/useldt.h (THREAD_SELF): Likewise.
1223 * pthread.c (__pthread_initial_thread): Adjust initialization.
1224 (__pthread_manager_thread): Likewise.
1225
12262000-04-29 Bruno Haible <haible@clisp.cons.org>
160016c9
UD
1227
1228 * join.c (pthread_exit): Use THREAD_GETMEM_NC instead of THREAD_GETMEM
1229 for eventmask larger than 1 word.
1230
3300816c
UD
12312000-04-27 Ulrich Drepper <drepper@redhat.com>
1232
1233 * Versions [libpthread] (GLIBC_2.2): Add __pthread_initialize_minimal.
1234 * pthread.c (__pthread_initialize_minimal): New function. Perform
1235 minimal initialization.
1236 (pthread_initialize): Remove this code here.
1237 * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h" again. We
1238 are working around the problem in glibc.
1239
d472655c
UD
12402000-04-25 Ulrich Drepper <drepper@redhat.com>
1241
1242 * sysdeps/i386/i686/pt-machine.h: Do not use "../useldt.h" for
1243 now. First gcc must be fixed (more concrete: libgcc).
1244
9bf4d640
UD
12452000-04-24 Ulrich Drepper <drepper@redhat.com>
1246
e19ae111 1247 * pthread.c: Remove special treatement for interrupt handlers on x86.
9bf4d640
UD
1248 * manager.c (pthread_free): Use FREE_THREAD not FREE_THREAD_SELF.
1249 * sysdeps/i386/useldt.h: Use "q" constraint instead of "r" where
1250 necessary.
1251 * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h".
1252
9682a871
UD
12532000-04-24 Mark Kettenis <kettenis@gnu.org>
1254
1255 * join.c (pthread_exit): Set p_terminated after reporting the
1256 termination event instead of before.
1257
d879eb85
UD
12582000-04-20 Jakub Jelinek <jakub@redhat.com>
1259
1260 * sysdeps/pthread/bits/libc-lock.h: Only declare __pthread_rwlock_*
1261 if __USE_UNIX98.
1262
12632000-04-18 Andreas Jaeger <aj@suse.de>
1264
1265 * Versions: Use ld instead of ld.so.
1266
318c80d4
UD
12672000-04-18 Jakub Jelinek <jakub@redhat.com>
1268
1269 * sysdeps/unix/sysv/linux/sparc/bits/sigcontext.h (struct sigcontext):
1270 Remove the typedef keyword.
1271
cd43f797
UD
12722000-04-18 Jakub Jelinek <jakub@redhat.com>
1273
1274 * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Use membar,
1275 not stbar.
1276 (READ_MEMORY_BARRIER): Define.
1277 * spinlock.c (__pthread_spin_unlock): Use READ_MEMORY_BARRIER, not
1278 MEMORY_BARRIER.
1279 * internals.h (READ_MEMORY_BARRIER): Define if not defined in sysdep
1280 headers.
1281
dbacafe5
UD
12822000-04-17 Ulrich Drepper <drepper@redhat.com>
1283
1284 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
1285 (pthread_getcpuclockid): Don't compare thread_id with thread_self,
1286 use thread_handle().
1287
e2947c42
UD
12882000-04-16 Ulrich Drepper <drepper@redhat.com>
1289
e3265f5b
UD
1290 * condvar.c (pthread_cond_timedwait_relative): Don't test for owner
1291 if fast mutex is used. Don't initialize `already_canceled' twice.
1292 Correctly test for return value of timedsuspend.
1293
e2947c42
UD
1294 * pthread.c: Correct long-time braino. We never set SA_SIGINFO and
1295 therefore don't need the _rt versions of the signal handlers.
1296
150f740a
UD
12972000-04-15 Ulrich Drepper <drepper@redhat.com>
1298
c269fdb4
UD
1299 * pthread.c (pthread_yield): New function.
1300 * sysdeps/pthread/pthread.h (pthread_yield): Add prototype.
1301 * Versions [libpthread] (GLIBC_2.2): Add pthread_yield.
e2947c42 1302 * internals.h: Declare __pthread_yield.
c269fdb4 1303
145b8413
UD
1304 * pthread.c (pthread_initialize): Avoid a bit more code if
1305 realtime signals are known to exist.
1306
150f740a
UD
1307 * pthread.c: Is __ASSUME_REALTIME_SIGNALS then avoid generating code
1308 to dynamically detect RT signals and avoid generating compatibility
1309 functions with old kernel.
1310 * restart.h (restart) [__ASSUME_REALTIME_SIGNALS]: Use
1311 __pthread_restart_new directly.
1312 (suspend) [__ASSUME_REALTIME_SIGNALS]: Use
1313 __pthread_wait_for_restart_signal directly.
1314 (timedsuspend) [__ASSUME_REALTIME_SIGNALS]: Use
1315 __pthread_timedsuspend_new directly.
1316
b2d4446f
UD
13172000-04-15 Ulrich Drepper <drepper@redhat.com>
1318
ef187474
UD
1319 * condvar.c: Remove all the special code to handle cond_timedwait.
1320 Use timedsuspend instead.
1321 * internals.h: Declare __pthread_timedsuspend_old,
1322 __pthread_timedsuspend_new, and __pthread_timedsuspend.
1323 Remove declaration of __pthread_init_condvar.
1324 * pthread.c: Define __pthread_timedsuspend variable.
1325 (__pthread_timedsuspend_old): New function. Timed suspension
1326 implementation for old Linux kernels.
1327 (__pthread_timedsuspend_new): New function. Timed suspension
1328 implementation for new Linux kernels.
1329 * restart.h (timedsuspend): New function. Call appropriate
1330 suspension function through __pthread_timedsuspend.
1331 * semaphore.c (sem_timedwait): Use timedsuspend, don't duplicate
1332 the code.
1333 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1334
a5a6f926
UD
1335 * internals.h (WRITE_MEMORY_BARRIER): Define as MEMORY_BARRIER if
1336 undefined.
1337 * spinlock.c: Use WRITE_MEMORY_BARRIER instead of MEMORY_BARRIER
1338 where possible.
1339 * sysdeps/alpha/pt-machine.h: Define WRITE_MEMORY_BARRIER.
1340 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
1341
b2d4446f
UD
1342 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _POSIX_SPAWN.
1343 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1344
b82f6af2
AJ
13452000-04-14 Andreas Jaeger <aj@suse.de>
1346
1347 * weaks.c: Fix typo.
1348
43c36f63
AJ
1349 * shlib-versions (mips.*-.*-linux.*): Support only GLIBC 2.0 and
1350 2.2 for linuxthreads.
1351
547ff462
UD
13522000-04-13 Ulrich Drepper <drepper@redhat.com>
1353
1354 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
1355 (pthread_getcpuclockid): Fix typo.
1356
b3ae0650
UD
13572000-04-12 Ulrich Drepper <drepper@redhat.com>
1358
3737ff12
UD
1359 * Makefile (libpthread-routines): Add getcpuclockid.
1360 * Versions [libpthread] (GLIBC_2.2): Add pthread_getcpuclockid.
1361 * sysdeps/pthread/getcpuclockid.c: New file.
1362 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c: New file.
1363 * sysdeps/pthread/pthread.h: Add prototype for pthread_getcpuclockid.
1364
07d641eb
UD
1365 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_SPIN_LOCKS):
1366 Defined.
1367 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1368
d8d914df
UD
1369 * sysdeps/pthread/pthread.h: Add prototypes for pthread_spin_init,
1370 pthread_spin_destroy, pthread_spin_lock, pthread_spin_trylock,
1371 and pthread_spin_unlock.
1372 * sysdeps/pthread/bits/pthreadtypes.h: Change struct _pthread_fastlock
1373 into pthread_spinlock_t. Change all uses.
1374 * spinlock.c: Implement pthread_spin_lock.
1375 Rename __pthread_unlock to __pthread_spin_unlock and define weak
1376 alias for real name.
1377 Define pthread_spin_trylock, pthread_spin_init, and
1378 pthread_spin_destroy.
1379 Change all uses of _pthread_fastlock to pthread_spinlock_t.
1380 * spinlock.h: Rename __pthread_unlock to __pthread_spin_unlock.
1381 Change all uses of _pthread_fastlock to pthread_spinlock_t.
1382 * Versions [libpthread] (GLIBC_2.2): Add pthread_spin_init,
1383 pthread_spin_destroy, pthread_spin_lock, pthread_spin_trylock,
1384 and pthread_spin_unlock.
1385 * cancel.c: Use __pthread_spin_unlock instead of __pthread_unlock.
1386 Change all uses of _pthread_fastlock to pthread_spinlock_t.
1387 * condvar.c: Likewise.
1388 * internals.h: Likewise.
1389 * join.c: Likewise.
1390 * manager.c: Likewise.
1391 * mutex.c: Likewise.
1392 * pthread.c: Likewise.
1393 * rwlock.c: Likewise.
1394 * semaphore.c: Likewise.
1395 * signals.c: Likewise.
1396
b3ae0650
UD
1397 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add various new POSIX
1398 macros.
1399 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
1400
8a31d742
UD
14012000-04-11 Ulrich Drepper <drepper@redhat.com>
1402
1403 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add
1404 _POSIX_SHARED_MEMORY_OBJECTS.
1405
2a086df9
AJ
14062000-04-11 Andreas Jaeger <aj@suse.de>
1407
1408 * sysdeps/mips/pt-machine.h (MEMORY_BARRIER): Define.
1409 (__compare_and_swap): Mark as modifying memory.
1410
4a1a3c21
GK
14112000-04-11 Geoff Keating <geoffk@cygnus.com>
1412
1413 * sysdeps/powerpc/pt-machine.h (MEMORY_BARRIER): Don't be
1414 __volatile__.
1415 (__compare_and_swap): Replace other 'sync' with MEMORY_BARRIER.
1416 Don't have the 'asm' __volatile__.
1417
de262537
UD
14182000-04-11 Ulrich Drepper <drepper@redhat.com>
1419
1420 * internals.h: Define MEMORY_BARRIER as empty if not defined already.
1421 * spinlock.c (__pthread_lock): Add memory barriers.
1422 (__pthread_unlock): Likewise.
1423 * sysdeps/alpha/pt-machine.h (MEMORY_BARRIER): Define using mb
1424 instruction.
1425 (RELEASE): Not needed anymore.
1426 (__compare_and_swap): Mark asm as modifying memory.
1427 * sysdeps/powerpc/pt-machine.h (sync): Remove. Replace with definition
1428 of MEMORY_BARRIER.
1429 (__compare_and_swap): Use MEMORY_BARRIER instead of sync.
1430 * sysdeps/sparc/sparc32/pt-machine.h (RELEASE): Not needed anymore.
1431 (MEMORY_BARRIER): Define using stbar.
1432 * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Define using
1433 stbar.
1434 (__compare_and_swap): Use MEMORY_BARRIER to ensure ordering.
1435 Patch by Xavier Leroy <Xavier.Leroy@inria.fr> based on comments by
1436 Mike Burrows <m3b@pa.dec.com>.
1437
4186c9f4
UD
14382000-04-09 Ulrich Drepper <drepper@redhat.com>
1439
1440 * signals.c (sigaction): Fix return value for the case SIG is one
1441 of the signals the implementation uses.
1442 Patch by Xavier.Leroy@inria.fr.
1443
bd457114
UD
14442000-04-01 Andreas Jaeger <aj@suse.de>
1445
1446 * attr.c: Use shlib-compat macros.
1447 * oldsemaphore.c: Likewise.
1448 * pthread.c: Likewise.
1449 * weaks.c: Likewise.
1450
1edf26ff
UD
14512000-03-26 Ulrich Drepper <drepper@redhat.com>
1452
1453 * semaphore.c (sem_timedwait): New function.
1454 Patch by Carl Mailloux <carlm@oricom.ca>.
1455 * semaphore.h: Declare sem_timedwait.
8e605e78 1456 * Versions [libpthread] (GLIBC_2.2): Add sem_timedwait.
1edf26ff 1457
54f6cbb3
RM
14582000-03-26 Roland McGrath <roland@baalperazim.frob.com>
1459
1460 * sysdeps/pthread/Makefile: File removed.
1461
c0bc5f7b
UD
14622000-03-23 Ulrich Drepper <drepper@redhat.com>
1463
383052e9
UD
1464 * mutex.c (__pthread_reset_pthread_once): Reset once_masterlock.
1465 * internals.h (__pthread_reset_pthread_once): Add prototype.
1466 * ptfork.c (__fork): Call __pthread_reset_pthread_once.
1467
c0bc5f7b
UD
1468 * manager.c (pthread_handle_create): Store ID of new thread before
1469 clone call.
1470
0bf98029
UD
14712000-03-21 Ulrich Drepper <drepper@redhat.com>
1472
ef7dddd0
UD
1473 * attr.c: Use new macros from shlib-compat.h to define versions.
1474 * oldsemaphore.c: Likewise.
1475 * semaphore.c: Likewise.
1476 * weaks.c: Likewise.
1477
1ab1ea76
UD
1478 * pthread.c: Update for new SHLIB_COMPAT definition.
1479
101edd3f
UD
1480 * manager.c (__pthread_manager): Unmask debug signal.
1481
0bf98029
UD
1482 * pthread.c (pthread_initialize): Test for address of __dso_handle
1483 being NULL, not value. Use __on_exit, not on_exit.
e063cef8 1484 Patch by Andreas Jaeger <aj@suse.de>.
0bf98029 1485
75836bc8
UD
1486 * pthread.c: Use new macros from shlib-compat.h to define versions.
1487
a6a478e9
UD
14882000-03-19 Ulrich Drepper <drepper@redhat.com>
1489
1490 * pthread.c (pthread_initialize): Instead of on_exit use
1491 __cxa_atexit if __dso_label is available to allow unloading the
1492 libpthread shared library.
1493
13a83604
UD
14942000-03-16 Ulrich Drepper <drepper@redhat.com>
1495
1496 * condvar.c: Make tests for ownership of mutex less strict.
1497
30b416ea
UD
14982000-03-14 Ulrich Drepper <drepper@redhat.com>
1499
5d141597
UD
1500 * condvar.c (pthread_cond_wait): Check whether mutex is owned by
1501 current thread and return error if not.
04366d5f
UD
1502 (pthread_cond_timedwait_relative_old): Likewise.
1503 (pthread_cond_timedwait_relative_new): Likewise.
5d141597 1504
30b416ea
UD
1505 * mutex.c (__pthread_once): Handle cancelled init function correctly.
1506 (pthread_once_cancelhandler): New function.
1507 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1508
56eea8d1
UD
15092000-03-14 Andreas Jaeger <aj@suse.de>
1510
1511 * pthread.c (pthread_handle_sigcancel_rt): GS has been renamed to
1512 REG_GS.
1513 (pthread_handle_sigrestart_rt): Likewise.
1514 * signals.c (pthread_sighandler_rt): Likewise.
1515
3d9ebedb
AJ
15162000-03-02 Andreas Jaeger <aj@suse.de>
1517
1518 * sysdeps/pthread/bits/libc-lock.h: Fix typo.
1519 Reported by Sean Chen <sean.chen@turbolinux.com>.
1520
b041ebc2
UD
15212000-02-28 Andreas Jaeger <aj@suse.de>
1522
1523 * rwlock.c: Fix typo.
1524
0ed99ce4
UD
15252000-02-27 Ulrich Drepper <drepper@redhat.com>
1526
1527 * rwlock.c: Define __* variants of the functions and make old names
1528 aliases.
1529 * Versions [GLIBC_2.2]: Export the __pthread_rwlock_* functions.
1530 * sysdeps/pthread/bits/libc-lock.h: Define __libc_rwlock_* macros.
1531
d66732e0
UD
15322000-02-25 Andreas Jaeger <aj@suse.de>
1533
1534 * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
0ed99ce4
UD
1535 pwrite64, lseek64, open64, and __open64 with version 2.2.
1536
93a19c64
UD
15372000-02-22 Ulrich Drepper <drepper@redhat.com>
1538
1539 * semaphore.h (SEM_FAILED): Use 0 not NULL.
1540
ec91ea7c
UD
15412000-02-14 Ulrich Drepper <drepper@redhat.com>
1542
1543 * condvar.c (pthread_cond_timedwait_relative_old): Tight loop with
1544 nanosleep does not work either. Get absolute time inside the
1545 loop.
1546 (pthread_cond_timedwait_relative_new): Likewise.
1547 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1548
f5ff12d8
UD
15492000-02-13 Andreas Jaeger <aj@suse.de>
1550
1551 * condvar.c (pthread_cond_timedwait_relative_new): Fix last patch.
1552 (pthread_cond_timedwait_relative_old): Likewise.
1553
46661856
UD
15542000-02-13 Ulrich Drepper <drepper@redhat.com>
1555
1556 * condvar.c (pthread_cond_timedwait_relative_old): Undo last patch
1557 but keep the code around. A bug in the kernel prevent us from
1558 using the code.
1559 (pthread_cond_timedwait_relative_new): Likewise.
1560 (PR libc/1597 and libc/1598).
1561
b168cff2
UD
15622000-02-01 Kaz Kylheku <kaz@ashi.footprints.net>
1563
1564 * condvar.c (pthread_cond_timedwait_relative_old): Do tight
1565 loop around nanosleep calls instead of around most of the function
1566 (pthread_cond_timedwait_relative_new): Likewise.
1567 body. Got rid of backwards goto and one local.
1568
8a94dfe4
UD
15692000-01-31 Ulrich Drepper <drepper@redhat.com>
1570
1571 * condvar.c (pthread_cond_timedwait_relative_old): Recompute time
1572 before every nanosleep call to account for time spent in the rest
1573 of the function.
1574 (pthread_cond_timedwait_relative_new): Likewise.
1575 Patch by khendricks@ivey.uwo.ca (PR libc/1564).
1576
b6aa34eb
UD
15772000-01-29 Ulrich Drepper <drepper@redhat.com>
1578
1579 * condvar.c (pthread_cond_timedwait_relative_old): Get remaining time
1580 from nanosleep call so that in case we restart we only wait for the
1581 remaining time.
1582 (pthread_cond_timedwait_relative_new): Likewise.
1583 Patch by khendricks@ivey.uwo.ca (PR libc/1561).
1584
0af4c646
UD
15852000-01-18 Ulrich Drepper <drepper@cygnus.com>
1586
1587 * manager.c (pthread_allocate_stack): Compute guard page address
1588 correctly. Patch by HJ Lu.
1589
1590 * sysdeps/pthread/pthread.h: Define
1591 PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP.
1592
2449110a
UD
15932000-01-16 Ulrich Drepper <drepper@cygnus.com>
1594
1595 * rwlock.c (pthread_rwlock_unlock): Correct one more problem with
1596 preference handling.
1597 (pthread_rwlockattr_setkind_np): Allow
1598 PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP.
1599 Patches by Kaz Kylheku <kaz@ashi.footprints.net>.
1600
03c0d6ef
UD
16012000-01-12 Ulrich Drepper <drepper@cygnus.com>
1602
1603 * internals.h (pthread_readlock_info): New structure.
1604 (_pthread_descr_struct): Add p_readlock_list, p_readlock_free, and
1605 p_untracked_readlock_count.
1606 * pthread.c (__pthread_initial_thread, pthread_manager_thread):
1607 Add initializers for new fields.
1608 * manager.c (pthread_free): Free read/write lock lists.
1609 * queue.h (queue_is_empty): New function.
1610 * rwlock.c: Implement requirements about when readers should get
1611 locks assigned.
1612 * sysdeps/pthread/pthread.h
1613 (PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP): New definition.
1614 * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_rwlock_t):
1615 Define this name as well.
1616 Patches by Kaz Kylheku <kaz@ashi.footprints.net>.
1617
d569d333
UD
16182000-01-05 Ulrich Drepper <drepper@cygnus.com>
1619
2ba3c836
UD
1620 * pthread.c (__pthread_initial_thread, pthread_manager_thread):
1621 Adjust initializers for struct _pthread_descr_struct change.
d569d333
UD
1622 * internals.h (struct _pthread_descr_struct): Move new elements to
1623 the end.
1624
1d2fc9b3
UD
16252000-01-03 Kaz Kylheku <kaz@ashi.footprints.net>
1626
1627 Redesigned how cancellation unblocks a thread from internal
1628 cancellation points (sem_wait, pthread_join,
1629 pthread_cond_{wait,timedwait}).
1630 Cancellation won't eat a signal in any of these functions
1631 (*required* by POSIX and Single Unix Spec!).
a3bfd999 1632 * condvar.c: Spontaneous wakeup on pthread_cond_timedwait won't eat a
1d2fc9b3
UD
1633 simultaneous condition variable signal (not required by POSIX
1634 or Single Unix Spec, but nice).
1635 * spinlock.c: __pthread_lock queues back any received restarts
1636 that don't belong to it instead of assuming ownership of lock
1637 upon any restart; fastlock can no longer be acquired by two threads
1638 simultaneously.
a3bfd999 1639 * restart.h: Restarts queue even on kernels that don't have
1d2fc9b3
UD
1640 queued real time signals (2.0, early 2.1), thanks to atomic counter,
1641 avoiding a rare race condition in pthread_cond_timedwait.
1642
1c5d4617
UD
16431999-12-31 Andreas Jaeger <aj@suse.de>
1644
1645 * internals.h: Remove duplicate prototype declarations.
1646
1647 * weaks.c: Remove __THROW from prototypes since the file is not
1648 compiled by a C++ compiler.
1649 * internals.h: Likewise.
1650
16511999-12-30 Andreas Jaeger <aj@suse.de>
1652
1653 * sysdeps/pthread/pthread.h: Move internal functions to...
1654 * sysdeps/pthread/bits/libc-lock.h: ...here.
1655
d876f532
UD
16561999-12-29 Andreas Jaeger <aj@suse.de>
1657
1658 * sysdeps/pthread/pthread.h: Fix typos, reformat comments.
1659
056e0358
UD
16601999-12-28 Ulrich Drepper <drepper@cygnus.com>
1661
1662 * sysdeps/alpha/pt-machine.h: Move stack_pointer definition to the
1663 beginning.
1664
1665 * manager.c (__pthread_start): Add one more cast to prevent
1666 warning on 64bit machines.
1667
46fd4f67
UD
16681999-12-21 Ulrich Drepper <drepper@cygnus.com>
1669
1670 * manager.c (pthread_handle_create): Set p_pid of new thread
1671 before calling the callback function to report a new thread.
1672
c63598bf
UD
16731999-12-20 Andreas Jaeger <aj@suse.de>
1674
1675 * pthread.c (pthread_initialize): Move getrlimit call after
1676 setting of errno.
1677
b85697f6
UD
16781999-12-18 Ulrich Drepper <drepper@cygnus.com>
1679
778c59c8
UD
1680 * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
1681 pwrite64, lseek64, open64, and __open64.
1682 * wrapsyscall.c: Define pread, __pread64, pread64, pwrite, __pwrite64,
1683 pwrite64, lseek64, open64, and __open64.
1684
b85697f6
UD
1685 * manager.c (pthread_allocate_stack): Correct computation of
1686 new_thread_bottom. Correct handling of stack size and when the
1687 rlimit method to guard for stack growth is used.
1688 * pthread.c (pthread_initialize): Stack limit must be STACK_SIZE
1689 minus one pagesize (not two).
1690
b43b13ac
UD
16911999-12-03 Andreas Jaeger <aj@suse.de>
1692
1693 * Versions: Add __res_state with version GLIBC_2.2.
1694
1695 * errno.c (__res_state): New function to return thread specific
1696 resolver state.
1697
1698 * pthread.c (pthread_initialize): Initialize p_resp.
1699 (__pthread_reset_main_thread): Also set p_resp.
1700
1701 * manager.c (pthread_handle_create): Initialize p_resp.
1702
1703 * internals.h: Add thread specific resolver state.
1704 Based on patches by Adam D. Bradley <artdodge@cs.bu.edu>.
1705
d7a4856e
UD
17061999-12-01 Ulrich Drepper <drepper@cygnus.com>
1707
1708 * sysdeps/i386/pt-machine.h: Move stack_pointer definition to the
1709 beginning.
1710 * sysdeps/i386/i686/pt-machine.h: Likewise.
1711 Patches by Alan Modra <alan@SPRI.Levels.UniSA.Edu.Au>.
1712
ffd35632
UD
17131999-11-23 Ulrich Drepper <drepper@cygnus.com>
1714
1715 * manager.c (pthread_start_thread_event): Initialize p_pid already
1716 here.
1717
20bdb31b
UD
17181999-11-22 Ulrich Drepper <drepper@cygnus.com>
1719
1720 * internals.h: Add prototype for __pthread_manager_event.
1721 * manager.c (__pthread_manager_event): New function.
1722 (pthread_start_thread_event): Correct computation of self.
1723 Use INIT_THREAD_SELF.
1724 * pthread.c (__pthread_manager_thread): Initialize p_lock.
1725 (__pthread_initialize_manager): Respect event flags also for creation
1726 of the manager thread.
1727
178a145a
UD
17281999-11-08 Ulrich Drepper <drepper@cygnus.com>
1729
1730 * pthread.c (__pthread_initialize_manager): Initialize
1731 __pthread_manager_thread.p_tid.
1732
a9cb398f
UD
17331999-11-02 Ulrich Drepper <drepper@cygnus.com>
1734
ab86fbb1
UD
1735 * internals.h: Declare __pthread_last_event.
1736 * manager.c: Define __pthread_last_event.
1737 (pthread_handle_create): Set __pthread_last_event.
1738 (pthread_exited): Likewise.
1739 * join.c (pthread_exit): Likewise.
1740
a9cb398f
UD
1741 * Makefile (libpthread-routines): Add events.
1742 * events.c: New file.
1743 * internals.h: Protect against multiple inclusion.
1744 Include thread_dbP.h header.
1745 (struct _pthread_descr_struct): Add new fields p_report_events and
1746 p_eventbuf.
1747 Declare event reporting functions.
1748 * join.c (pthread_exit): Signal event if this is wanted.
1749 * manager.c (__pthread_threads_events): New variable.
1750 (pthread_handle_create): Take new parameters with event information.
1751 Signal TD_CREATE event if wanted.
1752 (__pthread_manager): Adjust pthread_handle_create call.
1753 (pthread_start_thread_event): New function. Block until manager is
1754 finished and then call pthread_start_thread.
1755 (pthread_exited): Signal TD_REAP event if wanted.
1756
8dd1e494
UD
17571999-10-26 Ulrich Drepper <drepper@cygnus.com>
1758
1759 * restart.h (suspend_with_cancellation): Rewrite as a macro.
1760
1761 * condvar.c (pthread_cond_timedwait_relative): Don't mark as inline.
1762
86cfe82d
UD
17631999-10-25 Andreas Jaeger <aj@suse.de>
1764
1765 * internals.h: Remove K&R compatibility.
1766 * no-tsd.c: Likewise.
1767 * semaphore.h: Likewise.
1768 * signals.c: Likewise.
1769 * sysdeps/pthread/bits/libc-tsd.h: Likewise.
1770 * sysdeps/unix/sysv/linux/bits/sigthread.h: Likewise.
1771 * weaks.c: Likewise.
1772
15daa639
UD
17731999-10-21 Xavier Leroy <Xavier.Leroy@inria.fr>
1774
d364e525
UD
1775 * pthread.c: For i386, wrap pthread_handle_sigrestart and
1776 pthread_handle_sigcancel with functions that restore %gs from the
1777 signal context. For each signal handling function, two wrappers
1778 are required, one for a non-RT signal and one for a RT signal.
1779 * signal.c: For i386, add code to restore %gs from the signal
1780 context in pthread_sighandler and pthread_sighandler_rt.
15daa639 1781
ef5d6645
UD
17821999-10-17 Ulrich Drepper <drepper@cygnus.com>
1783
1784 * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add cast.
1785
f6367df2
UD
17861999-10-14 Ulrich Drepper <drepper@cygnus.com>
1787
4a379216
UD
1788 * pthread.c (__pthread_initial_thread): Pass argument to
1789 PTHREAD_START_ARGS_INITIALIZER.
1790 (__pthread_manager_thread): Likewise.
1791
1792 * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add parameter to
1793 initialize function.
1794
f6367df2
UD
1795 * manager.c (pthread_handle_create): Remove p_startfct initialization.
1796
1797 * internals.h (_pthread_descr_struct): We don't need p_startfct field.
1798
d4c5cf80
UD
17991999-10-12 Ulrich Drepper <drepper@cygnus.com>
1800
1801 * internals.h: Correct return types for __libc_read and __libc_write.
1802
883c331a
UD
18031999-10-09 Andreas Jaeger <aj@suse.de>
1804
1805 * internals.h: Add __new_sem_post to get prototype in
1806 manager.c; include semaphore.h for needed types.
1807
c813f986
UD
18081999-10-08 Ulrich Drepper <drepper@cygnus.com>
1809
1810 * manager.c (__pthread_manager) [REQ_POST]: Use __new_sem_post
1811 directly instead of calling sem_post which should not be necessary
1812 but is faster and might help in some case to work around problems.
c1422e5b 1813 Patch by khendricks@ivey.uwo.ca [libc/1382].
c813f986 1814
0f5219d4
UD
18151999-10-08 Andreas Schwab <schwab@suse.de>
1816
1817 * sysdeps/pthread/Subdirs: New file.
1818 * Implies: Removed.
1819
9640bbe1
UD
18201999-10-07 Ulrich Drepper <drepper@cygnus.com>
1821
1822 * Implies: New file.
1823 * internals.h (struct _pthread_descr_struct): Add p_startfct.
1824 * manager.c (pthread_handle_create): Initialize p_startfct.
1825 * pthread.c: Define __linuxthread_pthread_sizeof_descr variable.
1826
079c00e6
UD
18271999-09-25 Ulrich Drepper <drepper@cygnus.com>
1828
d790bc34
UD
1829 * manager.c (__linuxthreads_pthread_threads_max): New variable.
1830 * specific.c (__linuxthreads_pthread_keys_max): New variable.
6e42b0f1 1831 (__linuxthreads_pthread_key_2ndlevel_size): New variable.
d790bc34 1832
079c00e6
UD
1833 * condvar.c (pthread_cond_timedwait_relative): Never return with
1834 EINTR. Patch by Andreas Schwab.
1835
b5c69d99
UD
18361999-09-19 Ulrich Drepper <drepper@cygnus.com>
1837
1838 * signals.c (sigaction): Correct last patch. Don't select
1839 pthread_sighandler_rt based on the signal number but instead of
1840 the SA_SIGINFO flag.
1841
d790bc34
UD
18421999-09-23 Ulrich Drepper <drepper@cygnus.com>
1843
1844 * specific.c: Move definitions of struct pthread_key_struct and
1845 destr_function to ...
1846 * internals.h: ...here.
1847
9cf44e65
UD
18481999-09-18 Ulrich Drepper <drepper@cygnus.com>
1849
1850 * pthread.c (pthread_handle_sigrestart_rt): New function. Use
1851 this instead of pthread_handle_sigrestart if the signal is an RT
1852 signal.
1853
1854 * signals.c: Handle passing through of sighandler arguments also
1855 for real-time signals.
1856
4fe53b3a
UD
18571999-09-03 Andreas Schwab <schwab@suse.de>
1858
1859 * ptfork.c (__fork): Renamed from fork and use __libc_fork. Add
1860 fork as weak alias.
1861 (__vfork): New function, alias vfork.
1862 * Versions: Export __fork, vfork, and __vfork in libpthread.
1863
1d0b89a4
UD
18641999-08-23 Andreas Schwab <schwab@suse.de>
1865
1866 * signals.c (pthread_sighandler): Add SIGCONTEXT_EXTRA_ARGS to
1867 call to signal handler.
1868
6570e194
UD
18691999-08-20 Ulrich Drepper <drepper@cygnus.com>
1870
1871 * pthread.c (__pthread_reset_main_thread): Undo last change.
1872 (__pthread_kill_other_threads_np): Reset signal handlers for the
1873 signals we used in the thread implementation here.
1874
70aea399
UD
18751999-08-19 Ulrich Drepper <drepper@cygnus.com>
1876
2b638910 1877 * pthread.c (__pthread_reset_main_thread): Reset signal handlers
68ea6c18 1878 for the signals we used in the thread implementation [PR libc/1234].
2b638910 1879
264ec183
UD
1880 * Versions: Export __pthread_kill_other_threads_np from libpthread
1881 for GLIBC_2.1.2.
1882
70aea399
UD
1883 * signals.c: Pass sigcontext through wrapper to the user function.
1884
ff5fad16
UD
18851999-08-01 Ulrich Drepper <drepper@cygnus.com>
1886
1887 * Versions [ld.so] (GLIBC_2.0): Export __libc_internal_tsd_get and
1888 __libc_internal_tsd_set.
1889
6b798621
UD
18901999-07-29 Andreas Jaeger <aj@arthur.rhein-neckar.de>
1891
1892 * manager.c: Remove inclusion of <linux/tasks.h> since it's not
1893 needed anymore.
1894
76a16b8f
UD
18951999-07-16 Andreas Jaeger <aj@arthur.rhein-neckar.de>
1896
4bf307e3 1897 * internals.h: Align _pthread_descr_struct to 32 bytes.
76a16b8f
UD
1898 Reported by Tim Hockin <thockin@cobaltnet.com>, close PR
1899 libc/1206.
1900
5ef2d37b
UD
19011999-07-09 Ulrich Drepper <drepper@cygnus.com>
1902
1903 * oldsemaphore.c (sem_compare_and_swap): Fix use of compare and
1904 swap function.
1905
c2fa5b5a
UD
19061999-07-09 Cristian Gafton <gafton@redhat.com>
1907
1908 * Makefile (libpthread-routines): Add oldsemaphore routine.
ae3c1571
UD
1909 * Versions: Add sem_destroy, sem_getvalue, sem_init, sem_post,
1910 sem_trywait, and sem_wait to GLIBC_2.1.
c2fa5b5a
UD
1911 * oldsemaphore.c: New file.
1912 * semaphore.c: Add default_symbol_versions for the changed functions.
1913 (__new_sem_init): Rename from sem_init.
1914 (__new_sem_post): Rename from sem_post.
1915 (__new_sem_wait): Rename from sem_wait.
1916 (__new_sem_trywait): Rename from sem_trywait.
1917 (__new_sem_getvalue): Rename from sem_getvalue.
1918 (__new_sem_destroy): Rename from sem_destroy.
1919
6a1db4ff
UD
19201999-06-23 Robey Pointer <robey@netscape.com>
1921
1922 * internals.h: Added p_nextlock entry to separate queueing for a
1923 lock from queueing for a CV (sometimes a thread queues on a lock
1924 to serialize removing itself from a CV queue).
1925 * pthread.c: Added p_nextlock to initializers.
1926 * spinlock.c: Changed to use p_nextlock instead of p_nextwaiting.
1927
019e7a64
UD
19281999-07-09 Ulrich Drepper <drepper@cygnus.com>
1929
1930 * manager.c (pthread_handle_create): Free mmap region after stack
1931 if clone failed. Patch by Kaz Kylheku <kaz@ashi.FootPrints.net>.
1932
33d1a2c5
UD
19331999-05-23 Andreas Jaeger <aj@arthur.rhein-neckar.de>
1934
1935 * man/pthread_cond_init.man: Correct example.
1936 Reported by Tomas Berndtsson <tomas@nocrew.org>.
1937
1938 * linuxthreads.texi (Condition Variables): Likewise.
1939
407d26b7
UD
19401999-05-18 Jakub Jelinek <jj@ultra.linux.cz>
1941
1942 * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): Use
1943 casx not cas, also successful casx returns the old value in rd
1944 and not the new value.
1945
431c33c0
UD
19461999-05-16 Xavier Leroy <Xavier.Leroy@inria.fr>
1947
1948 * manager.c: If pthread_create() is given a NULL attribute
1949 and the thread manager runs with a realtime policy, set the
1950 scheduling policy of the newly created thread back to SCHED_OTHER.
1951 * manager.c: If the PTHREAD_INHERIT_SCHED attribute is given,
1952 initialize the schedpolicy field of new_thread->p_start_args
1953 to that of the calling thread.
1954
2c68584c
UD
19551999-04-29 Ulrich Drepper <drepper@cygnus.com>
1956
1957 * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): cas
1958 instruction does not allow memory element to use offset.
1959
390500b1
UD
19601999-04-28 Ulrich Drepper <drepper@cygnus.com>
1961
1962 * manager.c (pthread_allocate_stack): Optimize initialization of new
1963 thread descriptor.
1964
89afc233
UD
1965 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_define_initialized):
1966 Don't use initializer since it is all zeroes.
1967 (__libc_once_define): Likewise.
1968
1e76ce9c
UD
19691999-04-16 Andreas Jaeger <aj@arthur.rhein-neckar.de>
1970
1971 * sysdeps/arm/Implies: Removed since cmpxchg/no-cmpxchg
1972 doesn't exist anymore.
1973 * sysdeps/i386/Implies: Likewise.
1974 * sysdeps/m68k/Implies: Likewise.
1975 * sysdeps/mips/Implies: Likewise.
1976 * sysdeps/powerpc/Implies: Likewise.
1977 * sysdeps/sparc/sparc32/Implies: Likewise.
1978 * sysdeps/sparc/sparc64/Implies: Likewise.
1979
46a4682d
UD
19801999-04-15 Ulrich Drepper <drepper@cygnus.com>
1981
1982 * sysdeps/alpha/bits/semaphore.h: Removed.
1983 * sysdeps/powerpc/bits/semaphore.h: Removed.
1984 * sysdeps/pthread/cmpxchg/bits/semaphore.h: Removed.
1985 * sysdeps/pthread/no-cmpxchg/bits/semaphore.h: Removed.
1986 * Makefile (headers): Remove bits/semaphore.h.
1987
1988 * semaphore.h: Define _pthread_descr if necessary.
1989 Don't include limits.h. Define SEM_VALUE_MAX directly.
1990 Define SEM_FAILED.
1991 (sem_t): Protect element names with leading __.
1992 Add declarations for sem_close, sem_open, and sem_unlink.
1993 * semaphore.c: Adjust all functions for new element names.
1994 Define sem_close, sem_open, and sem_unlink.
1995 * Versions (libthread): Add sem_close, sem_open, and sem_unlink for
1996 GLIBC_2.1.1.
1997 * sysdeps/pthread/bits/pthreadtypes.h: Define _pthread_descr only if
1998 necessary.
1999
ea48e2c4
UD
20001999-03-16 H.J. Lu <hjl@gnu.org>
2001
2002 * specific.c (pthread_key_delete): Check th->p_terminated to see
2003 if the thread is running.
2004
670af0d9
UD
2005 * Versions (__libc_internal_tsd_get, __libc_internal_tsd_set):
2006 Added to GLIBC_2.0 for libc.so.
2007
0543cd26
UD
20081999-02-12 H.J. Lu <hjl@gnu.org>
2009
2010 * Versions (__libc_current_sigrtmin, __libc_current_sigrtmax,
2011 __libc_allocate_rtsig): Added to GLIBC_2.1.
2012
2013 * internals.h (DEFAULT_SIG_RESTART): Removed.
2014 (DEFAULT_SIG_CANCEL): Removed.
2015
2016 * pthread.c (init_rtsigs, __libc_current_sigrtmin,
2017 __libc_current_sigrtmax, __libc_allocate_rtsig): New functions.
2018 (__pthread_sig_restart, __pthread_sig_cancel,
2019 __pthread_sig_debug): Initialized.
2020 (pthread_initialize): Call init_rtsigs () to initialize
2021 real-time signals.
2022
f5492334
UD
20231999-02-03 H.J. Lu <hjl@gnu.org>
2024
2025 * manager.c (__pthread_manager): Do block __pthread_sig_debug.
2026 Don't restart the thread which sent REQ_DEBUG.
2027 (pthread_start_thread): Check if __pthread_sig_debug > 0
2028 before debugging.
2029
2030 * pthread.c (__pthread_initialize_manager): Suspend ourself
2031 after sending __pthread_sig_debug to gdb instead of
2032 __pthread_sig_cancel.
2033
8f0302ee
UD
20341999-01-24 H.J. Lu <hjl@gnu.org>
2035
2036 * manager.c (__pthread_manager): Delete __pthread_sig_debug
2037 from mask if __pthread_sig_debug > 0.
2038 (pthread_handle_create): Increment __pthread_handles_num.
2039
2040 * manager.c (pthread_handle_create): Don't pass CLONE_PTRACE to clone.
2041 * pthread.c (__pthread_initialize_manager): Likewise.
2042
2043 * pthread.c (pthread_initialize): Use __libc_allocate_rtsig (1)
2044 instead of __libc_allocate_rtsig (2).
2045 (__pthread_initialize_manager): Send __pthread_sig_debug to gdb
2046 instead of __pthread_sig_cancel.
2047 (pthread_handle_sigdebug): Fix comments.
2048
82df2969
UD
20491999-01-21 Ulrich Drepper <drepper@cygnus.com>
2050
2051 * manager.c (pthread_allocate_stack): Set
2052 __pthread_nonstandard_stacks if user-specified stack is used.
2053
482eec0d
UD
20541999-01-16 Ulrich Drepper <drepper@cygnus.com>
2055
2056 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _LFS_ASYNCHRONOUS_IO,
2057 _LFS_LARGEFILE, _LFS64_LARGEFILE, and _LFS64_STDIO from Unix98.
2058
b92ad8d6
UD
20591999-01-07 Xavier Leroy <Xavier.Leroy@inria.fr>
2060
2061 * pthread.c: Use a third signal __pthread_sig_debug distinct
2062 from __pthread_sig_cancel to notify gdb when a thread is
2063 created
2064 * manager.c: Likewise.
2065 * internals.h: Likewise.
2066 * signals.c: The implementation of sigwait(s) assumed that
2067 all signals in s have signal handlers already attached.
2068 This is not required by the standard, so make it work
2069 also if some of the signals have no handlers.
2070
34992338
UD
20711999-01-05 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
2072
2073 * linuxthreads.texi: Remove pointers from first @node. Move old
2074 @node spec inside comment.
2075
118bad87
UD
20761998-12-31 Ulrich Drepper <drepper@cygnus.com>
2077
2078 * sysdeps/pthread/bits/stdio-lock.h: Define _IO_lock_lock and
2079 _IO_lock_unlock.
2080
c046e7a5
UD
20811998-12-29 Ulrich Drepper <drepper@cygnus.com>
2082
2083 * semaphore.c (sem_trywait): Don't forget to unlock the semaphore
2084 lock. Patch by Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>.
2085
361d49e6
UD
20861998-12-21 Ulrich Drepper <drepper@cygnus.com>
2087
2088 * manager.c: Threads now send __pthread_sig_cancel on termination.
2089 Change clone call and signal masks.
2090 * thread.c (pthread_handle_sigrestart): Remove special code for
2091 manager.
2092 (pthread_handle_sigcancel): In manager thread call
2093 __pthread_manager_sighandler.
2094 * sysdeps/i386/pt-machine.h (__compare_and_swap): Add memory clobber.
2095 * sysdeps/i386/i686/pt-machine.h: Likewise.
2096 Patches by Xavier Leroy.
2097
4260bc74
UD
20981998-12-14 Ulrich Drepper <drepper@cygnus.com>
2099
361d49e6 2100 * spinlock.c (__pthread_unlock): Don't crash if called for an
fbaf6e72
UD
2101 untaken mutex. Reported by Ruslan V. Brushkoff <rus@Snif.Te.Net.UA>.
2102
4260bc74
UD
2103 * Examples/ex6.c: Unbuffer stdout and reduce sleep time to reduce
2104 overall runtime.
2105
e3743e2f
UD
21061998-12-13 Ulrich Drepper <drepper@cygnus.com>
2107
2108 * Examples/ex3.c: Wait until all threads are started before
2109 searching for the number to avoid race condition on very fast
2110 systems.
2111
8632b240
UD
21121998-12-08 Andreas Jaeger <aj@arthur.rhein-neckar.de>
2113
2114 * sysdeps/pthread/pthread.h: Remove __pthread_setcanceltype
2eda5d9b 2115 declaration since it's not needed.
8632b240
UD
2116
2117 * sysdeps/pthread/pthread.h: Move internal functions to ...
2118 * internals.h: ...here.
2119
a6ff34d7
UD
21201998-12-02 H.J. Lu <hjl@gnu.org>
2121
2122 * pthread.c (__pthread_sig_restart): Initiliaze to 0 if
2123 SIGRTMIN is defined.
2124 (__pthread_sig_cancel): Likewise.
2125
628a0aa1
UD
21261998-12-01 Andreas Jaeger <aj@arthur.rhein-neckar.de>
2127
2128 * wrapsyscall.c: Include <sys/mman.h> for msync,
2129 <stdlib.h> for system and <termios.h> for tcdrain prototype.
2130 Correct msync declaration.
2131
348ed515
UD
21321998-11-29 Roland McGrath <roland@baalperazim.frob.com>
2133
2134 * sysdeps/pthread/bits/libc-tsd.h (__libc_tsd_define, __libc_tsd_get,
2135 __libc_tsd_set): New macros for new interface.
2136 * no-tsd.c: New file, provide uninitialized defns of
2137 __libc_internal_tsd_get and __libc_internal_tsd_set.
2138 * Makefile (routines): Add no-tsd.
2139
21401998-10-12 Roland McGrath <roland@baalperazim.frob.com>
2141
2142 * internals.h: Include <bits/libc-tsd.h>, not <bits/libc-lock.h>.
2143 * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
2144 __libc_internal_tsd_set): Move decls to ...
2145 * sysdeps/pthread/bits/libc-tsd.h: New file for __libc_internal_tsd_*
2146 declarations.
2147
2148 * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
2149 __libc_internal_tsd_set): Make these pointers to functions, not
2150 functions; remove #pragma weak decls for them.
2151 * specific.c (__libc_internal_tsd_get, __libc_internal_tsd_set):
2152 Define static functions and initialized pointers to them.
2153
97dac76c
UD
21541998-11-18 Ulrich Drepper <drepper@cygnus.com>
2155
2156 * Makefile (CFLAGS-mutex.c): Define as -D__NO_WEAK_PTHREAD_ALIASES.
2157 (CFLAGS-specific.c): Likewise.
2158 (CFLAGS-pthread.c): Likewise.
2159 (CFLAGS-ptfork.c): Likewise.
2160 (CFLAGS-cancel.c): Likewise.
2161 * sysdeps/pthread/bits/libc-lock.h: Don't mark __pthread_* functions
2162 as weak references if __NO_WEAK_PTHREAD_ALIASES is defined.
2163
2164 * mutex.c (pthread_mutex_init): Define as strong symbol.
2165 (pthread_mutex_destroy): Likewise.
2166 (pthread_mutex_trylock): Likewise.
2167 (pthread_mutex_lock): Likewise.
2168 (pthread_mutex_unlock): Likewise.
2169 (pthread_mutexattr_init): Likewise.
2170 (pthread_mutexattr_destroy): Likewise.
2171 (pthread_once): Likewise.
2172 * ptfork.c (pthread_atfork): Likewise.
2173 * specific.c (pthread_key_create): Likewise.
2174 (pthread_setspecific): Likewise.
2175 (pthread_getspecific): Likewise.
2176
8b7fb588
UD
21771998-11-15 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
2178
2179 * linuxthreads.texi: Fix punctuation after xref.
2180
d2537a47
UD
21811998-11-10 H.J. Lu <hjl@gnu.org>
2182
2183 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine NR_OPEN
2184 if it is defined in <linux/limits.h>.
2185
d5cabaa4
UD
21861998-10-29 14:28 Ulrich Drepper <drepper@cygnus.com>
2187
2188 * spinlock.h (__pthread_trylock): Define inline.
2189 (__pthread_lock): Add extra parameter to declaration. Declare
2190 using internal_function.
2191 (__pthread_unlock): Declare using internal_function.
2192 * spinlock.c (__pthread_lock): Add new parameter. Use it instead
2193 of local variable self. Avoid recomputing self. Define using
2194 internal_function.
2195 (__pthread_trylock): Remove.
2196 (__pthread_unlock): Define using internal_function.
2197 * cancel.c: Adjust for __pthread_lock interface change. Use already
2198 computed self value is possible.
2199 * condvar.c: Likewise.
2200 * join.c: Likewise.
2201 * manager.c: Likewise.
2202 * mutex.c: Likewise.
2203 * pthread.c: Likewise.
2204 * rwlock.c: Likewise.
2205 * semaphore.c: Likewise.
2206 * signals.c: Likewise.
2207
c70ca1fa
UD
22081998-10-27 13:46 Ulrich Drepper <drepper@cygnus.com>
2209
2210 * sysdeps/pthread/pthread.h (struct _pthread_cleanup_buffer): Prepend
2211 __ to field names of the struct.
2212 * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_fastlock):
2213 Likewise.
2214 (pthread_attr_t): Likewise.
2215 (pthread_cond_t): Likewise.
2216 (pthread_condattr_t): Likewise.
2217 (pthread_mutex_t): Likewise.
2218 (pthread_mutexattr_t): Likewise.
2219 (pthread_rwlock_t): Likewise.
2220 (pthread_rwlockattr_t): Likewise.
2221 * attr.c: Adjust for pthread.h and pthreadtypes.h change.
2222 * cancel.c: Likewise.
2223 * condvar.c: Likewise.
2224 * manager.c: Likewise.
2225 * mutex.c: Likewise.
2226 * pthread.c: Likewise.
2227 * ptlongjmp.c: Likewise.
2228 * rwlock.c: Likewise.
2229 * spinlock.c: Likewise.
2230
a5d1d726
UD
22311998-10-09 Ulrich Drepper <drepper@cygnus.com>
2232
7ccc548b
UD
2233 * sysdeps/i386/pt-machine.h (get_eflags, set_eflags): Mark these
2234 also with PT_EI.
2235
a5d1d726
UD
2236 * sysdeps/i386/i686/pt-machine.h: Remove unused inline
2237 definitions.
2238
9a29bc37
UD
2239 * Makefile (libpthread-routines): Add pt-machine.
2240 * pt-machine.c: New file.
2241 * sysdeps/alpha/pt-machine.h: Define PT_EI as extern inline is not
2242 yet defined. Use PT_EI in extern inline definitions.
2243 * sysdeps/arm/pt-machine.h: Likewise.
2244 * sysdeps/i386/pt-machine.h: Likewise.
2245 * sysdeps/i386/i686/pt-machine.h: Likewise.
2246 * sysdeps/m68k/pt-machine.h: Likewise.
2247 * sysdeps/mips/pt-machine.h: Likewise.
2248 * sysdeps/powerpc/pt-machine.h: Likewise.
2249 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
2250 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
2251
c10bb795
UD
22521998-10-02 Andreas Jaeger <aj@arthur.rhein-neckar.de>
2253
2254 * semaphore.h: Include <sys/types.h> so that _pthread_descr
2255 is declared.
2256
22571998-09-15 David S. Miller <davem@pierdol.cobaltmicro.com>
2258
2259 * sysdeps/sparc/sparc32/pt-machine.h (INIT_THREAD_SELF): Add nr
2260 argument.
2261 * sysdeps/sparc/sparc64/pt-machine.h (INIT_THREAD_SELF): Likewise.
2262
22631998-09-12 14:24 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu>
2264
d364e525
UD
2265 * sysdeps/unix/sysv/linux/bits/sigthread.h: Add multiple inclusion
2266 guard.
c10bb795 2267
5e0889da
UD
22681998-09-02 11:08 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2269
2270 * signals.c (sigaction): Check that sig is less than NSIG to avoid
2271 array index overflow.
2272
6796bc80
UD
22731998-09-06 10:56 Ulrich Drepper <drepper@cygnus.com>
2274
2275 * sysdeps/pthread/semaphore.h: New file.
2276
be935610
UD
22771998-09-06 09:08 Ulrich Drepper <drepper@cygnus.com>
2278
2279 * sysdeps/pthread/bits/libc-lock.h (enum __libc_tsd_key_t): Add
2280 _LIBC_TSD_KEY_DL_ERROR.
2281
bfce746a
UD
22821998-08-31 Ulrich Drepper <drepper@cygnus.com>
2283
7afab53d 2284 * sysdeps/i386/i686/pt-machine.h (testandset): Add memory clobber.
6a805a0b 2285 * sysdeps/i386/pt-machine.h: Likewise.
bfce746a
UD
2286 Suggested by Roland McGrath.
2287
75311719
UD
22881998-08-28 13:58 Ulrich Drepper <drepper@cygnus.com>
2289
2290 * internals.h: Also define THREAD_GETMEM_NC and THREAD_SETMEM_NC to
2291 access thread data with non-constant offsets.
2292 * specific.c: Use THREAD_GETMEM_NC and THREAD_SETMEM_NC where
2293 necessary.
2294
2295 * sysdeps/i386/useldt.h: Fix typo. Add THREAD_GETMEM_NC and
2296 THREAD_SETMEM_NC definitions.
2297
2298 * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM_NC and
2299 THREAD_SETMEM_NC.
2300 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
2301
00a2f9aa
UD
23021998-08-26 15:46 Ulrich Drepper <drepper@cygnus.com>
2303
2304 * internals.h: Define THREAD_GETMEM and THREAD_SETMEM to default if
2305 not already defined.
2306 (struct _pthread_descr_struct): Add p_self and p_nr field.
2307 * manager.c (__pthread_handles): Define second element to point
2308 to manager thread.
2309 (__pthread_handles_num): Initialize to 2.
2310 (__pthread_manager): Use INIT_THREAD_SELF with two arguments.
2311 (pthread_start_thread): Likewise.
2312 (pthread_handle_create): Start search for free slot at entry 2.
2313 Initialize new fields p_self and p_nr.
2314 Call __clone with CLONE_PTRACE if available.
2315 (pthread_free): Call FREE_THREAD_SELF if available.
2316 * pthread.c (__pthread_initial_thread): Initialize new fields.
2317 (__pthread_manager_thread): Likewise.
2318 (__pthread_initialize_manager): Call __clone with CLONE_PTRACE.
2319
2320 * cancel.c: Use THREAD_GETMEM and THREAD_SETMEM to access the
2321 elements of the thread descriptor.
2322 * condvar.c: Likewise.
2323 * errno.c: Likewise.
2324 * join.c: Likewise.
2325 * manager.c: Likewise.
2326 * pthread.c: Likewise.
2327 * ptlongjmp.c: Likewise.
2328 * semaphore.c: Likewise.
2329 * signals.c: Likewise.
2330 * specific.c: Likewise.
2331 * spinlock.c: Likewise.
2332
2333 * sysdeps/alpha/pt-machine.h (INIT_THREAD_SELF): Add extra parameter.
2334
2335 * sysdeps/i386/useldt.h: New file.
2336 * sysdeps/i386/i686/pt-machine.h: Show how to use this file.
2337
2338 * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM and
2339 THREAD_SETMEM using __thread_self.
2340 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
2341
ed1ac6a2
UD
23421998-08-24 Geoff Keating <geoffk@ozemail.com.au>
2343
2344 * spinlock.c (__pthread_lock): Reset p_nextwaiting to NULL if it
2345 turned out that we didn't need to queue after all.
2346
23471998-08-22 Geoff Keating <geoffk@ozemail.com.au>
2348
2349 * sysdeps/powerpc/pt-machine.h: Remove testandset, it's not used
2350 and wastes space; correct types.
2351
cf0fd016
UD
23521998-08-08 11:18 H.J. Lu <hjl@gnu.org>
2353
2354 * signals.c (sigaction): Handle NULL argument.
2355
d358336f
UD
23561998-08-04 Ulrich Drepper <drepper@cygnus.com>
2357
2358 * sysdeps/unix/sysv/linux/bits/sigthread.h: Use __sigset_t instead
2359 of sigset_t.
2360
7cabd57c
UD
23611998-08-02 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2362
2363 * Makefile (linuxthreads-version): Extract correct number from
2364 Banner.
2365
ddbf7fef
UD
23661998-07-29 Xavier Leroy <Xavier.Leroy@inria.fr>
2367
2368 * Banner: Bump version number to 0.8
2369 * FAQ.html: Many updates, in particular w.r.t. debugging.
2370 * manager.c: Support for non-default stacksize for
2371 LinuxThreads-allocated stacks;
2372 don't use guard pages for stacks with default size, rely on
2373 rlimit(RLIMIT_STACK) instead (it's cheaper).
2374 * attr.c: Likewise.
2375 * cancel.c: Use __pthread_sig_cancel and __pthread_sig_restart
2376 everywhere instead of PTHREAD_SIG_CANCEL and PTHREAD_SIG_RESTART.
2377 * condvar.c: Likewise.
2378 * internals.h: Likewise.
2379 * restart.h: Likewise.
2380 * signals.c: Likewise.
2381 * pthread.c: Likewise; set rlimit(RLIMIT_STACK) as we need it.
2382
6c202c68
UD
23831998-07-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2384
2385 * weaks.c: Define pthread_mutexattr_[sg]ettype instead of
2386 __pthread_mutexattr_[sg]ettype. Add more weak aliases.
2387 * Versions: Put __pthread_mutexattr_settype under version
2388 GLIBC_2.0. Don't export __pthread_mutexattr_setkind_np and
2389 __pthread_mutexattr_gettype.
2390
23911998-07-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2392
2393 * sysdeps/pthread/bits/libc-lock.h: Make
2394 __pthread_mutexattr_settype weak. Don't make
2395 __pthread_mutexattr_setkind_np weak.
2396
50304ef0
UD
23971998-07-16 10:52 Ulrich Drepper <drepper@cygnus.com>
2398
2399 * manager.c (pthread_handle_create): Check whether sched_setscheduler
2400 call can succeed here.
2401
2402 * mutex.c: Define __pthread_mutexattr_settype and make
2403 __pthread_mutexattr_setkind_np an alias.
2404 Likewise for __pthread_mutexattr_gettype.
2405
24061998-07-15 11:00 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu>
2407
2408 * attr.c (pthread_attr_setschedpolicy): Don't check whether caller
2409 is root.
2410
c764b9a7
UD
24111998-07-14 19:38 Ulrich Drepper <drepper@cygnus.com>
2412
2413 * sysdeps/pthread/bits/libc-lock.h: Define __libc_cleanup_end.
2414
ceb27555
UD
24151998-07-11 Andreas Jaeger <aj@arthur.rhein-neckar.de>
2416
2417 * Examples/ex6.c: Include <unistd.h> for usleep.
2418
b1209f90
UD
24191998-06-13 11:04 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2420
2421 * Examples/ex4.c (main): Use exit, not pthread_exit.
2422
6077fe6e
UD
24231998-07-09 13:39 Ulrich Drepper <drepper@cygnus.com>
2424
2425 * Versions: Add __pthread_mutexattr_gettype and
2426 __pthread_mutexattr_settype.
2427 * lockfile.c: Use __pthread_mutexattr_settype instead of
2428 __pthread_mutexattr_setkind_np.
2429 * mutex.c: Define __pthread_mutexattr_gettype and
2430 __pthread_mutexattr_settype.
2431 * weak.c: Likewise.
e918a7fe
UD
2432 * sysdeps/pthread/pthread.h: Declare __pthread_mutexattr_gettype and
2433 __pthread_mutexattr_settype.
2434 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_init_recursive):
2435 Use __pthread_mutexattr_settype.
6077fe6e 2436
4bae5567
UD
24371998-07-08 22:26 Ulrich Drepper <drepper@cygnus.com>
2438
2439 * Versions: Add pthread_mutexattr_gettype, pthread_mutexattr_settype.
2440 * mutex.c: Define weak alias pthread_mutexattr_gettype and
2441 pthread_mutexattr_settype.
2442 * sysdeps/pthread/pthread.h: Declare these functions.
2443 Move pthread_sigmask and pthread_kill declaration in separate header.
2444 * sysdeps/unix/sysv/linux/bits/sigthread.h: New file.
2445
0302fece
UD
24461998-07-07 15:20 Ulrich Drepper <drepper@cygnus.com>
2447
2448 * Makefile: Add rules to compile and run tests.
2449 * Examples/ex1.c: Little changes to fix warnings.
2450 * Examples/ex2.c: Likewise.
2451 * Examples/ex3.c: Likewise.
2452 * Examples/ex4.c: Likewise.
2453 * Examples/ex5.c: Likewise.
2454 * Examples/ex6.c: New file.
2455
77ccaba1
UD
24561998-07-05 11:54 Ulrich Drepper <drepper@cygnus.com>
2457
6777b467 2458 * Versions: Add pthread_attr_init to GLIBC_2.1 version in libc.
77ccaba1 2459
ba9234d9
UD
24601998-07-01 Andreas Jaeger <aj@arthur.rhein-neckar.de>
2461
2462 * attr.c: Include <string.h>.
2463
d64fae6a
UD
24641998-06-30 11:47 Ulrich Drepper <drepper@cygnus.com>
2465
2466 * attr.c: Include errno.h. Use memcpy to copy sched_param.
2467 * internals.h: Include limits.h.
2468 * manager.c: Use memcpy to copy sched_param.
2469 * ptfork.c: Include errno.h.
2470 * pthread.c: Likewise.
2471 * semaphore.c: Likewise.
2472 * specific.c: Likewise.
2473 * spinlock.h: Likewise.
2474 * sysdeps/pthread/pthread.h: Include only allowed headers. Move
2475 type definition to ...
2476 * sysdeps/pthread/bits/pthreadtypes.h: ...here. New file.
2477
fdacb17d
UD
24781998-06-29 12:34 Ulrich Drepper <drepper@cygnus.com>
2479
2480 * sysdeps/pthread/pthread.h: Use __PMT not __P for function pointers.
2481
2482 * sysdeps/pthread/pthread.h: Define various PTHREAD_* symbols also
2483 as macros as demanded in POSIX.1, Annex C.
2484
24851998-06-29 12:29 Ulrich Drepper <drepper@cygnus.com>
2486
2487 * internals.h (struct pthread_request): For free use pthread_t
2488 instead of pthread_descr.
2489 * join.c (pthread_join): Pass thread_id, not th to manager.
2490 (pthread_detach): Likewise.
2491 * manager.c (__pthread_manager): Except thread ID in FREE_REQ case.
2492 (pthread_exited): Remove detached queue code.
2493 (pthread_handle_free): Expect thread ID parameter and use it to
2494 validate the thread decsriptor. Don't use detached queue.
2495 Patches by Xavier Leroy.
2496
24971998-06-27 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2498
2499 * libpthread.map: Export accept, longjmp, sigaction, siglongjmp,
2500 _IO_flockfile, _IO_ftrylockfile, _IO_funlockfile,
2501 __pthread_atfork, __pthread_key_create, __pthread_once.
2502 * internals.h: Doc fix.
2503 * pthread.c (__pthread_initialize): Define again.
2504
e138a800
UD
25051998-06-26 Ulrich Drepper <drepper@cygnus.com>
2506
026d5011
UD
2507 * manager.c (pthread_exited): If thread is not detached put it on
2508 special list.
2509 (pthread_handle_free): If thread is not on list with living threads
2510 search on list with detached threads.
2511
b195f6bc
UD
2512 * sysdeps/pthread/pthread.h (PTHREAD_RWLOCK_INITIALIZER): Correct
2513 for new definition of pthread_rwlock_t.
2514
e138a800
UD
2515 * spinlock.c: Correct test whether to compile
2516 __pthread_compare_and_swap or not.
2517
3387a425
UD
25181998-06-25 19:27 Ulrich Drepper <drepper@cygnus.com>
2519
2520 * attr.c: Finish user stack support. Change locking code to be safe
2521 in situations with different priorities.
2522 * cancel.c: Likewise.
2523 * condvar.c: Likewise.
2524 * internals.h: Likewise.
2525 * join.c: Likewise.
2526 * manager.c: Likewise.
2527 * mutex.c: Likewise.
2528 * pthread.c: Likewise.
2529 * ptlongjmp.c: Likewise.
2530 * queue.h: Likewise.
2531 * rwlock.c: Likewise.
2532 * semaphore.c: Likewise.
2533 * semaphore.h: Likewise.
2534 * signals.c: Likewise.
2535 * spinlock.c: Likewise.
2536 * spinlock.h: Likewise.
75c3a84f 2537 * sysdeps/pthread/pthread.h: Likewise.
df4099e8 2538 Patches by Xavier Leroy.
3387a425 2539
0ca7e46e 2540 * sysdeps/i386/i686/pt-machine.h: New file.
75c3a84f 2541
3387a425
UD
25421998-06-25 Ulrich Drepper <drepper@cygnus.com>
2543
2544 * sysdeps/pthread/pthread.h: Make [sg]et_stacksize and
2545 [sg]et_stackaddr prototypes always available.
2546
2547 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2548 _POSIX_THREAD_ATTR_STACKSIZE and _POSIX_THREAD_ATTR_STACKADDR.
2549
d47aac39
UD
25501998-06-24 Ulrich Drepper <drepper@cygnus.com>
2551
2552 * manager.c (pthread_free): Undo patch from 980430.
2553 Reported by David Wragg <dpw@doc.ic.ac.uk>.
2554
69f234e8
UD
25551998-06-09 15:07 Ulrich Drepper <drepper@cygnus.com>
2556
2557 * manager.c: Define __pthread_manager_adjust_prio and use it to
2558 increase priority when needed.
2559 * internals.h: Add prototype for __pthread_manager_adjust_prio.
2560 * mutex.c: Optimize mutexes to wake up only one thread.
768cbca8 2561 * pthread.c: Move PID of manager for global variable in structure
69f234e8
UD
2562 element.
2563 Patches by Xavier Leroy.
2564
c0fb8a56
UD
25651998-06-07 13:47 Ulrich Drepper <drepper@cygnus.com>
2566
2567 * sysdeps/pthread/bits/libc-lock.h: Optimize cleanup handlers a bit.
2568
c6bd526f
UD
25691998-06-03 Andreas Jaeger <aj@arthur.rhein-neckar.de>
2570
2571 * attr.c: Correct typo.
2572
f9119f49
UD
25731998-05-01 Ulrich Drepper <drepper@cygnus.com>
2574
2575 * manager.c (pthread_free): Unmap guard before the stack.
2576 Patch by Matthias Urlichs.
2577
3dd2c3e2
UD
25781998-04-30 Ulrich Drepper <drepper@cygnus.com>
2579
2580 * manager.c (pthread_free): Detect already free child.
2581 Patch by Xavier Leroy, reported by Matthias Urlichs.
2582
0111b224
UD
25831998-04-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2584
2585 * Makefile (linuxthreads-version): Renamed back from
2586 libpthread-version.
2587
f12944ec
UD
25881998-04-21 Ulrich Drepper <drepper@cygnus.com>
2589
26e119f1 2590 * ptlongjmp.c: Add prototypes for __libc_siglongjmp and
f12944ec
UD
2591 __libc_longjmp.
2592
8619129f
UD
25931998-04-20 14:55 Ulrich Drepper <drepper@cygnus.com>
2594
2595 * Makefile (libpthread-routines): Add ptlongjmp and spinlock.
2596 * internals.h: Add definitions for new spinlock implementation.
2597 * ptlongjmp.c: New file.
2598 * spinlock.c: New file.
2599 * spinlock.h (acquire): Don't reschedule using __sched_yield, use
2600 new function __pthread_acquire to prevent deadlocks with thread
2601 with different priorities.
2602 Patches by Xavier Leroy <Xavier.Leroy@inria.fr>.
2603
52cda958
UD
26041998-03-16 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2605
2606 * manager.c (__pthread_manager): Reduce first argument to select
2607 to include just the needed file descriptor.
2608
48fc3dd2
UD
26091998-03-17 00:06 Ulrich Drepper <drepper@cygnus.com>
2610
2611 * manager.c: Fix last patch which caused core dumps.
2612
2613 * pthread.c: Correctly handle missing SIGRTMIN.
2614
f649c201
UD
26151998-03-15 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2616
2617 * libpthread.map: Add __libc_internal_tsd_get and
2618 __libc_internal_tsd_set. Add missing cancelable functions. Export
2619 libc internal versions of the cancelable functions.
2620
14c44e2e
UD
26211998-03-13 16:51 Ulrich Drepper <drepper@cygnus.com>
2622
2623 * weaks.c: Define pthread_attr_init as GLIBC_2.0 and GLIBC_2.1.
2624
5d409851
UD
26251998-03-13 00:46 Ulrich Drepper <drepper@cygnus.com>
2626
2627 * attr.c: Implement pthread_attr_[gs]etguardsize,
2628 pthread_attr_[gs]setstackaddr, pthread_attr_[gs]etstacksize.
2629 Change pthread_attr_init to have two interfaces.
2630 * internals.h (struct _pthread_descr_struct): Add new fields for
2631 above functions.
2632 * libpthread.map: Add names in GLIBC_2.1 section.
2633 * manager.c (pthread_handle_create): Implement guardsize and
2634 user stack.
2635 (pthread_free): Likewise.
2636 * pthread.c (pthread_create): Add new interface for changed
2637 pthread_attr_t.
2638 * sysdeps/pthread/pthread.h: Add prototypes for new functions.
2639 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add definition of
2640 PTHREAD_STACK_MIN.
2641
5afdca00
UD
26421998-03-11 00:42 Wolfram Gloger <wmglo@dent.med.uni-muenchen.de>
2643
5d409851
UD
2644 * manager.c: Enable resetting of the thread scheduling policy
2645 to SCHED_OTHER when the parent thread has a different one.
5afdca00
UD
2646
26471998-02-01 13:51 Ulrich Drepper <drepper@cygnus.com>
2648
2649 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2650 _POSIX_ASYNCHRONOUS_IO.
2651
2652 * sysdeps/pthread/pthread.h: Define bits for Unix98 variants of
2653 mutexes.
2654 * mutex.c: Implement new mutex types.
2655
2656 * internals.h: Include <signal.h>.
2657
2658 * libpthread.map: Add __erno_location and __h_errno_location.
2659
2660 * errno.c: Return pointer to variable actually in use. This might
2661 not be the one in the thread structure.
2662 * internals.h (struct _pthread_descr_struct): Add new fields p_errnop
2663 and p_h_errnop.
2664 * manager.c (__pthread_manager): Set p_errnop and p_h_errnop member
2665 of manager thread structure.
2666 (pthread_handle_create): Set p_errnop and p_h_errnop members for new
2667 thread.
2668 * pthread.c: Adapt initializer for thread structures.
2669 (__pthread_initial_thread): Set p_errnop and p_h_errnop member.
2670 (__pthread_reset_main_thread): Reset p_errnop and p_h_errnop of
2671 current thread to global variables.
2672
26731998-01-31 17:27 Ulrich Drepper <drepper@cygnus.com>
2674
2675 * rwlock.c: New file.
2676 * Makefile (libpthread-routines): Add rwlock.
2677 * sysdeps/pthread/pthread.h: Define data structures and declare
2678 functions.
2679 * libpthread.map: Add new functions.
2680
26811997-12-18 13:50 Philip Blundell <pb@nexus.co.uk>
2682
2683 * sysdeps/arm/pt-machine.h: New file; add ARM support.
2684 * sysdeps/arm/Implies: likewise.
2685 * README: Document it.
2686
26871997-12-13 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2688
2689 * signals.c: Remove unneeded initializer for sigwaited, saving a
2690 warning.
2691
26921997-04-11 01:18 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2693
2694 * semaphore.c (sem_init): Set sem_spinlock only if available.
2695
26961997-12-04 01:48 Ulrich Drepper <drepper@cygnus.com>
2697
2698 * mutex.c: Implement PTHREAD_MUTEX_CHECKERROR.
2699 * sysdeps/pthread/pthread.h: Define PTHREAD_MUTEX_CHECKERROR.
2700
2701 * Makefile: Update from LinuxThreads 0.7.
2702 * internals.h. Likewise.
2703 * manager.c: Likewise.
2704 * mutex.c: Likewise.
2705 * pthread.c: Likewise.
2706 * signals.c: Likewise.
2707 * specific.c: Likewise.
2708 * Examples/ex3.c: Likewise.
2709
27101997-11-20 18:13 Ulrich Drepper <drepper@cygnus.com>
2711
2712 * pthread.c (__pthread_reset_main_thread): Close pipe only if still
2713 open.
2714
27151997-10-29 05:38 Ulrich Drepper <drepper@cygnus.com>
2716
2717 * wrapsyscall.c: Add socket functions which are also cancelation
2718 points.
2719
27201997-10-19 21:40 Wolfram Gloger <wg@wolfram.dent.med.uni-muenchen.de>
2721
2722 * specific.c (__libc_internal_tsd_set, __libc_internal_tsd_get):
2723 New functions for fast thread specific data within libc.
2724
2725 * internals.h: Add new array p_libc_specific to struct
2726 _pthread_descr_struct.
2727
2728 * sysdeps/pthread/bits/libc-lock.h: Declare new functions.
2729
27301997-10-13 05:39 Ulrich Drepper <drepper@cygnus.com>
2731
2732 * semaphore.h: Add __BEGIN_DECLS/__END_DECLS.
2733 Reported by Ralf Corsepius <corsepiu@faw.uni-ulm.de>.
2734
27351997-08-29 03:05 Ulrich Drepper <drepper@cygnus.com>
2736
2737 * internals.h (struct _pthread_descr_struct): Add definitions for
2738 two-level specific key handling.
2739 * manager.c (pthread_handle_create): Initialize specific memory array.
2740 * specific.c: Implement two-level key handling.
2741 * weaks.c: Don't provide dummy key handling.
2742 * sysdeps/pthread/bits/libc-lock.h: Typedef __libc_lock_t (no #define).
2743 Add definition of __libc_key_t.
2744 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define PTHREAD_KEYS_MAX
2745 as 1024.
2746 Add definition of _POSIX_THREAD_DESTRUCTOR_ITERATIONS and
2747 PTHREAD_DESTRUCTOR_ITERATIONS.
2748
2749 * manager.c (pthread_handle_create): Compare mmap result with
2750 MAP_FAILED.
2751
2752 * ptfork.c: Rename to __pthread_atfork and make old name a weak alias.
2753 * sysdeps/pthread/bits/pthread.h: Add prototype for __pthread_atfork.
2754
27551997-08-22 19:04 Richard Henderson <rth@cygnus.com>
2756
2757 sysdeps/sparc -> sysdeps/sparc/sparc32
2758 sysdeps/sparc64 -> sysdeps/sparc/sparc64
2759
2760 * internals.h: Change definition of THREAD_SELF to be an expression,
2761 not a statement that did a return.
2762 * sysdeps/alpha/pt-machine.h (THREAD_SELF): Update accordingly.
2763 * sysdeps/sparc/sparc32/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF):
2764 Follow Solaris and use a "system reserved" register (%g6) to hold
2765 the thread descriptor.
2766 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
2767
27681997-08-03 00:09 Ulrich Drepper <drepper@cygnus.com>
2769
2770 * mutex.c: Correct pthread_once. Patch by Xavier Leroy.
2771 * sysdeps/pthread/pthread.h: Add prototype for __pthread_once.
2772 * sysdeps/pthread/bits/pthread.h: Add macros for __libc_once.
2773
2774 * semaphore.c: Include spinlock.h only when needed.
2775
2776 * specific.c (__pthread_setsepcific, __pthread_getspecific): Reject
2777 keys for entries not in use.
2778
2779 * weaks.c: Implement key handling functions for real.
2780
27811997-06-29 01:04 Richard Henderson <richard@gnu.ai.mit.edu>
2782
2783 Initial sparc64-linux support:
d364e525
UD
2784 * sysdeps/sparc64/Implies: New file.
2785 * sysdeps/sparc64/pt-machine.h: Likewise.
5afdca00
UD
2786
27871997-06-29 00:48 Ulrich Drepper <drepper@cygnus.com>
2788
2789 * semaphore.c: Include spinlock.h at correct place.
2790 Patch by HJ Lu.
2791
27921997-06-13 10:06 Richard Henderson <rth@tamu.edu>
2793
2794 The Great Bit File Move:
2795 * sysdeps/alpha/semaphorebits.h: -> .../bits/semaphore.h.
2796 * sysdeps/powerpc/semaphorebits.h: Likewise.
2797 * sysdeps/pthread/cmpxchg/semaphorebits.h: Likewise.
2798 * sysdeps/pthread/no-cmpxchg/semaphorebits.h: Likewise.
2799 * sysdeps/pthread/libc-lock.h: -> bits/
2800 * sysdeps/pthread/stdio-lock.h: Likewise.
2801 * sysdeps/unix/sysv/linux/local_lim.h: Likewise.
2802 * sysdeps/unix/sysv/linux/posix_opt.h: Likewise.
2803 * semaphore.h: Likewise.
2804 * sysdeps/pthread/pthread.h: Likewise.
2805
2806 * lockfile.c: <foo.h> -> <bits/foo.h>.
2807 * semaphore.h: Likewise.
2808
2809 * Makefile: (headers): foo.h -> bits/foo.h.
2810 * sysdeps/pthread/Makefile: Likewise.
2811
28121997-04-11 01:18 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2813
2814 * semaphore.c (sem_init): Set sem_spinlock only if available.
2815
2816 * sysdeps/m68k/pt-machine.h (testandset, __compare_and_swap): Fix
2817 asm constraints.
2818
28191997-04-09 03:00 Ulrich Drepper <drepper@cygnus.com>
2820
2821 Update from LinuxThreads 0.6.
2822
2823 * attr.c (pthread_attr_getdetachstate): Use __sched_get_priority_max
2824 and __sched_get_priority_min instead of names without `__'.
2825
2826 * manager.c: Rewrite large parts to implement opaque pthread_t.
2827
2828 * cancel.c: Adapt for opaque pthread_t type.
2829 * condvar.c: Likewise.
2830 * errno.c: Likewise.
2831 * join.c: Likewise.
2832 * mutex.c: Likewise.
2833 * pthread.c: Likewise.
2834 * signals.c: Likewise.
2835 * specific.c: Likewise.
2836 * restart.h: Likewise.
2837 * queue.h: Likewise.
2838 * Examples/ex3.c: Likewise.
2839 * Examples/ex4.c: Likewise.
2840 * sysdeps/pthread/pthread.h: Likewise.
2841
2842 * pthread.c: Accumulate time for all threads in thread manager.
2843
2844 * semaphore.c: Implement fallback implementation for architectures
2845 sometimes missing compare-exchange operations.
2846
2847 * cancel.c (pthread_cancel): Validate handle argument.
2848 * join.c (pthread_join): Likewise.
2849 (pthread_detach): Likewise.
2850 * signals.c (pthread_kill): Likewise.
2851
2852 * spinlock.h (acquire): Use __sched_yield not sched_yield.
2853
2854 * queue.h (enqueue): Enqueue thread according to priority.
2855
2856 * internals.c (struct pthread_start_args): New struct for passing
2857 args to cloning function.
2858 (struct _pthread): Rename to _pthread_descr_struct and adapt for
2859 opaque pthread_t.
2860
2861 * Examples/Makefile (clean): Pass -f option to rm.
2862
2863 * sysdeps/i386/pt-machine.h: Add check for compare-exchange instruction
2864 and define TEST_FOR_COMPARE_AND_SWAP.
2865 * sysdeps/i386/i486/pt-machine.h: Removed.
2866
2867 * sysdeps/unix/sysv/linux/local_lim.h (PTHREAD_THREADS_MAX): Increase
2868 to 1024.
2869
28701997-04-04 16:38 Ulrich Drepper <drepper@cygnus.com>
2871
2872 * restart.h (suspend): Clear p_signal before suspending.
2873 (suspend_with_cancellation): Likewise.
2874 Patch by Xavier Leroy <Xavier.Leroy@inria.fr>.
2875
2876 * weaks.c: Make __pthread_key_create return 1.
2877 * sysdeps/pthread/libc-lock.h: Define __libc_key_create,
2878 __libc_getspecific, __libc_setspecific, and __libc_key_t.
2879 * sysdeps/pthread/stdio-lock.h: Don't care for implementation not
2880 using libio.
2881
28821997-03-19 15:13 Miguel de Icaza <miguel@nuclecu.unam.mx>
2883
2884 * sysdeps/sparc/pt-machine (RELEASE): Fix.
2885
28861997-03-01 07:55 Geoff Keating <geoffk@ozemail.com.au>
2887
2888 * sysdeps/powerpc/Implies: Added.
2889 * sysdeps/powerpc/pt-machine.h: Added.
2890 * sysdeps/powerpc/semaphorebits.h: Added.
2891
28921997-01-22 01:22 Ulrich Drepper <drepper@cygnus.com>
2893
d364e525 2894 * pthread.c (__pthread_initial_thread): Correct
5afdca00
UD
2895 initializer.
2896 (__pthread_manager_thread): Likewise.
2897 Reported by Andreas Jaeger.
2898
28991997-01-18 22:15 Richard Henderson <rth@tamu.edu>
2900
2901 Since sigset_t no longer fits in a register, we can't pass in the
2902 thread's initial mask so easily. Take this opportunity to simplify
2903 the clone implementation by only accepting a single void* argument.
2904
d364e525
UD
2905 * manager.c (__pthread_manager): Put thread vitals in the thread
2906 struct instead of as arguments through clone.
5afdca00 2907 (pthread_start_thread): Look for them there.
d364e525 2908 * internals.h (struct _pthread): Add p_initial_fn,
5afdca00 2909 p_initial_fn_arg, p_initial_mask. Fix __pthread_manager proto.
d364e525 2910 * pthread.c (pthread_initialize_manager): Revise clone invocation.
This page took 0.452834 seconds and 5 git commands to generate.