c4236bd74800f7fd1e184bbe5cb04db03c25fa3a
[platform/upstream/glibc.git] / linuxthreads / ChangeLog
1 2000-06-12  Ulrich Drepper  <drepper@redhat.com>
2
3         * Examples/ex6.c: Test return value of pthread_join.
4
5 2000-06-11  Geoff Keating  <geoffk@cygnus.com>
6
7         * sysdeps/powerpc/pspinlock.c (__pthread_spin_lock): Implement.
8         (__pthread_spin_trylock): Implement.
9         (__pthread_spin_unlock): Implement.
10         (__pthread_spin_init): Implement.
11         (__pthread_spin_destroy): Implement.
12
13 2000-06-10  Ulrich Drepper  <drepper@redhat.com>
14
15         * sysdeps/pthread/timer_routines.c (list_append): Little fix to
16         really append the entry.
17
18 2000-06-10  Andreas Jaeger  <aj@suse.de>
19
20         * lockfile.c (__fresetlockfiles): Remove unused variable fp.
21
22 2000-06-10  Kaz Kylheku  <kaz@ashi.footprints.net>
23
24         * sysdeps/pthread/timer_create.c: Thread matching now done on
25         clock type as well as thread attributes.
26         There are individual global signal-delivering threads for
27         different clock types.
28         * sysdeps/pthread/posix-timer.h: Likewise.
29         * sysdeps/pthread/timer_routines.c: Likewise.
30
31         * sysdeps/pthread/timer_routines.c: Thread allocation and
32         deallocation function now remembers to put thread on active
33         list and remove from active list.
34         Thus now the feature of binding multiple timers
35         to a single thread actually works.
36
37 2000-06-10  Ulrich Drepper  <drepper@redhat.com>
38
39         * pthread.c (__pthread_create_2_1): Optimize a bit.
40
41         * internals.h (invalid_handle): Also test for p_terminated != 0.
42         (nonexisting_handle): New function.  Same as old invalid_handle.
43         * join.c (pthread_join): Use nonexisting_handle instead of
44         invalid_handle to test for acceptable thread handle.
45         * manager.c (pthread_handle_free): Likewise.
46         * joinrace.c: New file.
47         Reported by Permaine Cheung <pcheung@cygnus.com>.
48
49 2000-06-08  Ulrich Drepper  <drepper@redhat.com>
50
51         * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
52         Correct handling of matching variable.
53
54         * sysdeps/pthread/tst-timer.c (main): Rewrite initializers to
55         avoid warnings.
56
57         * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
58         Be prepared for empty timer list.
59
60         * sysdeps/pthread/timer_create.c (timer_create): Correct names of
61         CPUTIME clock ID.  Add support for thread clocks.
62
63         * sysdeps/pthread/posix-timer.h (timer_ptr2id): Operands in
64         subtraction were switched.
65
66         * sysdeps/pthread/timer_routines.c (init_module): Use
67         THREAD_MAXNODES threads.
68
69         * sysdeps/pthread/posix-timer.h (struct timer_node): Add creator_pid.
70         * sysdeps/pthread/timer_create.c: Fill in creator_pid.
71         * sysdeps/pthread/timer_routines.c (thread_expire_timer): Send signal
72         with sigqueueinfo is this system call is available.
73
74         * sysdeps/pthread/timer_create.c (timer_create): Allow
75         CLOCK_CPUTIME if _POSIX_CPUTIME is defined.
76
77         * sysdeps/pthread/Makefile: New file.  Add rules to build timer
78         functionality.
79         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add TIMER_MAX.
80
81 2000-06-04  Kaz Kylheku  <kaz@ashi.footprints.net>
82
83         * sysdeps/pthread/posix-timer.h: New file.
84         * sysdeps/pthread/timer_create.c: New file.
85         * sysdeps/pthread/timer_delete.c: New file.
86         * sysdeps/pthread/timer_getoverr.c: New file.
87         * sysdeps/pthread/timer_gettime.c: New file.
88         * sysdeps/pthread/timer_routines.c: New file.
89         * sysdeps/pthread/timer_settime.c: New file.
90         * sysdeps/pthread/tst-timer.c: New file.
91
92 2000-06-08  Ulrich Drepper  <drepper@redhat.com>
93
94         * sysdeps/unix/sysv/linux/bits/local_lim.h: Remove OPEN_MAX and
95         LINK_MAX definitions if necessary.
96
97 2000-06-04  Kaz Kylheku  <kaz@ashi.footprints.net>
98
99         Added missing fork time handling of global libio lock.
100
101         * lockfile.c (__fresetlockfiles): Now also resets the list lock,
102         not just the individual stream locks. Rewritten to use new
103         iterator interface provided by libio rather than accessing
104         global variable.
105
106         * lockfile.c (__flockfilelist, _funlockfilelist): New functions
107         which lock and unlock the stream list using the new interface
108         provied by libio.
109         * internals.h: Likewise.
110
111         * ptfork.c (__fork): Now calls __flockfilelist before fork,
112         and __funlockfilelist in the parent after the fork.
113         Child still calls __fresetlockfiles as before.
114
115         * linuxthreads.texi: Now explains what happens to streams at
116         fork time. Also whole new section on forking and thread added.
117         Definition of pthread_atfork moved out of Miscellaneous Functions
118         to this new section.
119
120 2000-06-04  Jakub Jelinek  <jakub@redhat.com>
121
122         * sysdeps/sparc/sparc32/sparcv9/pspinlock.c (__pthread_spin_lock):
123         Add missing register.
124         * sysdeps/sparc/sparc64/pspinlock.c (__pthread_spin_lock): Likewise.
125
126 2000-06-02  Jakub Jelinek  <jakub@redhat.com>
127
128         * sysdeps/sparc/sparc32/pspinlock.c: Implement spinlocks.
129         * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: New.
130         * sysdeps/sparc/sparc64/pspinlock.c: Implement spinlocks.
131
132 2000-05-31  Andreas Jaeger  <aj@suse.de>
133
134         * sysdeps/mips/pspinlock.c: Implement spinlocks.
135
136 2000-05-28  Ulrich Drepper  <drepper@redhat.com>
137
138         * spinlock.c (__pthread_lock): Remove ASSERT.
139
140         * Makefile (tests): Add ex8.
141         * Examples/ex8.c: New file.
142
143 2000-05-12  Kaz Kylheku  <kaz@ashi.footprints.net>
144
145         Bugfix: The pthread_atfork mechanism now takes care of its
146         own internal mutex at fork time.
147
148         * ptfork.c (__fork): Revised so that the mutex is held across
149         the fork operation and while the handlers are called, and so that
150         the child resets the mutex.
151
152         * linuxthreads.texi: Updated pthread_atfork documentation to make
153         it clear that fork and pthread_atfork can't be reentered from
154         atfork handlers, that pthread_atfork and fork are mutually atomic,
155         and that the handlers are inherited by the child process.
156
157 2000-05-24  Ulrich Drepper  <drepper@redhat.com>
158
159         * Makefile (libpthread-routines): Add pspinlock.
160         * cancel.c: Rename __pthread_spin_unlock back to __pthread_unlock.
161         Use struct _pthread_fastlock instead of pthread_spinlock_t.
162         * condvar.c: Likewise.
163         * internals.h: Likewise.
164         * join.c: Likewise.
165         * manager.c: Likewise.
166         * mutex.c: Likewise.
167         * pthread.c: Likewise.
168         * rwlock.c: Likewise.
169         * semaphore.c: Likewise.
170         * signals.c: Likewise.
171         * spinlock.h: Likewise.
172         * spinlock.c: Likewise.  Remove pthread_spin_lock functions.
173         * sysdeps/alpha/pspinlock.c: New file.
174         * sysdeps/arm/pspinlock.c: New file.
175         * sysdeps/i386/pspinlock.c: New file.
176         * sysdeps/m68k/pspinlock.c: New file.
177         * sysdeps/mips/pspinlock.c: New file.
178         * sysdeps/powerpc/pspinlock.c: New file.
179         * sysdeps/sparc/sparc32/pspinlock.c: New file.
180         * sysdeps/sparc/sparc64/pspinlock.c: New file.
181         * sysdeps/pthread/bits/pthreadtypes.h: Remove pthread_spinlock_t
182         back to _pthread_fastlock.  Define new pthread_spinlock_t.
183
184 2000-05-24  Andreas Jaeger  <aj@suse.de>
185
186         * sysdeps/i386/i686/pt-machine.h: Only use LDT on newer kernels.
187
188 2000-05-21  Jakub Jelinek  <jakub@redhat.com>
189
190         * manager.c (pthread_handle_create): Initialize p_res._sock to -1.
191
192 2000-05-13  Jakub Jelinek  <jakub@redhat.com>
193
194         * internals.h (__RES_PTHREAD_INTERNAL): Define.
195
196 2000-05-06  Kaz Kylheku  <kaz@ashi.footprints.net>
197
198         * mutex.c (pthread_once): IN_PROGRESS state of pthread_once_t
199         object state is represented with additional bits which distinguish
200         whether that state was set up in the current process, or
201         in an ancestor process. If that state was set in an ancestor,
202         it means that a fork happened while thread was executing the init
203         function. In that case, the state is reset to NEVER.
204         * mutex.c (__pthread_once_fork_prepare): New function.
205         (__pthread_once_fork_child): Likewise
206         (__pthread_once_fork_parent): Likewise
207         (__pthread_reset_pthread_once): Removed.
208         * ptfork.c (__fork): Call new handlers in mutex.c.
209         * internals.h: Declarations of new mutex.c functions added.
210         Declaration of removed function deleted.
211         * linuxthreads.texi: Updated documentation about pthread_once
212         to clarify what happens under cancellation and forking.
213
214 2000-05-06  Kaz Kylheku  <kaz@ashi.footprints.net>
215
216         * internals.h: New thread manager request type, REQ_KICK.
217         * join.c (pthread_exit): main thread now calls exit() instead
218         of _exit() in order to proper process cleanup.
219         * manager.c (__pthread_manager): Do not terminate manager
220         after unblocking main thread; wait for main thread's
221         REQ_PROCESS_EXIT request instead.
222         Also, added REQ_KICK case to handle new request; this just does
223         nothing.
224         * manager.c (pthread_exited): Do not terminate manager after
225         unblocking main thread.
226         * manager.c (__pthread_manager_sighandler): If the main thread
227         is waiting for all other threads to die, send a REQ_KICK into
228         the thread manager request pipe to get it to clean out the threads
229         and unblock the main thread as soon as possible. This fixes
230         the 2000 millisecond hang on shutdown bug.
231         * Examples/ex7.c: New file, tests shutdown behavior when all threads
232         including the main one call pthread_exit(), or implicitly do so.
233         * Makefile (tests): Add ex7.
234
235 2000-05-05  Andreas Jaeger  <aj@suse.de>
236
237         * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
238         (pthread_getcpuclockid): Correct test for ourselves.
239
240 2000-05-05  Ulrich Drepper  <drepper@redhat.com>
241
242         * internals.h (struct _pthread_descr_struct): Reorganization.
243         Allocate room for 16 pointers at head of the structure for future
244         thread-local data handling.  Move p_self member in this area.
245         * manager.c (pthread_handle_create): Adjust use of p_self.
246         * sysdeps/i386/useldt.h (THREAD_SELF): Likewise.
247         * pthread.c (__pthread_initial_thread): Adjust initialization.
248         (__pthread_manager_thread): Likewise.
249
250 2000-04-29  Bruno Haible  <haible@clisp.cons.org>
251
252         * join.c (pthread_exit): Use THREAD_GETMEM_NC instead of THREAD_GETMEM
253         for eventmask larger than 1 word.
254
255 2000-04-27  Ulrich Drepper  <drepper@redhat.com>
256
257         * Versions [libpthread] (GLIBC_2.2): Add __pthread_initialize_minimal.
258         * pthread.c (__pthread_initialize_minimal): New function.  Perform
259         minimal initialization.
260         (pthread_initialize): Remove this code here.
261         * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h" again.  We
262         are working around the problem in glibc.
263
264 2000-04-25  Ulrich Drepper  <drepper@redhat.com>
265
266         * sysdeps/i386/i686/pt-machine.h: Do not use "../useldt.h" for
267         now.  First gcc must be fixed (more concrete: libgcc).
268
269 2000-04-24  Ulrich Drepper  <drepper@redhat.com>
270
271         * pthread.c: Remove special treatement for interrupt handlers on x86.
272         * manager.c (pthread_free): Use FREE_THREAD not FREE_THREAD_SELF.
273         * sysdeps/i386/useldt.h: Use "q" constraint instead of "r" where
274         necessary.
275         * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h".
276
277 2000-04-24  Mark Kettenis  <kettenis@gnu.org>
278
279         * join.c (pthread_exit): Set p_terminated after reporting the
280         termination event instead of before.
281
282 2000-04-20  Jakub Jelinek  <jakub@redhat.com>
283
284         * sysdeps/pthread/bits/libc-lock.h: Only declare __pthread_rwlock_*
285         if __USE_UNIX98.
286
287 2000-04-18  Andreas Jaeger  <aj@suse.de>
288
289         * Versions: Use ld instead of ld.so.
290
291 2000-04-18  Jakub Jelinek  <jakub@redhat.com>
292
293         * sysdeps/unix/sysv/linux/sparc/bits/sigcontext.h (struct sigcontext):
294         Remove the typedef keyword.
295
296 2000-04-18  Jakub Jelinek  <jakub@redhat.com>
297
298         * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Use membar,
299         not stbar.
300         (READ_MEMORY_BARRIER): Define.
301         * spinlock.c (__pthread_spin_unlock): Use READ_MEMORY_BARRIER, not
302         MEMORY_BARRIER.
303         * internals.h (READ_MEMORY_BARRIER): Define if not defined in sysdep
304         headers.
305
306 2000-04-17  Ulrich Drepper  <drepper@redhat.com>
307
308         * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
309         (pthread_getcpuclockid): Don't compare thread_id with thread_self,
310         use thread_handle().
311
312 2000-04-16  Ulrich Drepper  <drepper@redhat.com>
313
314         * condvar.c (pthread_cond_timedwait_relative): Don't test for owner
315         if fast mutex is used.  Don't initialize `already_canceled' twice.
316         Correctly test for return value of timedsuspend.
317
318         * pthread.c: Correct long-time braino.  We never set SA_SIGINFO and
319         therefore don't need the _rt versions of the signal handlers.
320
321 2000-04-15  Ulrich Drepper  <drepper@redhat.com>
322
323         * pthread.c (pthread_yield): New function.
324         * sysdeps/pthread/pthread.h (pthread_yield): Add prototype.
325         * Versions [libpthread] (GLIBC_2.2): Add pthread_yield.
326         * internals.h: Declare __pthread_yield.
327
328         * pthread.c (pthread_initialize): Avoid a bit more code if
329         realtime signals are known to exist.
330
331         * pthread.c: Is __ASSUME_REALTIME_SIGNALS then avoid generating code
332         to dynamically detect RT signals and avoid generating compatibility
333         functions with old kernel.
334         * restart.h (restart) [__ASSUME_REALTIME_SIGNALS]: Use
335         __pthread_restart_new directly.
336         (suspend) [__ASSUME_REALTIME_SIGNALS]: Use
337         __pthread_wait_for_restart_signal directly.
338         (timedsuspend) [__ASSUME_REALTIME_SIGNALS]: Use
339         __pthread_timedsuspend_new directly.
340
341 2000-04-15  Ulrich Drepper  <drepper@redhat.com>
342
343         * condvar.c: Remove all the special code to handle cond_timedwait.
344         Use timedsuspend instead.
345         * internals.h: Declare __pthread_timedsuspend_old,
346         __pthread_timedsuspend_new, and __pthread_timedsuspend.
347         Remove declaration of __pthread_init_condvar.
348         * pthread.c: Define __pthread_timedsuspend variable.
349         (__pthread_timedsuspend_old): New function.  Timed suspension
350         implementation for old Linux kernels.
351         (__pthread_timedsuspend_new): New function.  Timed suspension
352         implementation for new Linux kernels.
353         * restart.h (timedsuspend): New function.  Call appropriate
354         suspension function through __pthread_timedsuspend.
355         * semaphore.c (sem_timedwait): Use timedsuspend, don't duplicate
356         the code.
357         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
358
359         * internals.h (WRITE_MEMORY_BARRIER): Define as MEMORY_BARRIER if
360         undefined.
361         * spinlock.c: Use WRITE_MEMORY_BARRIER instead of MEMORY_BARRIER
362         where possible.
363         * sysdeps/alpha/pt-machine.h: Define WRITE_MEMORY_BARRIER.
364         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
365
366         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _POSIX_SPAWN.
367         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
368
369 2000-04-14  Andreas Jaeger  <aj@suse.de>
370
371         * weaks.c: Fix typo.
372
373         * shlib-versions (mips.*-.*-linux.*): Support only GLIBC 2.0 and
374         2.2 for linuxthreads.
375
376 2000-04-13  Ulrich Drepper  <drepper@redhat.com>
377
378         * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
379         (pthread_getcpuclockid): Fix typo.
380
381 2000-04-12  Ulrich Drepper  <drepper@redhat.com>
382
383         * Makefile (libpthread-routines): Add getcpuclockid.
384         * Versions [libpthread] (GLIBC_2.2): Add pthread_getcpuclockid.
385         * sysdeps/pthread/getcpuclockid.c: New file.
386         * sysdeps/unix/sysv/linux/i386/getcpuclockid.c: New file.
387         * sysdeps/pthread/pthread.h: Add prototype for pthread_getcpuclockid.
388
389         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_SPIN_LOCKS):
390         Defined.
391         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
392
393         * sysdeps/pthread/pthread.h: Add prototypes for pthread_spin_init,
394         pthread_spin_destroy, pthread_spin_lock, pthread_spin_trylock,
395         and pthread_spin_unlock.
396         * sysdeps/pthread/bits/pthreadtypes.h: Change struct _pthread_fastlock
397         into pthread_spinlock_t.  Change all uses.
398         * spinlock.c: Implement pthread_spin_lock.
399         Rename __pthread_unlock to __pthread_spin_unlock and define weak
400         alias for real name.
401         Define pthread_spin_trylock, pthread_spin_init, and
402         pthread_spin_destroy.
403         Change all uses of _pthread_fastlock to pthread_spinlock_t.
404         * spinlock.h: Rename __pthread_unlock to __pthread_spin_unlock.
405         Change all uses of _pthread_fastlock to pthread_spinlock_t.
406         * Versions [libpthread] (GLIBC_2.2): Add pthread_spin_init,
407         pthread_spin_destroy, pthread_spin_lock, pthread_spin_trylock,
408         and pthread_spin_unlock.
409         * cancel.c: Use __pthread_spin_unlock instead of __pthread_unlock.
410         Change all uses of _pthread_fastlock to pthread_spinlock_t.
411         * condvar.c: Likewise.
412         * internals.h: Likewise.
413         * join.c: Likewise.
414         * manager.c: Likewise.
415         * mutex.c: Likewise.
416         * pthread.c: Likewise.
417         * rwlock.c: Likewise.
418         * semaphore.c: Likewise.
419         * signals.c: Likewise.
420
421         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add various new POSIX
422         macros.
423         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
424
425 2000-04-11  Ulrich Drepper  <drepper@redhat.com>
426
427         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add
428         _POSIX_SHARED_MEMORY_OBJECTS.
429
430 2000-04-11  Andreas Jaeger  <aj@suse.de>
431
432         * sysdeps/mips/pt-machine.h (MEMORY_BARRIER): Define.
433         (__compare_and_swap): Mark as modifying memory.
434
435 2000-04-11  Geoff Keating  <geoffk@cygnus.com>
436
437         * sysdeps/powerpc/pt-machine.h (MEMORY_BARRIER): Don't be
438         __volatile__.
439         (__compare_and_swap): Replace other 'sync' with MEMORY_BARRIER.
440         Don't have the 'asm' __volatile__.
441
442 2000-04-11  Ulrich Drepper  <drepper@redhat.com>
443
444         * internals.h: Define MEMORY_BARRIER as empty if not defined already.
445         * spinlock.c (__pthread_lock): Add memory barriers.
446         (__pthread_unlock): Likewise.
447         * sysdeps/alpha/pt-machine.h (MEMORY_BARRIER): Define using mb
448         instruction.
449         (RELEASE): Not needed anymore.
450         (__compare_and_swap): Mark asm as modifying memory.
451         * sysdeps/powerpc/pt-machine.h (sync): Remove.  Replace with definition
452         of MEMORY_BARRIER.
453         (__compare_and_swap): Use MEMORY_BARRIER instead of sync.
454         * sysdeps/sparc/sparc32/pt-machine.h (RELEASE): Not needed anymore.
455         (MEMORY_BARRIER): Define using stbar.
456         * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Define using
457         stbar.
458         (__compare_and_swap): Use MEMORY_BARRIER to ensure ordering.
459         Patch by Xavier Leroy <Xavier.Leroy@inria.fr> based on comments by
460         Mike Burrows <m3b@pa.dec.com>.
461
462 2000-04-09  Ulrich Drepper  <drepper@redhat.com>
463
464         * signals.c (sigaction): Fix return value for the case SIG is one
465         of the signals the implementation uses.
466         Patch by Xavier.Leroy@inria.fr.
467
468 2000-04-01  Andreas Jaeger  <aj@suse.de>
469
470         * attr.c: Use shlib-compat macros.
471         * oldsemaphore.c: Likewise.
472         * pthread.c: Likewise.
473         * weaks.c: Likewise.
474
475 2000-03-26  Ulrich Drepper  <drepper@redhat.com>
476
477         * semaphore.c (sem_timedwait): New function.
478         Patch by Carl Mailloux <carlm@oricom.ca>.
479         * semaphore.h: Declare sem_timedwait.
480         * Versions [libpthread] (GLIBC_2.2): Add sem_timedwait.
481
482 2000-03-26  Roland McGrath  <roland@baalperazim.frob.com>
483
484         * sysdeps/pthread/Makefile: File removed.
485
486 2000-03-23  Ulrich Drepper  <drepper@redhat.com>
487
488         * mutex.c (__pthread_reset_pthread_once): Reset once_masterlock.
489         * internals.h (__pthread_reset_pthread_once): Add prototype.
490         * ptfork.c (__fork): Call __pthread_reset_pthread_once.
491
492         * manager.c (pthread_handle_create): Store ID of new thread before
493         clone call.
494
495 2000-03-21  Ulrich Drepper  <drepper@redhat.com>
496
497         * attr.c: Use new macros from shlib-compat.h to define versions.
498         * oldsemaphore.c: Likewise.
499         * semaphore.c: Likewise.
500         * weaks.c: Likewise.
501
502         * pthread.c: Update for new SHLIB_COMPAT definition.
503
504         * manager.c (__pthread_manager): Unmask debug signal.
505
506         * pthread.c (pthread_initialize): Test for address of __dso_handle
507         being NULL, not value.  Use __on_exit, not on_exit.
508         Patch by Andreas Jaeger <aj@suse.de>.
509
510         * pthread.c: Use new macros from shlib-compat.h to define versions.
511
512 2000-03-19  Ulrich Drepper  <drepper@redhat.com>
513
514         * pthread.c (pthread_initialize): Instead of on_exit use
515         __cxa_atexit if __dso_label is available to allow unloading the
516         libpthread shared library.
517
518 2000-03-16  Ulrich Drepper  <drepper@redhat.com>
519
520         * condvar.c: Make tests for ownership of mutex less strict.
521
522 2000-03-14  Ulrich Drepper  <drepper@redhat.com>
523
524         * condvar.c (pthread_cond_wait): Check whether mutex is owned by
525         current thread and return error if not.
526         (pthread_cond_timedwait_relative_old): Likewise.
527         (pthread_cond_timedwait_relative_new): Likewise.
528
529         * mutex.c (__pthread_once): Handle cancelled init function correctly.
530         (pthread_once_cancelhandler): New function.
531         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
532
533 2000-03-14  Andreas Jaeger  <aj@suse.de>
534
535         * pthread.c (pthread_handle_sigcancel_rt): GS has been renamed to
536         REG_GS.
537         (pthread_handle_sigrestart_rt): Likewise.
538         * signals.c (pthread_sighandler_rt): Likewise.
539
540 2000-03-02  Andreas Jaeger  <aj@suse.de>
541
542         * sysdeps/pthread/bits/libc-lock.h: Fix typo.
543         Reported by Sean Chen <sean.chen@turbolinux.com>.
544
545 2000-02-28  Andreas Jaeger  <aj@suse.de>
546
547         * rwlock.c: Fix typo.
548
549 2000-02-27  Ulrich Drepper  <drepper@redhat.com>
550
551         * rwlock.c: Define __* variants of the functions and make old names
552         aliases.
553         * Versions [GLIBC_2.2]: Export the __pthread_rwlock_* functions.
554         * sysdeps/pthread/bits/libc-lock.h: Define __libc_rwlock_* macros.
555
556 2000-02-25  Andreas Jaeger  <aj@suse.de>
557
558         * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
559         pwrite64, lseek64, open64, and __open64 with version 2.2.
560
561 2000-02-22  Ulrich Drepper  <drepper@redhat.com>
562
563         * semaphore.h (SEM_FAILED): Use 0 not NULL.
564
565 2000-02-14  Ulrich Drepper  <drepper@redhat.com>
566
567         * condvar.c (pthread_cond_timedwait_relative_old): Tight loop with
568         nanosleep does not work either.  Get absolute time inside the
569         loop.
570         (pthread_cond_timedwait_relative_new): Likewise.
571         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
572
573 2000-02-13  Andreas Jaeger  <aj@suse.de>
574
575         * condvar.c (pthread_cond_timedwait_relative_new): Fix last patch.
576         (pthread_cond_timedwait_relative_old): Likewise.
577
578 2000-02-13  Ulrich Drepper  <drepper@redhat.com>
579
580         * condvar.c (pthread_cond_timedwait_relative_old): Undo last patch
581         but keep the code around.  A bug in the kernel prevent us from
582         using the code.
583         (pthread_cond_timedwait_relative_new): Likewise.
584         (PR libc/1597 and libc/1598).
585
586 2000-02-01  Kaz Kylheku  <kaz@ashi.footprints.net>
587
588         * condvar.c (pthread_cond_timedwait_relative_old): Do tight
589         loop around nanosleep calls instead of around most of the function
590         (pthread_cond_timedwait_relative_new): Likewise.
591         body.  Got rid of backwards goto and one local.
592
593 2000-01-31  Ulrich Drepper  <drepper@redhat.com>
594
595         * condvar.c (pthread_cond_timedwait_relative_old): Recompute time
596         before every nanosleep call to account for time spent in the rest
597         of the function.
598         (pthread_cond_timedwait_relative_new): Likewise.
599         Patch by khendricks@ivey.uwo.ca (PR libc/1564).
600
601 2000-01-29  Ulrich Drepper  <drepper@redhat.com>
602
603         * condvar.c (pthread_cond_timedwait_relative_old): Get remaining time
604         from nanosleep call so that in case we restart we only wait for the
605         remaining time.
606         (pthread_cond_timedwait_relative_new): Likewise.
607         Patch by khendricks@ivey.uwo.ca (PR libc/1561).
608
609 2000-01-18  Ulrich Drepper  <drepper@cygnus.com>
610
611         * manager.c (pthread_allocate_stack): Compute guard page address
612         correctly.  Patch by HJ Lu.
613
614         * sysdeps/pthread/pthread.h: Define
615         PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP.
616
617 2000-01-16  Ulrich Drepper  <drepper@cygnus.com>
618
619         * rwlock.c (pthread_rwlock_unlock): Correct one more problem with
620         preference handling.
621         (pthread_rwlockattr_setkind_np): Allow
622         PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP.
623         Patches by Kaz Kylheku <kaz@ashi.footprints.net>.
624
625 2000-01-12  Ulrich Drepper  <drepper@cygnus.com>
626
627         * internals.h (pthread_readlock_info): New structure.
628         (_pthread_descr_struct): Add p_readlock_list, p_readlock_free, and
629         p_untracked_readlock_count.
630         * pthread.c (__pthread_initial_thread, pthread_manager_thread):
631         Add initializers for new fields.
632         * manager.c (pthread_free): Free read/write lock lists.
633         * queue.h (queue_is_empty): New function.
634         * rwlock.c: Implement requirements about when readers should get
635         locks assigned.
636         * sysdeps/pthread/pthread.h
637         (PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP): New definition.
638         * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_rwlock_t):
639         Define this name as well.
640         Patches by Kaz Kylheku <kaz@ashi.footprints.net>.
641
642 2000-01-05  Ulrich Drepper  <drepper@cygnus.com>
643
644         * pthread.c (__pthread_initial_thread, pthread_manager_thread):
645         Adjust initializers for struct _pthread_descr_struct change.
646         * internals.h (struct _pthread_descr_struct): Move new elements to
647         the end.
648
649 2000-01-03  Kaz Kylheku  <kaz@ashi.footprints.net>
650
651         Redesigned how cancellation unblocks a thread from internal
652         cancellation points (sem_wait, pthread_join,
653         pthread_cond_{wait,timedwait}).
654         Cancellation won't eat a signal in any of these functions
655         (*required* by POSIX and Single Unix Spec!).
656         * condvar.c: Spontaneous wakeup on pthread_cond_timedwait won't eat a
657         simultaneous condition variable signal (not required by POSIX
658         or Single Unix Spec, but nice).
659         * spinlock.c: __pthread_lock queues back any received restarts
660         that don't belong to it instead of assuming ownership of lock
661         upon any restart; fastlock can no longer be acquired by two threads
662         simultaneously.
663         * restart.h: Restarts queue even on kernels that don't have
664         queued real time signals (2.0, early 2.1), thanks to atomic counter,
665         avoiding a rare race condition in pthread_cond_timedwait.
666
667 1999-12-31  Andreas Jaeger  <aj@suse.de>
668
669         * internals.h: Remove duplicate prototype declarations.
670
671         * weaks.c: Remove __THROW from prototypes since the file is not
672         compiled by a C++ compiler.
673         * internals.h: Likewise.
674
675 1999-12-30  Andreas Jaeger  <aj@suse.de>
676
677         * sysdeps/pthread/pthread.h: Move internal functions to...
678         * sysdeps/pthread/bits/libc-lock.h: ...here.
679
680 1999-12-29  Andreas Jaeger  <aj@suse.de>
681
682         * sysdeps/pthread/pthread.h: Fix typos, reformat comments.
683
684 1999-12-28  Ulrich Drepper  <drepper@cygnus.com>
685
686         * sysdeps/alpha/pt-machine.h: Move stack_pointer definition to the
687         beginning.
688
689         * manager.c (__pthread_start): Add one more cast to prevent
690         warning on 64bit machines.
691
692 1999-12-21  Ulrich Drepper  <drepper@cygnus.com>
693
694         * manager.c (pthread_handle_create): Set p_pid of new thread
695         before calling the callback function to report a new thread.
696
697 1999-12-20  Andreas Jaeger  <aj@suse.de>
698
699         * pthread.c (pthread_initialize): Move getrlimit call after
700         setting of errno.
701
702 1999-12-18  Ulrich Drepper  <drepper@cygnus.com>
703
704         * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
705         pwrite64, lseek64, open64, and __open64.
706         * wrapsyscall.c: Define pread, __pread64, pread64, pwrite, __pwrite64,
707         pwrite64, lseek64, open64, and __open64.
708
709         * manager.c (pthread_allocate_stack): Correct computation of
710         new_thread_bottom.  Correct handling of stack size and when the
711         rlimit method to guard for stack growth is used.
712         * pthread.c (pthread_initialize): Stack limit must be STACK_SIZE
713         minus one pagesize (not two).
714
715 1999-12-03  Andreas Jaeger  <aj@suse.de>
716
717         * Versions: Add __res_state with version GLIBC_2.2.
718
719         * errno.c (__res_state): New function to return thread specific
720         resolver state.
721
722         * pthread.c (pthread_initialize): Initialize p_resp.
723         (__pthread_reset_main_thread): Also set p_resp.
724
725         * manager.c (pthread_handle_create): Initialize p_resp.
726
727         * internals.h: Add thread specific resolver state.
728         Based on patches by Adam D. Bradley <artdodge@cs.bu.edu>.
729
730 1999-12-01  Ulrich Drepper  <drepper@cygnus.com>
731
732         * sysdeps/i386/pt-machine.h: Move stack_pointer definition to the
733         beginning.
734         * sysdeps/i386/i686/pt-machine.h: Likewise.
735         Patches by Alan Modra <alan@SPRI.Levels.UniSA.Edu.Au>.
736
737 1999-11-23  Ulrich Drepper  <drepper@cygnus.com>
738
739         * manager.c (pthread_start_thread_event): Initialize p_pid already
740         here.
741
742 1999-11-22  Ulrich Drepper  <drepper@cygnus.com>
743
744         * internals.h: Add prototype for __pthread_manager_event.
745         * manager.c (__pthread_manager_event): New function.
746         (pthread_start_thread_event): Correct computation of self.
747         Use INIT_THREAD_SELF.
748         * pthread.c (__pthread_manager_thread): Initialize p_lock.
749         (__pthread_initialize_manager): Respect event flags also for creation
750         of the manager thread.
751
752 1999-11-08  Ulrich Drepper  <drepper@cygnus.com>
753
754         * pthread.c (__pthread_initialize_manager): Initialize
755         __pthread_manager_thread.p_tid.
756
757 1999-11-02  Ulrich Drepper  <drepper@cygnus.com>
758
759         * internals.h: Declare __pthread_last_event.
760         * manager.c: Define __pthread_last_event.
761         (pthread_handle_create): Set __pthread_last_event.
762         (pthread_exited): Likewise.
763         * join.c (pthread_exit): Likewise.
764
765         * Makefile (libpthread-routines): Add events.
766         * events.c: New file.
767         * internals.h: Protect against multiple inclusion.
768         Include thread_dbP.h header.
769         (struct _pthread_descr_struct): Add new fields p_report_events and
770         p_eventbuf.
771         Declare event reporting functions.
772         * join.c (pthread_exit): Signal event if this is wanted.
773         * manager.c (__pthread_threads_events): New variable.
774         (pthread_handle_create): Take new parameters with event information.
775         Signal TD_CREATE event if wanted.
776         (__pthread_manager): Adjust pthread_handle_create call.
777         (pthread_start_thread_event): New function.  Block until manager is
778         finished and then call pthread_start_thread.
779         (pthread_exited): Signal TD_REAP event if wanted.
780
781 1999-10-26  Ulrich Drepper  <drepper@cygnus.com>
782
783         * restart.h (suspend_with_cancellation): Rewrite as a macro.
784
785         * condvar.c (pthread_cond_timedwait_relative): Don't mark as inline.
786
787 1999-10-25  Andreas Jaeger  <aj@suse.de>
788
789         * internals.h: Remove K&R compatibility.
790         * no-tsd.c: Likewise.
791         * semaphore.h: Likewise.
792         * signals.c: Likewise.
793         * sysdeps/pthread/bits/libc-tsd.h: Likewise.
794         * sysdeps/unix/sysv/linux/bits/sigthread.h: Likewise.
795         * weaks.c: Likewise.
796
797 1999-10-21  Xavier Leroy  <Xavier.Leroy@inria.fr>
798
799         * linuxthreads/pthread.c: For i386, wrap pthread_handle_sigrestart
800         and pthread_handle_sigcancel with functions that restore
801         %gs from the signal context.  For each signal handling function,
802         two wrappers are required, one for a non-RT signal and one for
803         a RT signal.
804         * linuxthreads/signal.c: For i386, add code to restore %gs
805         from the signal context in pthread_sighandler and
806         pthread_sighandler_rt.
807
808 1999-10-17  Ulrich Drepper  <drepper@cygnus.com>
809
810         * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add cast.
811
812 1999-10-14  Ulrich Drepper  <drepper@cygnus.com>
813
814         * pthread.c (__pthread_initial_thread): Pass argument to
815         PTHREAD_START_ARGS_INITIALIZER.
816         (__pthread_manager_thread): Likewise.
817
818         * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add parameter to
819         initialize function.
820
821         * manager.c (pthread_handle_create): Remove p_startfct initialization.
822
823         * internals.h (_pthread_descr_struct): We don't need p_startfct field.
824
825 1999-10-12  Ulrich Drepper  <drepper@cygnus.com>
826
827         * internals.h: Correct return types for __libc_read and __libc_write.
828
829 1999-10-09  Andreas Jaeger  <aj@suse.de>
830
831         * internals.h: Add __new_sem_post to get prototype in
832         manager.c; include semaphore.h for needed types.
833
834 1999-10-08  Ulrich Drepper  <drepper@cygnus.com>
835
836         * manager.c (__pthread_manager) [REQ_POST]: Use __new_sem_post
837         directly instead of calling sem_post which should not be necessary
838         but is faster and might help in some case to work around problems.
839         Patch by khendricks@ivey.uwo.ca [libc/1382].
840
841 1999-10-08  Andreas Schwab  <schwab@suse.de>
842
843         * sysdeps/pthread/Subdirs: New file.
844         * Implies: Removed.
845
846 1999-10-07  Ulrich Drepper  <drepper@cygnus.com>
847
848         * Implies: New file.
849         * internals.h (struct _pthread_descr_struct): Add p_startfct.
850         * manager.c (pthread_handle_create): Initialize p_startfct.
851         * pthread.c: Define __linuxthread_pthread_sizeof_descr variable.
852
853 1999-09-25  Ulrich Drepper  <drepper@cygnus.com>
854
855         * manager.c (__linuxthreads_pthread_threads_max): New variable.
856         * specific.c (__linuxthreads_pthread_keys_max): New variable.
857         (__linuxthreads_pthread_key_2ndlevel_size): New variable.
858
859         * condvar.c (pthread_cond_timedwait_relative): Never return with
860         EINTR.  Patch by Andreas Schwab.
861
862 1999-09-19  Ulrich Drepper  <drepper@cygnus.com>
863
864         * signals.c (sigaction): Correct last patch.  Don't select
865         pthread_sighandler_rt based on the signal number but instead of
866         the SA_SIGINFO flag.
867
868 1999-09-23  Ulrich Drepper  <drepper@cygnus.com>
869
870         * specific.c: Move definitions of struct pthread_key_struct and
871         destr_function to ...
872         * internals.h: ...here.
873
874 1999-09-18  Ulrich Drepper  <drepper@cygnus.com>
875
876         * pthread.c (pthread_handle_sigrestart_rt): New function.  Use
877         this instead of pthread_handle_sigrestart if the signal is an RT
878         signal.
879
880         * signals.c: Handle passing through of sighandler arguments also
881         for real-time signals.
882
883 1999-09-03  Andreas Schwab  <schwab@suse.de>
884
885         * ptfork.c (__fork): Renamed from fork and use __libc_fork.  Add
886         fork as weak alias.
887         (__vfork): New function, alias vfork.
888         * Versions: Export __fork, vfork, and __vfork in libpthread.
889
890 1999-08-23  Andreas Schwab  <schwab@suse.de>
891
892         * signals.c (pthread_sighandler): Add SIGCONTEXT_EXTRA_ARGS to
893         call to signal handler.
894
895 1999-08-20  Ulrich Drepper  <drepper@cygnus.com>
896
897         * pthread.c (__pthread_reset_main_thread): Undo last change.
898         (__pthread_kill_other_threads_np): Reset signal handlers for the
899         signals we used in the thread implementation here.
900
901 1999-08-19  Ulrich Drepper  <drepper@cygnus.com>
902
903         * pthread.c (__pthread_reset_main_thread): Reset signal handlers
904         for the signals we used in the thread implementation [PR libc/1234].
905
906         * Versions: Export __pthread_kill_other_threads_np from libpthread
907         for GLIBC_2.1.2.
908
909         * signals.c: Pass sigcontext through wrapper to the user function.
910
911 1999-08-01  Ulrich Drepper  <drepper@cygnus.com>
912
913         * Versions [ld.so] (GLIBC_2.0): Export __libc_internal_tsd_get and
914         __libc_internal_tsd_set.
915
916 1999-07-29  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
917
918         * manager.c: Remove inclusion of <linux/tasks.h> since it's not
919         needed anymore.
920
921 1999-07-16  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
922
923         * internals.h: Align _pthread_descr_struct to 32 bytes.
924         Reported by Tim Hockin <thockin@cobaltnet.com>, close PR
925         libc/1206.
926
927 1999-07-09  Ulrich Drepper  <drepper@cygnus.com>
928
929         * oldsemaphore.c (sem_compare_and_swap): Fix use of compare and
930         swap function.
931
932 1999-07-09  Cristian Gafton  <gafton@redhat.com>
933
934         * Makefile (libpthread-routines): Add oldsemaphore routine.
935         * Versions: Add sem_destroy, sem_getvalue, sem_init, sem_post,
936         sem_trywait, and sem_wait to GLIBC_2.1.
937         * oldsemaphore.c: New file.
938         * semaphore.c: Add default_symbol_versions for the changed functions.
939         (__new_sem_init): Rename from sem_init.
940         (__new_sem_post): Rename from sem_post.
941         (__new_sem_wait): Rename from sem_wait.
942         (__new_sem_trywait): Rename from sem_trywait.
943         (__new_sem_getvalue): Rename from sem_getvalue.
944         (__new_sem_destroy): Rename from sem_destroy.
945
946 1999-06-23  Robey Pointer  <robey@netscape.com>
947
948         * internals.h: Added p_nextlock entry to separate queueing for a
949         lock from queueing for a CV (sometimes a thread queues on a lock
950         to serialize removing itself from a CV queue).
951         * pthread.c: Added p_nextlock to initializers.
952         * spinlock.c: Changed to use p_nextlock instead of p_nextwaiting.
953
954 1999-07-09  Ulrich Drepper  <drepper@cygnus.com>
955
956         * manager.c (pthread_handle_create): Free mmap region after stack
957         if clone failed.  Patch by Kaz Kylheku <kaz@ashi.FootPrints.net>.
958
959 1999-05-23  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
960
961         * man/pthread_cond_init.man: Correct example.
962         Reported by Tomas Berndtsson <tomas@nocrew.org>.
963
964         * linuxthreads.texi (Condition Variables): Likewise.
965
966 1999-05-18  Jakub Jelinek  <jj@ultra.linux.cz>
967
968         * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): Use
969         casx not cas, also successful casx returns the old value in rd
970         and not the new value.
971
972 1999-05-16  Xavier Leroy  <Xavier.Leroy@inria.fr>
973
974         * manager.c: If pthread_create() is given a NULL attribute
975         and the thread manager runs with a realtime policy, set the
976         scheduling policy of the newly created thread back to SCHED_OTHER.
977         * manager.c: If the PTHREAD_INHERIT_SCHED attribute is given,
978         initialize the schedpolicy field of new_thread->p_start_args
979         to that of the calling thread.
980
981 1999-04-29  Ulrich Drepper  <drepper@cygnus.com>
982
983         * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): cas
984         instruction does not allow memory element to use offset.
985
986 1999-04-28  Ulrich Drepper  <drepper@cygnus.com>
987
988         * manager.c (pthread_allocate_stack): Optimize initialization of new
989         thread descriptor.
990
991         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_define_initialized):
992         Don't use initializer since it is all zeroes.
993         (__libc_once_define): Likewise.
994
995 1999-04-16  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
996
997         * sysdeps/arm/Implies: Removed since cmpxchg/no-cmpxchg
998         doesn't exist anymore.
999         * sysdeps/i386/Implies: Likewise.
1000         * sysdeps/m68k/Implies: Likewise.
1001         * sysdeps/mips/Implies: Likewise.
1002         * sysdeps/powerpc/Implies: Likewise.
1003         * sysdeps/sparc/sparc32/Implies: Likewise.
1004         * sysdeps/sparc/sparc64/Implies: Likewise.
1005
1006 1999-04-15  Ulrich Drepper  <drepper@cygnus.com>
1007
1008         * sysdeps/alpha/bits/semaphore.h: Removed.
1009         * sysdeps/powerpc/bits/semaphore.h: Removed.
1010         * sysdeps/pthread/cmpxchg/bits/semaphore.h: Removed.
1011         * sysdeps/pthread/no-cmpxchg/bits/semaphore.h: Removed.
1012         * Makefile (headers): Remove bits/semaphore.h.
1013
1014         * semaphore.h: Define _pthread_descr if necessary.
1015         Don't include limits.h.  Define SEM_VALUE_MAX directly.
1016         Define SEM_FAILED.
1017         (sem_t): Protect element names with leading __.
1018         Add declarations for sem_close, sem_open, and sem_unlink.
1019         * semaphore.c: Adjust all functions for new element names.
1020         Define sem_close, sem_open, and sem_unlink.
1021         * Versions (libthread): Add sem_close, sem_open, and sem_unlink for
1022         GLIBC_2.1.1.
1023         * sysdeps/pthread/bits/pthreadtypes.h: Define _pthread_descr only if
1024         necessary.
1025
1026 1999-03-16  H.J. Lu  <hjl@gnu.org>
1027
1028         * specific.c (pthread_key_delete): Check th->p_terminated to see
1029         if the thread is running.
1030
1031         * Versions (__libc_internal_tsd_get, __libc_internal_tsd_set):
1032         Added to GLIBC_2.0 for libc.so.
1033
1034 1999-02-12  H.J. Lu  <hjl@gnu.org>
1035
1036         * Versions (__libc_current_sigrtmin, __libc_current_sigrtmax,
1037         __libc_allocate_rtsig): Added to GLIBC_2.1.
1038
1039         * internals.h (DEFAULT_SIG_RESTART): Removed.
1040         (DEFAULT_SIG_CANCEL): Removed.
1041
1042         * pthread.c (init_rtsigs, __libc_current_sigrtmin,
1043         __libc_current_sigrtmax, __libc_allocate_rtsig): New functions.
1044         (__pthread_sig_restart, __pthread_sig_cancel,
1045         __pthread_sig_debug): Initialized.
1046         (pthread_initialize): Call init_rtsigs () to initialize
1047         real-time signals.
1048
1049 1999-02-03  H.J. Lu  <hjl@gnu.org>
1050
1051         * manager.c (__pthread_manager): Do block __pthread_sig_debug.
1052         Don't restart the thread which sent REQ_DEBUG.
1053         (pthread_start_thread): Check if __pthread_sig_debug > 0
1054         before debugging.
1055
1056         * pthread.c (__pthread_initialize_manager): Suspend ourself
1057         after sending __pthread_sig_debug to gdb instead of
1058         __pthread_sig_cancel.
1059
1060 1999-01-24  H.J. Lu  <hjl@gnu.org>
1061
1062         * manager.c (__pthread_manager): Delete __pthread_sig_debug
1063         from mask if __pthread_sig_debug > 0.
1064         (pthread_handle_create): Increment __pthread_handles_num.
1065
1066         * manager.c (pthread_handle_create): Don't pass CLONE_PTRACE to clone.
1067         * pthread.c (__pthread_initialize_manager): Likewise.
1068
1069         * pthread.c (pthread_initialize): Use __libc_allocate_rtsig (1)
1070         instead of __libc_allocate_rtsig (2).
1071         (__pthread_initialize_manager): Send __pthread_sig_debug to gdb
1072         instead of __pthread_sig_cancel.
1073         (pthread_handle_sigdebug): Fix comments.
1074
1075 1999-01-21  Ulrich Drepper  <drepper@cygnus.com>
1076
1077         * manager.c (pthread_allocate_stack): Set
1078         __pthread_nonstandard_stacks if user-specified stack is used.
1079
1080 1999-01-16  Ulrich Drepper  <drepper@cygnus.com>
1081
1082         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _LFS_ASYNCHRONOUS_IO,
1083         _LFS_LARGEFILE, _LFS64_LARGEFILE, and _LFS64_STDIO from Unix98.
1084
1085 1999-01-07  Xavier Leroy  <Xavier.Leroy@inria.fr>
1086
1087         * pthread.c: Use a third signal __pthread_sig_debug distinct
1088         from __pthread_sig_cancel to notify gdb when a thread is
1089         created
1090         * manager.c: Likewise.
1091         * internals.h: Likewise.
1092         * signals.c: The implementation of sigwait(s) assumed that
1093         all signals in s have signal handlers already attached.
1094         This is not required by the standard, so make it work
1095         also if some of the signals have no handlers.
1096
1097 1999-01-05  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
1098
1099         * linuxthreads.texi: Remove pointers from first @node.  Move old
1100         @node spec inside comment.
1101
1102 1998-12-31  Ulrich Drepper  <drepper@cygnus.com>
1103
1104         * sysdeps/pthread/bits/stdio-lock.h: Define _IO_lock_lock and
1105         _IO_lock_unlock.
1106
1107 1998-12-29  Ulrich Drepper  <drepper@cygnus.com>
1108
1109         * semaphore.c (sem_trywait): Don't forget to unlock the semaphore
1110         lock.  Patch by Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>.
1111
1112 1998-12-21  Ulrich Drepper  <drepper@cygnus.com>
1113
1114         * manager.c: Threads now send __pthread_sig_cancel on termination.
1115         Change clone call and signal masks.
1116         * thread.c (pthread_handle_sigrestart): Remove special code for
1117         manager.
1118         (pthread_handle_sigcancel): In manager thread call
1119         __pthread_manager_sighandler.
1120         * sysdeps/i386/pt-machine.h (__compare_and_swap): Add memory clobber.
1121         * sysdeps/i386/i686/pt-machine.h: Likewise.
1122         Patches by Xavier Leroy.
1123
1124 1998-12-14  Ulrich Drepper  <drepper@cygnus.com>
1125
1126         * spinlock.c (__pthread_unlock): Don't crash if called for an
1127         untaken mutex.  Reported by Ruslan V. Brushkoff <rus@Snif.Te.Net.UA>.
1128
1129         * Examples/ex6.c: Unbuffer stdout and reduce sleep time to reduce
1130         overall runtime.
1131
1132 1998-12-13  Ulrich Drepper  <drepper@cygnus.com>
1133
1134         * Examples/ex3.c: Wait until all threads are started before
1135         searching for the number to avoid race condition on very fast
1136         systems.
1137
1138 1998-12-08  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
1139
1140         * sysdeps/pthread/pthread.h: Remove __pthread_setcanceltype
1141         declaration since it's not needed.
1142
1143         * sysdeps/pthread/pthread.h: Move internal functions to ...
1144         * internals.h: ...here.
1145
1146 1998-12-02  H.J. Lu  <hjl@gnu.org>
1147
1148         * pthread.c (__pthread_sig_restart): Initiliaze to 0 if
1149         SIGRTMIN is defined.
1150         (__pthread_sig_cancel): Likewise.
1151
1152 1998-12-01  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
1153
1154         * wrapsyscall.c: Include <sys/mman.h> for msync,
1155         <stdlib.h> for system and <termios.h> for tcdrain prototype.
1156         Correct msync declaration.
1157
1158 1998-11-29  Roland McGrath  <roland@baalperazim.frob.com>
1159
1160         * sysdeps/pthread/bits/libc-tsd.h (__libc_tsd_define, __libc_tsd_get,
1161         __libc_tsd_set): New macros for new interface.
1162         * no-tsd.c: New file, provide uninitialized defns of
1163         __libc_internal_tsd_get and __libc_internal_tsd_set.
1164         * Makefile (routines): Add no-tsd.
1165
1166 1998-10-12  Roland McGrath  <roland@baalperazim.frob.com>
1167
1168         * internals.h: Include <bits/libc-tsd.h>, not <bits/libc-lock.h>.
1169         * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
1170         __libc_internal_tsd_set): Move decls to ...
1171         * sysdeps/pthread/bits/libc-tsd.h: New file for __libc_internal_tsd_*
1172         declarations.
1173
1174         * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
1175         __libc_internal_tsd_set): Make these pointers to functions, not
1176         functions; remove #pragma weak decls for them.
1177         * specific.c (__libc_internal_tsd_get, __libc_internal_tsd_set):
1178         Define static functions and initialized pointers to them.
1179
1180 1998-11-18  Ulrich Drepper  <drepper@cygnus.com>
1181
1182         * Makefile (CFLAGS-mutex.c): Define as -D__NO_WEAK_PTHREAD_ALIASES.
1183         (CFLAGS-specific.c): Likewise.
1184         (CFLAGS-pthread.c): Likewise.
1185         (CFLAGS-ptfork.c): Likewise.
1186         (CFLAGS-cancel.c): Likewise.
1187         * sysdeps/pthread/bits/libc-lock.h: Don't mark __pthread_* functions
1188         as weak references if __NO_WEAK_PTHREAD_ALIASES is defined.
1189
1190         * mutex.c (pthread_mutex_init): Define as strong symbol.
1191         (pthread_mutex_destroy): Likewise.
1192         (pthread_mutex_trylock): Likewise.
1193         (pthread_mutex_lock): Likewise.
1194         (pthread_mutex_unlock): Likewise.
1195         (pthread_mutexattr_init): Likewise.
1196         (pthread_mutexattr_destroy): Likewise.
1197         (pthread_once): Likewise.
1198         * ptfork.c (pthread_atfork): Likewise.
1199         * specific.c (pthread_key_create): Likewise.
1200         (pthread_setspecific): Likewise.
1201         (pthread_getspecific): Likewise.
1202
1203 1998-11-15  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
1204
1205         * linuxthreads.texi: Fix punctuation after xref.
1206
1207 1998-11-10  H.J. Lu  <hjl@gnu.org>
1208
1209         * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine NR_OPEN
1210         if it is defined in <linux/limits.h>.
1211
1212 1998-10-29 14:28  Ulrich Drepper  <drepper@cygnus.com>
1213
1214         * spinlock.h (__pthread_trylock): Define inline.
1215         (__pthread_lock): Add extra parameter to declaration.  Declare
1216         using internal_function.
1217         (__pthread_unlock): Declare using internal_function.
1218         * spinlock.c (__pthread_lock): Add new parameter.  Use it instead
1219         of local variable self.  Avoid recomputing self.  Define using
1220         internal_function.
1221         (__pthread_trylock): Remove.
1222         (__pthread_unlock): Define using internal_function.
1223         * cancel.c: Adjust for __pthread_lock interface change.  Use already
1224         computed self value is possible.
1225         * condvar.c: Likewise.
1226         * join.c: Likewise.
1227         * manager.c: Likewise.
1228         * mutex.c: Likewise.
1229         * pthread.c: Likewise.
1230         * rwlock.c: Likewise.
1231         * semaphore.c: Likewise.
1232         * signals.c: Likewise.
1233
1234 1998-10-27 13:46  Ulrich Drepper  <drepper@cygnus.com>
1235
1236         * sysdeps/pthread/pthread.h (struct _pthread_cleanup_buffer): Prepend
1237         __ to field names of the struct.
1238         * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_fastlock):
1239         Likewise.
1240         (pthread_attr_t): Likewise.
1241         (pthread_cond_t): Likewise.
1242         (pthread_condattr_t): Likewise.
1243         (pthread_mutex_t): Likewise.
1244         (pthread_mutexattr_t): Likewise.
1245         (pthread_rwlock_t): Likewise.
1246         (pthread_rwlockattr_t): Likewise.
1247         * attr.c: Adjust for pthread.h and pthreadtypes.h change.
1248         * cancel.c: Likewise.
1249         * condvar.c: Likewise.
1250         * manager.c: Likewise.
1251         * mutex.c: Likewise.
1252         * pthread.c: Likewise.
1253         * ptlongjmp.c: Likewise.
1254         * rwlock.c: Likewise.
1255         * spinlock.c: Likewise.
1256
1257 1998-10-09  Ulrich Drepper  <drepper@cygnus.com>
1258
1259         * sysdeps/i386/pt-machine.h (get_eflags, set_eflags): Mark these
1260         also with PT_EI.
1261
1262         * sysdeps/i386/i686/pt-machine.h: Remove unused inline
1263         definitions.
1264
1265         * Makefile (libpthread-routines): Add pt-machine.
1266         * pt-machine.c: New file.
1267         * sysdeps/alpha/pt-machine.h: Define PT_EI as extern inline is not
1268         yet defined.  Use PT_EI in extern inline definitions.
1269         * sysdeps/arm/pt-machine.h: Likewise.
1270         * sysdeps/i386/pt-machine.h: Likewise.
1271         * sysdeps/i386/i686/pt-machine.h: Likewise.
1272         * sysdeps/m68k/pt-machine.h: Likewise.
1273         * sysdeps/mips/pt-machine.h: Likewise.
1274         * sysdeps/powerpc/pt-machine.h: Likewise.
1275         * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
1276         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
1277
1278 1998-10-02  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
1279
1280         * semaphore.h: Include <sys/types.h> so that _pthread_descr
1281         is declared.
1282
1283 1998-09-15  David S. Miller  <davem@pierdol.cobaltmicro.com>
1284
1285         * sysdeps/sparc/sparc32/pt-machine.h (INIT_THREAD_SELF): Add nr
1286         argument.
1287         * sysdeps/sparc/sparc64/pt-machine.h (INIT_THREAD_SELF): Likewise.
1288
1289 1998-09-12 14:24 -0400  Zack Weinberg  <zack@rabi.phys.columbia.edu>
1290
1291         * linuxthreads/sysdeps/unix/sysv/linux/bits/sigthread.h: Add
1292         multiple inclusion guard.
1293
1294 1998-09-02 11:08  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
1295
1296         * signals.c (sigaction): Check that sig is less than NSIG to avoid
1297         array index overflow.
1298
1299 1998-09-06 10:56  Ulrich Drepper  <drepper@cygnus.com>
1300
1301         * sysdeps/pthread/semaphore.h: New file.
1302
1303 1998-09-06 09:08  Ulrich Drepper  <drepper@cygnus.com>
1304
1305         * sysdeps/pthread/bits/libc-lock.h (enum __libc_tsd_key_t): Add
1306         _LIBC_TSD_KEY_DL_ERROR.
1307
1308 1998-08-31  Ulrich Drepper  <drepper@cygnus.com>
1309
1310         * sysdeps/i386/i686/pt-machine.h (testandset): Add memory clobber.
1311         * sysdeps/i386/pt-machine.h: Likewise.
1312         Suggested by Roland McGrath.
1313
1314 1998-08-28 13:58  Ulrich Drepper  <drepper@cygnus.com>
1315
1316         * internals.h: Also define THREAD_GETMEM_NC and THREAD_SETMEM_NC to
1317         access thread data with non-constant offsets.
1318         * specific.c: Use THREAD_GETMEM_NC and THREAD_SETMEM_NC where
1319         necessary.
1320
1321         * sysdeps/i386/useldt.h: Fix typo.  Add THREAD_GETMEM_NC and
1322         THREAD_SETMEM_NC definitions.
1323
1324         * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM_NC and
1325         THREAD_SETMEM_NC.
1326         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
1327
1328 1998-08-26 15:46  Ulrich Drepper  <drepper@cygnus.com>
1329
1330         * internals.h: Define THREAD_GETMEM and THREAD_SETMEM to default if
1331         not already defined.
1332         (struct _pthread_descr_struct): Add p_self and p_nr field.
1333         * manager.c (__pthread_handles): Define second element to point
1334         to manager thread.
1335         (__pthread_handles_num): Initialize to 2.
1336         (__pthread_manager): Use INIT_THREAD_SELF with two arguments.
1337         (pthread_start_thread): Likewise.
1338         (pthread_handle_create): Start search for free slot at entry 2.
1339         Initialize new fields p_self and p_nr.
1340         Call __clone with CLONE_PTRACE if available.
1341         (pthread_free): Call FREE_THREAD_SELF if available.
1342         * pthread.c (__pthread_initial_thread): Initialize new fields.
1343         (__pthread_manager_thread): Likewise.
1344         (__pthread_initialize_manager): Call __clone with CLONE_PTRACE.
1345
1346         * cancel.c: Use THREAD_GETMEM and THREAD_SETMEM to access the
1347         elements of the thread descriptor.
1348         * condvar.c: Likewise.
1349         * errno.c: Likewise.
1350         * join.c: Likewise.
1351         * manager.c: Likewise.
1352         * pthread.c: Likewise.
1353         * ptlongjmp.c: Likewise.
1354         * semaphore.c: Likewise.
1355         * signals.c: Likewise.
1356         * specific.c: Likewise.
1357         * spinlock.c: Likewise.
1358
1359         * sysdeps/alpha/pt-machine.h (INIT_THREAD_SELF): Add extra parameter.
1360
1361         * sysdeps/i386/useldt.h: New file.
1362         * sysdeps/i386/i686/pt-machine.h: Show how to use this file.
1363
1364         * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM and
1365         THREAD_SETMEM using __thread_self.
1366         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
1367
1368 1998-08-24  Geoff Keating  <geoffk@ozemail.com.au>
1369
1370         * spinlock.c (__pthread_lock): Reset p_nextwaiting to NULL if it
1371         turned out that we didn't need to queue after all.
1372
1373 1998-08-22  Geoff Keating  <geoffk@ozemail.com.au>
1374
1375         * sysdeps/powerpc/pt-machine.h: Remove testandset, it's not used
1376         and wastes space; correct types.
1377
1378 1998-08-08 11:18  H.J. Lu  <hjl@gnu.org>
1379
1380         * signals.c (sigaction): Handle NULL argument.
1381
1382 1998-08-04  Ulrich Drepper  <drepper@cygnus.com>
1383
1384         * sysdeps/unix/sysv/linux/bits/sigthread.h: Use __sigset_t instead
1385         of sigset_t.
1386
1387 1998-08-02  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
1388
1389         * Makefile (linuxthreads-version): Extract correct number from
1390         Banner.
1391
1392 1998-07-29  Xavier Leroy  <Xavier.Leroy@inria.fr>
1393
1394         * Banner: Bump version number to 0.8
1395         * FAQ.html: Many updates, in particular w.r.t. debugging.
1396         * manager.c: Support for non-default stacksize for
1397         LinuxThreads-allocated stacks;
1398         don't use guard pages for stacks with default size, rely on
1399         rlimit(RLIMIT_STACK) instead (it's cheaper).
1400         * attr.c: Likewise.
1401         * cancel.c: Use __pthread_sig_cancel and __pthread_sig_restart
1402         everywhere instead of PTHREAD_SIG_CANCEL and PTHREAD_SIG_RESTART.
1403         * condvar.c: Likewise.
1404         * internals.h: Likewise.
1405         * restart.h: Likewise.
1406         * signals.c: Likewise.
1407         * pthread.c: Likewise; set rlimit(RLIMIT_STACK) as we need it.
1408
1409 1998-07-23  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
1410
1411         * weaks.c: Define pthread_mutexattr_[sg]ettype instead of
1412         __pthread_mutexattr_[sg]ettype.  Add more weak aliases.
1413         * Versions: Put __pthread_mutexattr_settype under version
1414         GLIBC_2.0.  Don't export __pthread_mutexattr_setkind_np and
1415         __pthread_mutexattr_gettype.
1416
1417 1998-07-23  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
1418
1419         * sysdeps/pthread/bits/libc-lock.h: Make
1420         __pthread_mutexattr_settype weak.  Don't make
1421         __pthread_mutexattr_setkind_np weak.
1422
1423 1998-07-16 10:52  Ulrich Drepper  <drepper@cygnus.com>
1424
1425         * manager.c (pthread_handle_create): Check whether sched_setscheduler
1426         call can succeed here.
1427
1428         * mutex.c: Define __pthread_mutexattr_settype and make
1429         __pthread_mutexattr_setkind_np an alias.
1430         Likewise for __pthread_mutexattr_gettype.
1431
1432 1998-07-15 11:00 -0400  Zack Weinberg  <zack@rabi.phys.columbia.edu>
1433
1434         * attr.c (pthread_attr_setschedpolicy): Don't check whether caller
1435         is root.
1436
1437 1998-07-14 19:38  Ulrich Drepper  <drepper@cygnus.com>
1438
1439         * sysdeps/pthread/bits/libc-lock.h: Define __libc_cleanup_end.
1440
1441 1998-07-11  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
1442
1443         * Examples/ex6.c: Include <unistd.h> for usleep.
1444
1445 1998-06-13 11:04  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
1446
1447         * Examples/ex4.c (main): Use exit, not pthread_exit.
1448
1449 1998-07-09 13:39  Ulrich Drepper  <drepper@cygnus.com>
1450
1451         * Versions: Add __pthread_mutexattr_gettype and
1452         __pthread_mutexattr_settype.
1453         * lockfile.c: Use __pthread_mutexattr_settype instead of
1454         __pthread_mutexattr_setkind_np.
1455         * mutex.c: Define __pthread_mutexattr_gettype and
1456         __pthread_mutexattr_settype.
1457         * weak.c: Likewise.
1458         * sysdeps/pthread/pthread.h: Declare __pthread_mutexattr_gettype and
1459         __pthread_mutexattr_settype.
1460         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_init_recursive):
1461         Use __pthread_mutexattr_settype.
1462
1463 1998-07-08 22:26  Ulrich Drepper  <drepper@cygnus.com>
1464
1465         * Versions: Add pthread_mutexattr_gettype, pthread_mutexattr_settype.
1466         * mutex.c: Define weak alias pthread_mutexattr_gettype and
1467         pthread_mutexattr_settype.
1468         * sysdeps/pthread/pthread.h: Declare these functions.
1469         Move pthread_sigmask and pthread_kill declaration in separate header.
1470         * sysdeps/unix/sysv/linux/bits/sigthread.h: New file.
1471
1472 1998-07-07 15:20  Ulrich Drepper  <drepper@cygnus.com>
1473
1474         * Makefile: Add rules to compile and run tests.
1475         * Examples/ex1.c: Little changes to fix warnings.
1476         * Examples/ex2.c: Likewise.
1477         * Examples/ex3.c: Likewise.
1478         * Examples/ex4.c: Likewise.
1479         * Examples/ex5.c: Likewise.
1480         * Examples/ex6.c: New file.
1481
1482 1998-07-05 11:54  Ulrich Drepper  <drepper@cygnus.com>
1483
1484         * Versions: Add pthread_attr_init to GLIBC_2.1 version in libc.
1485
1486 1998-07-01  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
1487
1488         * attr.c: Include <string.h>.
1489
1490 1998-06-30 11:47  Ulrich Drepper  <drepper@cygnus.com>
1491
1492         * attr.c: Include errno.h.  Use memcpy to copy sched_param.
1493         * internals.h: Include limits.h.
1494         * manager.c: Use memcpy to copy sched_param.
1495         * ptfork.c: Include errno.h.
1496         * pthread.c: Likewise.
1497         * semaphore.c: Likewise.
1498         * specific.c: Likewise.
1499         * spinlock.h: Likewise.
1500         * sysdeps/pthread/pthread.h: Include only allowed headers.  Move
1501         type definition to ...
1502         * sysdeps/pthread/bits/pthreadtypes.h: ...here.  New file.
1503
1504 1998-06-29 12:34  Ulrich Drepper  <drepper@cygnus.com>
1505
1506         * sysdeps/pthread/pthread.h: Use __PMT not __P for function pointers.
1507
1508         * sysdeps/pthread/pthread.h: Define various PTHREAD_* symbols also
1509         as macros as demanded in POSIX.1, Annex C.
1510
1511 1998-06-29 12:29  Ulrich Drepper  <drepper@cygnus.com>
1512
1513         * internals.h (struct pthread_request): For free use pthread_t
1514         instead of pthread_descr.
1515         * join.c (pthread_join): Pass thread_id, not th to manager.
1516         (pthread_detach): Likewise.
1517         * manager.c (__pthread_manager): Except thread ID in FREE_REQ case.
1518         (pthread_exited): Remove detached queue code.
1519         (pthread_handle_free): Expect thread ID parameter and use it to
1520         validate the thread decsriptor.  Don't use detached queue.
1521         Patches by Xavier Leroy.
1522
1523 1998-06-27  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
1524
1525         * libpthread.map: Export accept, longjmp, sigaction, siglongjmp,
1526         _IO_flockfile, _IO_ftrylockfile, _IO_funlockfile,
1527         __pthread_atfork, __pthread_key_create, __pthread_once.
1528         * internals.h: Doc fix.
1529         * pthread.c (__pthread_initialize): Define again.
1530
1531 1998-06-26  Ulrich Drepper  <drepper@cygnus.com>
1532
1533         * manager.c (pthread_exited): If thread is not detached put it on
1534         special list.
1535         (pthread_handle_free): If thread is not on list with living threads
1536         search on list with detached threads.
1537
1538         * sysdeps/pthread/pthread.h (PTHREAD_RWLOCK_INITIALIZER): Correct
1539         for new definition of pthread_rwlock_t.
1540
1541         * spinlock.c: Correct test whether to compile
1542         __pthread_compare_and_swap or not.
1543
1544 1998-06-25 19:27  Ulrich Drepper  <drepper@cygnus.com>
1545
1546         * attr.c: Finish user stack support.  Change locking code to be safe
1547         in situations with different priorities.
1548         * cancel.c: Likewise.
1549         * condvar.c: Likewise.
1550         * internals.h: Likewise.
1551         * join.c: Likewise.
1552         * manager.c: Likewise.
1553         * mutex.c: Likewise.
1554         * pthread.c: Likewise.
1555         * ptlongjmp.c: Likewise.
1556         * queue.h: Likewise.
1557         * rwlock.c: Likewise.
1558         * semaphore.c: Likewise.
1559         * semaphore.h: Likewise.
1560         * signals.c: Likewise.
1561         * spinlock.c: Likewise.
1562         * spinlock.h: Likewise.
1563         * sysdeps/pthread/pthread.h: Likewise.
1564         Patches by Xavier Leroy.
1565
1566         * sysdeps/i386/i686/pt-machine.h: New file.
1567
1568 1998-06-25  Ulrich Drepper  <drepper@cygnus.com>
1569
1570         * sysdeps/pthread/pthread.h: Make [sg]et_stacksize and
1571         [sg]et_stackaddr prototypes always available.
1572
1573         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
1574         _POSIX_THREAD_ATTR_STACKSIZE and _POSIX_THREAD_ATTR_STACKADDR.
1575
1576 1998-06-24  Ulrich Drepper  <drepper@cygnus.com>
1577
1578         * manager.c (pthread_free): Undo patch from 980430.
1579         Reported by David Wragg <dpw@doc.ic.ac.uk>.
1580
1581 1998-06-09 15:07  Ulrich Drepper  <drepper@cygnus.com>
1582
1583         * manager.c: Define __pthread_manager_adjust_prio and use it to
1584         increase priority when needed.
1585         * internals.h: Add prototype for __pthread_manager_adjust_prio.
1586         * mutex.c: Optimize mutexes to wake up only one thread.
1587         * pthread.c: Move PID of manager for global variable in structure
1588         element.
1589         Patches by Xavier Leroy.
1590
1591 1998-06-07 13:47  Ulrich Drepper  <drepper@cygnus.com>
1592
1593         * sysdeps/pthread/bits/libc-lock.h: Optimize cleanup handlers a bit.
1594
1595 1998-06-03  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
1596
1597         * attr.c: Correct typo.
1598
1599 1998-05-01  Ulrich Drepper  <drepper@cygnus.com>
1600
1601         * manager.c (pthread_free): Unmap guard before the stack.
1602         Patch by Matthias Urlichs.
1603
1604 1998-04-30  Ulrich Drepper  <drepper@cygnus.com>
1605
1606         * manager.c (pthread_free): Detect already free child.
1607         Patch by Xavier Leroy, reported by Matthias Urlichs.
1608
1609 1998-04-23  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
1610
1611         * Makefile (linuxthreads-version): Renamed back from
1612         libpthread-version.
1613
1614 1998-04-21  Ulrich Drepper  <drepper@cygnus.com>
1615
1616         * ptlongjmp.c: Add prototypes for __libc_siglongjmp and
1617         __libc_longjmp.
1618
1619 1998-04-20 14:55  Ulrich Drepper  <drepper@cygnus.com>
1620
1621         * Makefile (libpthread-routines): Add ptlongjmp and spinlock.
1622         * internals.h: Add definitions for new spinlock implementation.
1623         * ptlongjmp.c: New file.
1624         * spinlock.c: New file.
1625         * spinlock.h (acquire): Don't reschedule using __sched_yield, use
1626         new function __pthread_acquire to prevent deadlocks with thread
1627         with different priorities.
1628         Patches by Xavier Leroy <Xavier.Leroy@inria.fr>.
1629
1630 1998-03-16  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
1631
1632         * manager.c (__pthread_manager): Reduce first argument to select
1633         to include just the needed file descriptor.
1634
1635 1998-03-17 00:06  Ulrich Drepper  <drepper@cygnus.com>
1636
1637         * manager.c: Fix last patch which caused core dumps.
1638
1639         * pthread.c: Correctly handle missing SIGRTMIN.
1640
1641 1998-03-15  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
1642
1643         * libpthread.map: Add __libc_internal_tsd_get and
1644         __libc_internal_tsd_set.  Add missing cancelable functions. Export
1645         libc internal versions of the cancelable functions.
1646
1647 1998-03-13 16:51  Ulrich Drepper  <drepper@cygnus.com>
1648
1649         * weaks.c: Define pthread_attr_init as GLIBC_2.0 and GLIBC_2.1.
1650
1651 1998-03-13 00:46  Ulrich Drepper  <drepper@cygnus.com>
1652
1653         * attr.c: Implement pthread_attr_[gs]etguardsize,
1654         pthread_attr_[gs]setstackaddr, pthread_attr_[gs]etstacksize.
1655         Change pthread_attr_init to have two interfaces.
1656         * internals.h (struct _pthread_descr_struct): Add new fields for
1657         above functions.
1658         * libpthread.map: Add names in GLIBC_2.1 section.
1659         * manager.c (pthread_handle_create): Implement guardsize and
1660         user stack.
1661         (pthread_free): Likewise.
1662         * pthread.c (pthread_create): Add new interface for changed
1663         pthread_attr_t.
1664         * sysdeps/pthread/pthread.h: Add prototypes for new functions.
1665         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add definition of
1666         PTHREAD_STACK_MIN.
1667
1668 1998-03-11 00:42  Wolfram Gloger  <wmglo@dent.med.uni-muenchen.de>
1669
1670         * manager.c: Enable resetting of the thread scheduling policy
1671         to SCHED_OTHER when the parent thread has a different one.
1672
1673 1998-02-01 13:51  Ulrich Drepper  <drepper@cygnus.com>
1674
1675         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
1676         _POSIX_ASYNCHRONOUS_IO.
1677
1678         * sysdeps/pthread/pthread.h: Define bits for Unix98 variants of
1679         mutexes.
1680         * mutex.c: Implement new mutex types.
1681
1682         * internals.h: Include <signal.h>.
1683
1684         * libpthread.map: Add __erno_location and __h_errno_location.
1685
1686         * errno.c: Return pointer to variable actually in use.  This might
1687         not be the one in the thread structure.
1688         * internals.h (struct _pthread_descr_struct): Add new fields p_errnop
1689         and p_h_errnop.
1690         * manager.c (__pthread_manager): Set p_errnop and p_h_errnop member
1691         of manager thread structure.
1692         (pthread_handle_create): Set p_errnop and p_h_errnop members for new
1693         thread.
1694         * pthread.c: Adapt initializer for thread structures.
1695         (__pthread_initial_thread): Set p_errnop and p_h_errnop member.
1696         (__pthread_reset_main_thread): Reset p_errnop and p_h_errnop of
1697         current thread to global variables.
1698
1699 1998-01-31 17:27  Ulrich Drepper  <drepper@cygnus.com>
1700
1701         * rwlock.c: New file.
1702         * Makefile (libpthread-routines): Add rwlock.
1703         * sysdeps/pthread/pthread.h: Define data structures and declare
1704         functions.
1705         * libpthread.map: Add new functions.
1706
1707 1997-12-18 13:50  Philip Blundell  <pb@nexus.co.uk>
1708
1709         * sysdeps/arm/pt-machine.h: New file; add ARM support.
1710         * sysdeps/arm/Implies: likewise.
1711         * README: Document it.
1712
1713 1997-12-13  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
1714
1715         * signals.c: Remove unneeded initializer for sigwaited, saving a
1716         warning.
1717
1718 1997-04-11 01:18  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
1719
1720         * semaphore.c (sem_init): Set sem_spinlock only if available.
1721
1722 1997-12-04 01:48  Ulrich Drepper  <drepper@cygnus.com>
1723
1724         * mutex.c: Implement PTHREAD_MUTEX_CHECKERROR.
1725         * sysdeps/pthread/pthread.h: Define PTHREAD_MUTEX_CHECKERROR.
1726
1727         * Makefile: Update from LinuxThreads 0.7.
1728         * internals.h. Likewise.
1729         * manager.c: Likewise.
1730         * mutex.c: Likewise.
1731         * pthread.c: Likewise.
1732         * signals.c: Likewise.
1733         * specific.c: Likewise.
1734         * Examples/ex3.c: Likewise.
1735
1736 1997-11-20 18:13  Ulrich Drepper  <drepper@cygnus.com>
1737
1738         * pthread.c (__pthread_reset_main_thread): Close pipe only if still
1739         open.
1740
1741 1997-10-29 05:38  Ulrich Drepper  <drepper@cygnus.com>
1742
1743         * wrapsyscall.c: Add socket functions which are also cancelation
1744         points.
1745
1746 1997-10-19 21:40  Wolfram Gloger  <wg@wolfram.dent.med.uni-muenchen.de>
1747
1748         * specific.c (__libc_internal_tsd_set, __libc_internal_tsd_get):
1749         New functions for fast thread specific data within libc.
1750
1751         * internals.h: Add new array p_libc_specific to struct
1752         _pthread_descr_struct.
1753
1754         * sysdeps/pthread/bits/libc-lock.h: Declare new functions.
1755
1756 1997-10-13 05:39  Ulrich Drepper  <drepper@cygnus.com>
1757
1758         * semaphore.h: Add __BEGIN_DECLS/__END_DECLS.
1759         Reported by Ralf Corsepius <corsepiu@faw.uni-ulm.de>.
1760
1761 1997-08-29 03:05  Ulrich Drepper  <drepper@cygnus.com>
1762
1763         * internals.h (struct _pthread_descr_struct): Add definitions for
1764         two-level specific key handling.
1765         * manager.c (pthread_handle_create): Initialize specific memory array.
1766         * specific.c: Implement two-level key handling.
1767         * weaks.c: Don't provide dummy key handling.
1768         * sysdeps/pthread/bits/libc-lock.h: Typedef __libc_lock_t (no #define).
1769         Add definition of __libc_key_t.
1770         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define PTHREAD_KEYS_MAX
1771         as 1024.
1772         Add definition of _POSIX_THREAD_DESTRUCTOR_ITERATIONS and
1773         PTHREAD_DESTRUCTOR_ITERATIONS.
1774
1775         * manager.c (pthread_handle_create): Compare mmap result with
1776         MAP_FAILED.
1777
1778         * ptfork.c: Rename to __pthread_atfork and make old name a weak alias.
1779         * sysdeps/pthread/bits/pthread.h: Add prototype for __pthread_atfork.
1780
1781 1997-08-22 19:04  Richard Henderson  <rth@cygnus.com>
1782
1783         sysdeps/sparc -> sysdeps/sparc/sparc32
1784         sysdeps/sparc64 -> sysdeps/sparc/sparc64
1785
1786         * internals.h: Change definition of THREAD_SELF to be an expression,
1787         not a statement that did a return.
1788         * sysdeps/alpha/pt-machine.h (THREAD_SELF): Update accordingly.
1789         * sysdeps/sparc/sparc32/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF):
1790         Follow Solaris and use a "system reserved" register (%g6) to hold
1791         the thread descriptor.
1792         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
1793
1794 1997-08-03 00:09  Ulrich Drepper  <drepper@cygnus.com>
1795
1796         * mutex.c: Correct pthread_once.  Patch by Xavier Leroy.
1797         * sysdeps/pthread/pthread.h: Add prototype for __pthread_once.
1798         * sysdeps/pthread/bits/pthread.h: Add macros for __libc_once.
1799
1800         * semaphore.c: Include spinlock.h only when needed.
1801
1802         * specific.c (__pthread_setsepcific, __pthread_getspecific): Reject
1803         keys for entries not in use.
1804
1805         * weaks.c: Implement key handling functions for real.
1806
1807 1997-06-29  01:04  Richard Henderson  <richard@gnu.ai.mit.edu>
1808
1809         Initial sparc64-linux support:
1810         * linuxthreads/sysdeps/sparc64/Implies: New file.
1811         * linuxthreads/sysdeps/sparc64/pt-machine.h: Likewise.
1812
1813 1997-06-29 00:48  Ulrich Drepper  <drepper@cygnus.com>
1814
1815         * semaphore.c: Include spinlock.h at correct place.
1816         Patch by HJ Lu.
1817
1818 1997-06-13 10:06  Richard Henderson  <rth@tamu.edu>
1819
1820         The Great Bit File Move:
1821         * sysdeps/alpha/semaphorebits.h: -> .../bits/semaphore.h.
1822         * sysdeps/powerpc/semaphorebits.h: Likewise.
1823         * sysdeps/pthread/cmpxchg/semaphorebits.h: Likewise.
1824         * sysdeps/pthread/no-cmpxchg/semaphorebits.h: Likewise.
1825         * sysdeps/pthread/libc-lock.h: -> bits/
1826         * sysdeps/pthread/stdio-lock.h: Likewise.
1827         * sysdeps/unix/sysv/linux/local_lim.h: Likewise.
1828         * sysdeps/unix/sysv/linux/posix_opt.h: Likewise.
1829         * semaphore.h: Likewise.
1830         * sysdeps/pthread/pthread.h: Likewise.
1831
1832         * lockfile.c: <foo.h> -> <bits/foo.h>.
1833         * semaphore.h: Likewise.
1834
1835         * Makefile: (headers): foo.h -> bits/foo.h.
1836         * sysdeps/pthread/Makefile: Likewise.
1837
1838 1997-04-11 01:18  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
1839
1840         * semaphore.c (sem_init): Set sem_spinlock only if available.
1841
1842         * sysdeps/m68k/pt-machine.h (testandset, __compare_and_swap): Fix
1843         asm constraints.
1844
1845 1997-04-09 03:00  Ulrich Drepper  <drepper@cygnus.com>
1846
1847         Update from LinuxThreads 0.6.
1848
1849         * attr.c (pthread_attr_getdetachstate): Use __sched_get_priority_max
1850         and __sched_get_priority_min instead of names without `__'.
1851
1852         * manager.c: Rewrite large parts to implement opaque pthread_t.
1853
1854         * cancel.c: Adapt for opaque pthread_t type.
1855         * condvar.c: Likewise.
1856         * errno.c: Likewise.
1857         * join.c: Likewise.
1858         * mutex.c: Likewise.
1859         * pthread.c: Likewise.
1860         * signals.c: Likewise.
1861         * specific.c: Likewise.
1862         * restart.h: Likewise.
1863         * queue.h: Likewise.
1864         * Examples/ex3.c: Likewise.
1865         * Examples/ex4.c: Likewise.
1866         * sysdeps/pthread/pthread.h: Likewise.
1867
1868         * pthread.c: Accumulate time for all threads in thread manager.
1869
1870         * semaphore.c: Implement fallback implementation for architectures
1871         sometimes missing compare-exchange operations.
1872
1873         * cancel.c (pthread_cancel): Validate handle argument.
1874         * join.c (pthread_join): Likewise.
1875         (pthread_detach): Likewise.
1876         * signals.c (pthread_kill): Likewise.
1877
1878         * spinlock.h (acquire): Use __sched_yield not sched_yield.
1879
1880         * queue.h (enqueue): Enqueue thread according to priority.
1881
1882         * internals.c (struct pthread_start_args): New struct for passing
1883         args to cloning function.
1884         (struct _pthread): Rename to _pthread_descr_struct and adapt for
1885         opaque pthread_t.
1886
1887         * Examples/Makefile (clean): Pass -f option to rm.
1888
1889         * sysdeps/i386/pt-machine.h: Add check for compare-exchange instruction
1890         and define TEST_FOR_COMPARE_AND_SWAP.
1891         * sysdeps/i386/i486/pt-machine.h: Removed.
1892
1893         * sysdeps/unix/sysv/linux/local_lim.h (PTHREAD_THREADS_MAX): Increase
1894         to 1024.
1895
1896 1997-04-04 16:38  Ulrich Drepper  <drepper@cygnus.com>
1897
1898         * restart.h (suspend): Clear p_signal before suspending.
1899         (suspend_with_cancellation): Likewise.
1900         Patch by Xavier Leroy <Xavier.Leroy@inria.fr>.
1901
1902         * weaks.c: Make __pthread_key_create return 1.
1903         * sysdeps/pthread/libc-lock.h: Define __libc_key_create,
1904         __libc_getspecific, __libc_setspecific, and __libc_key_t.
1905         * sysdeps/pthread/stdio-lock.h: Don't care for implementation not
1906         using libio.
1907
1908 1997-03-19 15:13  Miguel de Icaza  <miguel@nuclecu.unam.mx>
1909
1910         * sysdeps/sparc/pt-machine (RELEASE): Fix.
1911
1912 1997-03-01 07:55  Geoff Keating  <geoffk@ozemail.com.au>
1913
1914         * sysdeps/powerpc/Implies: Added.
1915         * sysdeps/powerpc/pt-machine.h: Added.
1916         * sysdeps/powerpc/semaphorebits.h: Added.
1917
1918 1997-01-22 01:22  Ulrich Drepper  <drepper@cygnus.com>
1919
1920         * linuxtheads/pthread.c (__pthread_initial_thread): Correct
1921         initializer.
1922         (__pthread_manager_thread): Likewise.
1923         Reported by Andreas Jaeger.
1924
1925 1997-01-18 22:15  Richard Henderson  <rth@tamu.edu>
1926
1927         Since sigset_t no longer fits in a register, we can't pass in the
1928         thread's initial mask so easily.  Take this opportunity to simplify
1929         the clone implementation by only accepting a single void* argument.
1930
1931         * linuxthreads/manager.c (__pthread_manager): Put thread vitals
1932         in the thread struct instead of as arguments through clone.
1933         (pthread_start_thread): Look for them there.
1934         * linuxthreads/internals.h (struct _pthread): Add p_initial_fn,
1935         p_initial_fn_arg, p_initial_mask.  Fix __pthread_manager proto.
1936         * linuxthreads/pthread.c (pthread_initialize_manager): Revise
1937         clone invocation.