Update.
[platform/upstream/glibc.git] / linuxthreads / ChangeLog
1 2000-03-14  Ulrich Drepper  <drepper@redhat.com>
2
3         * mutex.c (__pthread_once): Handle cancelled init function correctly.
4         (pthread_once_cancelhandler): New function.
5         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
6
7 2000-03-14  Andreas Jaeger  <aj@suse.de>
8
9         * pthread.c (pthread_handle_sigcancel_rt): GS has been renamed to
10         REG_GS.
11         (pthread_handle_sigrestart_rt): Likewise.
12         * signals.c (pthread_sighandler_rt): Likewise.
13
14 2000-03-02  Andreas Jaeger  <aj@suse.de>
15
16         * sysdeps/pthread/bits/libc-lock.h: Fix typo.
17         Reported by Sean Chen <sean.chen@turbolinux.com>.
18
19 2000-02-28  Andreas Jaeger  <aj@suse.de>
20
21         * rwlock.c: Fix typo.
22
23 2000-02-27  Ulrich Drepper  <drepper@redhat.com>
24
25         * rwlock.c: Define __* variants of the functions and make old names
26         aliases.
27         * Versions [GLIBC_2.2]: Export the __pthread_rwlock_* functions.
28         * sysdeps/pthread/bits/libc-lock.h: Define __libc_rwlock_* macros.
29
30 2000-02-25  Andreas Jaeger  <aj@suse.de>
31
32         * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
33         pwrite64, lseek64, open64, and __open64 with version 2.2.
34
35 2000-02-22  Ulrich Drepper  <drepper@redhat.com>
36
37         * semaphore.h (SEM_FAILED): Use 0 not NULL.
38
39 2000-02-14  Ulrich Drepper  <drepper@redhat.com>
40
41         * condvar.c (pthread_cond_timedwait_relative_old): Tight loop with
42         nanosleep does not work either.  Get absolute time inside the
43         loop.
44         (pthread_cond_timedwait_relative_new): Likewise.
45         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
46
47 2000-02-13  Andreas Jaeger  <aj@suse.de>
48
49         * condvar.c (pthread_cond_timedwait_relative_new): Fix last patch.
50         (pthread_cond_timedwait_relative_old): Likewise.
51
52 2000-02-13  Ulrich Drepper  <drepper@redhat.com>
53
54         * condvar.c (pthread_cond_timedwait_relative_old): Undo last patch
55         but keep the code around.  A bug in the kernel prevent us from
56         using the code.
57         (pthread_cond_timedwait_relative_new): Likewise.
58         (PR libc/1597 and libc/1598).
59
60 2000-02-01  Kaz Kylheku  <kaz@ashi.footprints.net>
61
62         * condvar.c (pthread_cond_timedwait_relative_old): Do tight
63         loop around nanosleep calls instead of around most of the function
64         (pthread_cond_timedwait_relative_new): Likewise.
65         body.  Got rid of backwards goto and one local.
66
67 2000-01-31  Ulrich Drepper  <drepper@redhat.com>
68
69         * condvar.c (pthread_cond_timedwait_relative_old): Recompute time
70         before every nanosleep call to account for time spent in the rest
71         of the function.
72         (pthread_cond_timedwait_relative_new): Likewise.
73         Patch by khendricks@ivey.uwo.ca (PR libc/1564).
74
75 2000-01-29  Ulrich Drepper  <drepper@redhat.com>
76
77         * condvar.c (pthread_cond_timedwait_relative_old): Get remaining time
78         from nanosleep call so that in case we restart we only wait for the
79         remaining time.
80         (pthread_cond_timedwait_relative_new): Likewise.
81         Patch by khendricks@ivey.uwo.ca (PR libc/1561).
82
83 2000-01-18  Ulrich Drepper  <drepper@cygnus.com>
84
85         * manager.c (pthread_allocate_stack): Compute guard page address
86         correctly.  Patch by HJ Lu.
87
88         * sysdeps/pthread/pthread.h: Define
89         PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP.
90
91 2000-01-16  Ulrich Drepper  <drepper@cygnus.com>
92
93         * rwlock.c (pthread_rwlock_unlock): Correct one more problem with
94         preference handling.
95         (pthread_rwlockattr_setkind_np): Allow
96         PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP.
97         Patches by Kaz Kylheku <kaz@ashi.footprints.net>.
98
99 2000-01-12  Ulrich Drepper  <drepper@cygnus.com>
100
101         * internals.h (pthread_readlock_info): New structure.
102         (_pthread_descr_struct): Add p_readlock_list, p_readlock_free, and
103         p_untracked_readlock_count.
104         * pthread.c (__pthread_initial_thread, pthread_manager_thread):
105         Add initializers for new fields.
106         * manager.c (pthread_free): Free read/write lock lists.
107         * queue.h (queue_is_empty): New function.
108         * rwlock.c: Implement requirements about when readers should get
109         locks assigned.
110         * sysdeps/pthread/pthread.h
111         (PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP): New definition.
112         * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_rwlock_t):
113         Define this name as well.
114         Patches by Kaz Kylheku <kaz@ashi.footprints.net>.
115
116 2000-01-05  Ulrich Drepper  <drepper@cygnus.com>
117
118         * pthread.c (__pthread_initial_thread, pthread_manager_thread):
119         Adjust initializers for struct _pthread_descr_struct change.
120         * internals.h (struct _pthread_descr_struct): Move new elements to
121         the end.
122
123 2000-01-03  Kaz Kylheku  <kaz@ashi.footprints.net>
124
125         Redesigned how cancellation unblocks a thread from internal
126         cancellation points (sem_wait, pthread_join,
127         pthread_cond_{wait,timedwait}).
128         Cancellation won't eat a signal in any of these functions
129         (*required* by POSIX and Single Unix Spec!).
130         * condvar.c: Spontaneous wakeup on pthread_cond_timedwait won't eat a
131         simultaneous condition variable signal (not required by POSIX
132         or Single Unix Spec, but nice).
133         * spinlock.c: __pthread_lock queues back any received restarts
134         that don't belong to it instead of assuming ownership of lock
135         upon any restart; fastlock can no longer be acquired by two threads
136         simultaneously.
137         * restart.h: Restarts queue even on kernels that don't have
138         queued real time signals (2.0, early 2.1), thanks to atomic counter,
139         avoiding a rare race condition in pthread_cond_timedwait.
140
141 1999-12-31  Andreas Jaeger  <aj@suse.de>
142
143         * internals.h: Remove duplicate prototype declarations.
144
145         * weaks.c: Remove __THROW from prototypes since the file is not
146         compiled by a C++ compiler.
147         * internals.h: Likewise.
148
149 1999-12-30  Andreas Jaeger  <aj@suse.de>
150
151         * sysdeps/pthread/pthread.h: Move internal functions to...
152         * sysdeps/pthread/bits/libc-lock.h: ...here.
153
154 1999-12-29  Andreas Jaeger  <aj@suse.de>
155
156         * sysdeps/pthread/pthread.h: Fix typos, reformat comments.
157
158 1999-12-28  Ulrich Drepper  <drepper@cygnus.com>
159
160         * sysdeps/alpha/pt-machine.h: Move stack_pointer definition to the
161         beginning.
162
163         * manager.c (__pthread_start): Add one more cast to prevent
164         warning on 64bit machines.
165
166 1999-12-21  Ulrich Drepper  <drepper@cygnus.com>
167
168         * manager.c (pthread_handle_create): Set p_pid of new thread
169         before calling the callback function to report a new thread.
170
171 1999-12-20  Andreas Jaeger  <aj@suse.de>
172
173         * pthread.c (pthread_initialize): Move getrlimit call after
174         setting of errno.
175
176 1999-12-18  Ulrich Drepper  <drepper@cygnus.com>
177
178         * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
179         pwrite64, lseek64, open64, and __open64.
180         * wrapsyscall.c: Define pread, __pread64, pread64, pwrite, __pwrite64,
181         pwrite64, lseek64, open64, and __open64.
182
183         * manager.c (pthread_allocate_stack): Correct computation of
184         new_thread_bottom.  Correct handling of stack size and when the
185         rlimit method to guard for stack growth is used.
186         * pthread.c (pthread_initialize): Stack limit must be STACK_SIZE
187         minus one pagesize (not two).
188
189 1999-12-03  Andreas Jaeger  <aj@suse.de>
190
191         * Versions: Add __res_state with version GLIBC_2.2.
192
193         * errno.c (__res_state): New function to return thread specific
194         resolver state.
195
196         * pthread.c (pthread_initialize): Initialize p_resp.
197         (__pthread_reset_main_thread): Also set p_resp.
198
199         * manager.c (pthread_handle_create): Initialize p_resp.
200
201         * internals.h: Add thread specific resolver state.
202         Based on patches by Adam D. Bradley <artdodge@cs.bu.edu>.
203
204 1999-12-01  Ulrich Drepper  <drepper@cygnus.com>
205
206         * sysdeps/i386/pt-machine.h: Move stack_pointer definition to the
207         beginning.
208         * sysdeps/i386/i686/pt-machine.h: Likewise.
209         Patches by Alan Modra <alan@SPRI.Levels.UniSA.Edu.Au>.
210
211 1999-11-23  Ulrich Drepper  <drepper@cygnus.com>
212
213         * manager.c (pthread_start_thread_event): Initialize p_pid already
214         here.
215
216 1999-11-22  Ulrich Drepper  <drepper@cygnus.com>
217
218         * internals.h: Add prototype for __pthread_manager_event.
219         * manager.c (__pthread_manager_event): New function.
220         (pthread_start_thread_event): Correct computation of self.
221         Use INIT_THREAD_SELF.
222         * pthread.c (__pthread_manager_thread): Initialize p_lock.
223         (__pthread_initialize_manager): Respect event flags also for creation
224         of the manager thread.
225
226 1999-11-08  Ulrich Drepper  <drepper@cygnus.com>
227
228         * pthread.c (__pthread_initialize_manager): Initialize
229         __pthread_manager_thread.p_tid.
230
231 1999-11-02  Ulrich Drepper  <drepper@cygnus.com>
232
233         * internals.h: Declare __pthread_last_event.
234         * manager.c: Define __pthread_last_event.
235         (pthread_handle_create): Set __pthread_last_event.
236         (pthread_exited): Likewise.
237         * join.c (pthread_exit): Likewise.
238
239         * Makefile (libpthread-routines): Add events.
240         * events.c: New file.
241         * internals.h: Protect against multiple inclusion.
242         Include thread_dbP.h header.
243         (struct _pthread_descr_struct): Add new fields p_report_events and
244         p_eventbuf.
245         Declare event reporting functions.
246         * join.c (pthread_exit): Signal event if this is wanted.
247         * manager.c (__pthread_threads_events): New variable.
248         (pthread_handle_create): Take new parameters with event information.
249         Signal TD_CREATE event if wanted.
250         (__pthread_manager): Adjust pthread_handle_create call.
251         (pthread_start_thread_event): New function.  Block until manager is
252         finished and then call pthread_start_thread.
253         (pthread_exited): Signal TD_REAP event if wanted.
254
255 1999-10-26  Ulrich Drepper  <drepper@cygnus.com>
256
257         * restart.h (suspend_with_cancellation): Rewrite as a macro.
258
259         * condvar.c (pthread_cond_timedwait_relative): Don't mark as inline.
260
261 1999-10-25  Andreas Jaeger  <aj@suse.de>
262
263         * internals.h: Remove K&R compatibility.
264         * no-tsd.c: Likewise.
265         * semaphore.h: Likewise.
266         * signals.c: Likewise.
267         * sysdeps/pthread/bits/libc-tsd.h: Likewise.
268         * sysdeps/unix/sysv/linux/bits/sigthread.h: Likewise.
269         * weaks.c: Likewise.
270
271 1999-10-21  Xavier Leroy  <Xavier.Leroy@inria.fr>
272
273         * linuxthreads/pthread.c: For i386, wrap pthread_handle_sigrestart
274         and pthread_handle_sigcancel with functions that restore
275         %gs from the signal context.  For each signal handling function,
276         two wrappers are required, one for a non-RT signal and one for
277         a RT signal.
278         * linuxthreads/signal.c: For i386, add code to restore %gs
279         from the signal context in pthread_sighandler and
280         pthread_sighandler_rt.
281
282 1999-10-17  Ulrich Drepper  <drepper@cygnus.com>
283
284         * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add cast.
285
286 1999-10-14  Ulrich Drepper  <drepper@cygnus.com>
287
288         * pthread.c (__pthread_initial_thread): Pass argument to
289         PTHREAD_START_ARGS_INITIALIZER.
290         (__pthread_manager_thread): Likewise.
291
292         * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add parameter to
293         initialize function.
294
295         * manager.c (pthread_handle_create): Remove p_startfct initialization.
296
297         * internals.h (_pthread_descr_struct): We don't need p_startfct field.
298
299 1999-10-12  Ulrich Drepper  <drepper@cygnus.com>
300
301         * internals.h: Correct return types for __libc_read and __libc_write.
302
303 1999-10-09  Andreas Jaeger  <aj@suse.de>
304
305         * internals.h: Add __new_sem_post to get prototype in
306         manager.c; include semaphore.h for needed types.
307
308 1999-10-08  Ulrich Drepper  <drepper@cygnus.com>
309
310         * manager.c (__pthread_manager) [REQ_POST]: Use __new_sem_post
311         directly instead of calling sem_post which should not be necessary
312         but is faster and might help in some case to work around problems.
313         Patch by khendricks@ivey.uwo.ca [libc/1382].
314
315 1999-10-08  Andreas Schwab  <schwab@suse.de>
316
317         * sysdeps/pthread/Subdirs: New file.
318         * Implies: Removed.
319
320 1999-10-07  Ulrich Drepper  <drepper@cygnus.com>
321
322         * Implies: New file.
323         * internals.h (struct _pthread_descr_struct): Add p_startfct.
324         * manager.c (pthread_handle_create): Initialize p_startfct.
325         * pthread.c: Define __linuxthread_pthread_sizeof_descr variable.
326
327 1999-09-25  Ulrich Drepper  <drepper@cygnus.com>
328
329         * manager.c (__linuxthreads_pthread_threads_max): New variable.
330         * specific.c (__linuxthreads_pthread_keys_max): New variable.
331         (__linuxthreads_pthread_key_2ndlevel_size): New variable.
332
333         * condvar.c (pthread_cond_timedwait_relative): Never return with
334         EINTR.  Patch by Andreas Schwab.
335
336 1999-09-19  Ulrich Drepper  <drepper@cygnus.com>
337
338         * signals.c (sigaction): Correct last patch.  Don't select
339         pthread_sighandler_rt based on the signal number but instead of
340         the SA_SIGINFO flag.
341
342 1999-09-23  Ulrich Drepper  <drepper@cygnus.com>
343
344         * specific.c: Move definitions of struct pthread_key_struct and
345         destr_function to ...
346         * internals.h: ...here.
347
348 1999-09-18  Ulrich Drepper  <drepper@cygnus.com>
349
350         * pthread.c (pthread_handle_sigrestart_rt): New function.  Use
351         this instead of pthread_handle_sigrestart if the signal is an RT
352         signal.
353
354         * signals.c: Handle passing through of sighandler arguments also
355         for real-time signals.
356
357 1999-09-03  Andreas Schwab  <schwab@suse.de>
358
359         * ptfork.c (__fork): Renamed from fork and use __libc_fork.  Add
360         fork as weak alias.
361         (__vfork): New function, alias vfork.
362         * Versions: Export __fork, vfork, and __vfork in libpthread.
363
364 1999-08-23  Andreas Schwab  <schwab@suse.de>
365
366         * signals.c (pthread_sighandler): Add SIGCONTEXT_EXTRA_ARGS to
367         call to signal handler.
368
369 1999-08-20  Ulrich Drepper  <drepper@cygnus.com>
370
371         * pthread.c (__pthread_reset_main_thread): Undo last change.
372         (__pthread_kill_other_threads_np): Reset signal handlers for the
373         signals we used in the thread implementation here.
374
375 1999-08-19  Ulrich Drepper  <drepper@cygnus.com>
376
377         * pthread.c (__pthread_reset_main_thread): Reset signal handlers
378         for the signals we used in the thread implementation [PR libc/1234].
379
380         * Versions: Export __pthread_kill_other_threads_np from libpthread
381         for GLIBC_2.1.2.
382
383         * signals.c: Pass sigcontext through wrapper to the user function.
384
385 1999-08-01  Ulrich Drepper  <drepper@cygnus.com>
386
387         * Versions [ld.so] (GLIBC_2.0): Export __libc_internal_tsd_get and
388         __libc_internal_tsd_set.
389
390 1999-07-29  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
391
392         * manager.c: Remove inclusion of <linux/tasks.h> since it's not
393         needed anymore.
394
395 1999-07-16  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
396
397         * internals.h: Align _pthread_descr_struct to 32 bytes.
398         Reported by Tim Hockin <thockin@cobaltnet.com>, close PR
399         libc/1206.
400
401 1999-07-09  Ulrich Drepper  <drepper@cygnus.com>
402
403         * oldsemaphore.c (sem_compare_and_swap): Fix use of compare and
404         swap function.
405
406 1999-07-09  Cristian Gafton  <gafton@redhat.com>
407
408         * Makefile (libpthread-routines): Add oldsemaphore routine.
409         * Versions: Add sem_destroy, sem_getvalue, sem_init, sem_post,
410         sem_trywait, and sem_wait to GLIBC_2.1.
411         * oldsemaphore.c: New file.
412         * semaphore.c: Add default_symbol_versions for the changed functions.
413         (__new_sem_init): Rename from sem_init.
414         (__new_sem_post): Rename from sem_post.
415         (__new_sem_wait): Rename from sem_wait.
416         (__new_sem_trywait): Rename from sem_trywait.
417         (__new_sem_getvalue): Rename from sem_getvalue.
418         (__new_sem_destroy): Rename from sem_destroy.
419
420 1999-06-23  Robey Pointer  <robey@netscape.com>
421
422         * internals.h: Added p_nextlock entry to separate queueing for a
423         lock from queueing for a CV (sometimes a thread queues on a lock
424         to serialize removing itself from a CV queue).
425         * pthread.c: Added p_nextlock to initializers.
426         * spinlock.c: Changed to use p_nextlock instead of p_nextwaiting.
427
428 1999-07-09  Ulrich Drepper  <drepper@cygnus.com>
429
430         * manager.c (pthread_handle_create): Free mmap region after stack
431         if clone failed.  Patch by Kaz Kylheku <kaz@ashi.FootPrints.net>.
432
433 1999-05-23  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
434
435         * man/pthread_cond_init.man: Correct example.
436         Reported by Tomas Berndtsson <tomas@nocrew.org>.
437
438         * linuxthreads.texi (Condition Variables): Likewise.
439
440 1999-05-18  Jakub Jelinek  <jj@ultra.linux.cz>
441
442         * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): Use
443         casx not cas, also successful casx returns the old value in rd
444         and not the new value.
445
446 1999-05-16  Xavier Leroy  <Xavier.Leroy@inria.fr>
447
448         * manager.c: If pthread_create() is given a NULL attribute
449         and the thread manager runs with a realtime policy, set the
450         scheduling policy of the newly created thread back to SCHED_OTHER.
451         * manager.c: If the PTHREAD_INHERIT_SCHED attribute is given,
452         initialize the schedpolicy field of new_thread->p_start_args
453         to that of the calling thread.
454
455 1999-04-29  Ulrich Drepper  <drepper@cygnus.com>
456
457         * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): cas
458         instruction does not allow memory element to use offset.
459
460 1999-04-28  Ulrich Drepper  <drepper@cygnus.com>
461
462         * manager.c (pthread_allocate_stack): Optimize initialization of new
463         thread descriptor.
464
465         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_define_initialized):
466         Don't use initializer since it is all zeroes.
467         (__libc_once_define): Likewise.
468
469 1999-04-16  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
470
471         * sysdeps/arm/Implies: Removed since cmpxchg/no-cmpxchg
472         doesn't exist anymore.
473         * sysdeps/i386/Implies: Likewise.
474         * sysdeps/m68k/Implies: Likewise.
475         * sysdeps/mips/Implies: Likewise.
476         * sysdeps/powerpc/Implies: Likewise.
477         * sysdeps/sparc/sparc32/Implies: Likewise.
478         * sysdeps/sparc/sparc64/Implies: Likewise.
479
480 1999-04-15  Ulrich Drepper  <drepper@cygnus.com>
481
482         * sysdeps/alpha/bits/semaphore.h: Removed.
483         * sysdeps/powerpc/bits/semaphore.h: Removed.
484         * sysdeps/pthread/cmpxchg/bits/semaphore.h: Removed.
485         * sysdeps/pthread/no-cmpxchg/bits/semaphore.h: Removed.
486         * Makefile (headers): Remove bits/semaphore.h.
487
488         * semaphore.h: Define _pthread_descr if necessary.
489         Don't include limits.h.  Define SEM_VALUE_MAX directly.
490         Define SEM_FAILED.
491         (sem_t): Protect element names with leading __.
492         Add declarations for sem_close, sem_open, and sem_unlink.
493         * semaphore.c: Adjust all functions for new element names.
494         Define sem_close, sem_open, and sem_unlink.
495         * Versions (libthread): Add sem_close, sem_open, and sem_unlink for
496         GLIBC_2.1.1.
497         * sysdeps/pthread/bits/pthreadtypes.h: Define _pthread_descr only if
498         necessary.
499
500 1999-03-16  H.J. Lu  <hjl@gnu.org>
501
502         * specific.c (pthread_key_delete): Check th->p_terminated to see
503         if the thread is running.
504
505         * Versions (__libc_internal_tsd_get, __libc_internal_tsd_set):
506         Added to GLIBC_2.0 for libc.so.
507
508 1999-02-12  H.J. Lu  <hjl@gnu.org>
509
510         * Versions (__libc_current_sigrtmin, __libc_current_sigrtmax,
511         __libc_allocate_rtsig): Added to GLIBC_2.1.
512
513         * internals.h (DEFAULT_SIG_RESTART): Removed.
514         (DEFAULT_SIG_CANCEL): Removed.
515
516         * pthread.c (init_rtsigs, __libc_current_sigrtmin,
517         __libc_current_sigrtmax, __libc_allocate_rtsig): New functions.
518         (__pthread_sig_restart, __pthread_sig_cancel,
519         __pthread_sig_debug): Initialized.
520         (pthread_initialize): Call init_rtsigs () to initialize
521         real-time signals.
522
523 1999-02-03  H.J. Lu  <hjl@gnu.org>
524
525         * manager.c (__pthread_manager): Do block __pthread_sig_debug.
526         Don't restart the thread which sent REQ_DEBUG.
527         (pthread_start_thread): Check if __pthread_sig_debug > 0
528         before debugging.
529
530         * pthread.c (__pthread_initialize_manager): Suspend ourself
531         after sending __pthread_sig_debug to gdb instead of
532         __pthread_sig_cancel.
533
534 1999-01-24  H.J. Lu  <hjl@gnu.org>
535
536         * manager.c (__pthread_manager): Delete __pthread_sig_debug
537         from mask if __pthread_sig_debug > 0.
538         (pthread_handle_create): Increment __pthread_handles_num.
539
540         * manager.c (pthread_handle_create): Don't pass CLONE_PTRACE to clone.
541         * pthread.c (__pthread_initialize_manager): Likewise.
542
543         * pthread.c (pthread_initialize): Use __libc_allocate_rtsig (1)
544         instead of __libc_allocate_rtsig (2).
545         (__pthread_initialize_manager): Send __pthread_sig_debug to gdb
546         instead of __pthread_sig_cancel.
547         (pthread_handle_sigdebug): Fix comments.
548
549 1999-01-21  Ulrich Drepper  <drepper@cygnus.com>
550
551         * manager.c (pthread_allocate_stack): Set
552         __pthread_nonstandard_stacks if user-specified stack is used.
553
554 1999-01-16  Ulrich Drepper  <drepper@cygnus.com>
555
556         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _LFS_ASYNCHRONOUS_IO,
557         _LFS_LARGEFILE, _LFS64_LARGEFILE, and _LFS64_STDIO from Unix98.
558
559 1999-01-07  Xavier Leroy  <Xavier.Leroy@inria.fr>
560
561         * pthread.c: Use a third signal __pthread_sig_debug distinct
562         from __pthread_sig_cancel to notify gdb when a thread is
563         created
564         * manager.c: Likewise.
565         * internals.h: Likewise.
566         * signals.c: The implementation of sigwait(s) assumed that
567         all signals in s have signal handlers already attached.
568         This is not required by the standard, so make it work
569         also if some of the signals have no handlers.
570
571 1999-01-05  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
572
573         * linuxthreads.texi: Remove pointers from first @node.  Move old
574         @node spec inside comment.
575
576 1998-12-31  Ulrich Drepper  <drepper@cygnus.com>
577
578         * sysdeps/pthread/bits/stdio-lock.h: Define _IO_lock_lock and
579         _IO_lock_unlock.
580
581 1998-12-29  Ulrich Drepper  <drepper@cygnus.com>
582
583         * semaphore.c (sem_trywait): Don't forget to unlock the semaphore
584         lock.  Patch by Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>.
585
586 1998-12-21  Ulrich Drepper  <drepper@cygnus.com>
587
588         * manager.c: Threads now send __pthread_sig_cancel on termination.
589         Change clone call and signal masks.
590         * thread.c (pthread_handle_sigrestart): Remove special code for
591         manager.
592         (pthread_handle_sigcancel): In manager thread call
593         __pthread_manager_sighandler.
594         * sysdeps/i386/pt-machine.h (__compare_and_swap): Add memory clobber.
595         * sysdeps/i386/i686/pt-machine.h: Likewise.
596         Patches by Xavier Leroy.
597
598 1998-12-14  Ulrich Drepper  <drepper@cygnus.com>
599
600         * spinlock.c (__pthread_unlock): Don't crash if called for an
601         untaken mutex.  Reported by Ruslan V. Brushkoff <rus@Snif.Te.Net.UA>.
602
603         * Examples/ex6.c: Unbuffer stdout and reduce sleep time to reduce
604         overall runtime.
605
606 1998-12-13  Ulrich Drepper  <drepper@cygnus.com>
607
608         * Examples/ex3.c: Wait until all threads are started before
609         searching for the number to avoid race condition on very fast
610         systems.
611
612 1998-12-08  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
613
614         * sysdeps/pthread/pthread.h: Remove __pthread_setcanceltype
615         declaration since it's not needed.
616
617         * sysdeps/pthread/pthread.h: Move internal functions to ...
618         * internals.h: ...here.
619
620 1998-12-02  H.J. Lu  <hjl@gnu.org>
621
622         * pthread.c (__pthread_sig_restart): Initiliaze to 0 if
623         SIGRTMIN is defined.
624         (__pthread_sig_cancel): Likewise.
625
626 1998-12-01  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
627
628         * wrapsyscall.c: Include <sys/mman.h> for msync,
629         <stdlib.h> for system and <termios.h> for tcdrain prototype.
630         Correct msync declaration.
631
632 1998-11-29  Roland McGrath  <roland@baalperazim.frob.com>
633
634         * sysdeps/pthread/bits/libc-tsd.h (__libc_tsd_define, __libc_tsd_get,
635         __libc_tsd_set): New macros for new interface.
636         * no-tsd.c: New file, provide uninitialized defns of
637         __libc_internal_tsd_get and __libc_internal_tsd_set.
638         * Makefile (routines): Add no-tsd.
639
640 1998-10-12  Roland McGrath  <roland@baalperazim.frob.com>
641
642         * internals.h: Include <bits/libc-tsd.h>, not <bits/libc-lock.h>.
643         * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
644         __libc_internal_tsd_set): Move decls to ...
645         * sysdeps/pthread/bits/libc-tsd.h: New file for __libc_internal_tsd_*
646         declarations.
647
648         * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
649         __libc_internal_tsd_set): Make these pointers to functions, not
650         functions; remove #pragma weak decls for them.
651         * specific.c (__libc_internal_tsd_get, __libc_internal_tsd_set):
652         Define static functions and initialized pointers to them.
653
654 1998-11-18  Ulrich Drepper  <drepper@cygnus.com>
655
656         * Makefile (CFLAGS-mutex.c): Define as -D__NO_WEAK_PTHREAD_ALIASES.
657         (CFLAGS-specific.c): Likewise.
658         (CFLAGS-pthread.c): Likewise.
659         (CFLAGS-ptfork.c): Likewise.
660         (CFLAGS-cancel.c): Likewise.
661         * sysdeps/pthread/bits/libc-lock.h: Don't mark __pthread_* functions
662         as weak references if __NO_WEAK_PTHREAD_ALIASES is defined.
663
664         * mutex.c (pthread_mutex_init): Define as strong symbol.
665         (pthread_mutex_destroy): Likewise.
666         (pthread_mutex_trylock): Likewise.
667         (pthread_mutex_lock): Likewise.
668         (pthread_mutex_unlock): Likewise.
669         (pthread_mutexattr_init): Likewise.
670         (pthread_mutexattr_destroy): Likewise.
671         (pthread_once): Likewise.
672         * ptfork.c (pthread_atfork): Likewise.
673         * specific.c (pthread_key_create): Likewise.
674         (pthread_setspecific): Likewise.
675         (pthread_getspecific): Likewise.
676
677 1998-11-15  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
678
679         * linuxthreads.texi: Fix punctuation after xref.
680
681 1998-11-10  H.J. Lu  <hjl@gnu.org>
682
683         * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine NR_OPEN
684         if it is defined in <linux/limits.h>.
685
686 1998-10-29 14:28  Ulrich Drepper  <drepper@cygnus.com>
687
688         * spinlock.h (__pthread_trylock): Define inline.
689         (__pthread_lock): Add extra parameter to declaration.  Declare
690         using internal_function.
691         (__pthread_unlock): Declare using internal_function.
692         * spinlock.c (__pthread_lock): Add new parameter.  Use it instead
693         of local variable self.  Avoid recomputing self.  Define using
694         internal_function.
695         (__pthread_trylock): Remove.
696         (__pthread_unlock): Define using internal_function.
697         * cancel.c: Adjust for __pthread_lock interface change.  Use already
698         computed self value is possible.
699         * condvar.c: Likewise.
700         * join.c: Likewise.
701         * manager.c: Likewise.
702         * mutex.c: Likewise.
703         * pthread.c: Likewise.
704         * rwlock.c: Likewise.
705         * semaphore.c: Likewise.
706         * signals.c: Likewise.
707
708 1998-10-27 13:46  Ulrich Drepper  <drepper@cygnus.com>
709
710         * sysdeps/pthread/pthread.h (struct _pthread_cleanup_buffer): Prepend
711         __ to field names of the struct.
712         * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_fastlock):
713         Likewise.
714         (pthread_attr_t): Likewise.
715         (pthread_cond_t): Likewise.
716         (pthread_condattr_t): Likewise.
717         (pthread_mutex_t): Likewise.
718         (pthread_mutexattr_t): Likewise.
719         (pthread_rwlock_t): Likewise.
720         (pthread_rwlockattr_t): Likewise.
721         * attr.c: Adjust for pthread.h and pthreadtypes.h change.
722         * cancel.c: Likewise.
723         * condvar.c: Likewise.
724         * manager.c: Likewise.
725         * mutex.c: Likewise.
726         * pthread.c: Likewise.
727         * ptlongjmp.c: Likewise.
728         * rwlock.c: Likewise.
729         * spinlock.c: Likewise.
730
731 1998-10-09  Ulrich Drepper  <drepper@cygnus.com>
732
733         * sysdeps/i386/pt-machine.h (get_eflags, set_eflags): Mark these
734         also with PT_EI.
735
736         * sysdeps/i386/i686/pt-machine.h: Remove unused inline
737         definitions.
738
739         * Makefile (libpthread-routines): Add pt-machine.
740         * pt-machine.c: New file.
741         * sysdeps/alpha/pt-machine.h: Define PT_EI as extern inline is not
742         yet defined.  Use PT_EI in extern inline definitions.
743         * sysdeps/arm/pt-machine.h: Likewise.
744         * sysdeps/i386/pt-machine.h: Likewise.
745         * sysdeps/i386/i686/pt-machine.h: Likewise.
746         * sysdeps/m68k/pt-machine.h: Likewise.
747         * sysdeps/mips/pt-machine.h: Likewise.
748         * sysdeps/powerpc/pt-machine.h: Likewise.
749         * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
750         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
751
752 1998-10-02  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
753
754         * semaphore.h: Include <sys/types.h> so that _pthread_descr
755         is declared.
756
757 1998-09-15  David S. Miller  <davem@pierdol.cobaltmicro.com>
758
759         * sysdeps/sparc/sparc32/pt-machine.h (INIT_THREAD_SELF): Add nr
760         argument.
761         * sysdeps/sparc/sparc64/pt-machine.h (INIT_THREAD_SELF): Likewise.
762
763 1998-09-12 14:24 -0400  Zack Weinberg  <zack@rabi.phys.columbia.edu>
764
765         * linuxthreads/sysdeps/unix/sysv/linux/bits/sigthread.h: Add
766         multiple inclusion guard.
767
768 1998-09-02 11:08  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
769
770         * signals.c (sigaction): Check that sig is less than NSIG to avoid
771         array index overflow.
772
773 1998-09-06 10:56  Ulrich Drepper  <drepper@cygnus.com>
774
775         * sysdeps/pthread/semaphore.h: New file.
776
777 1998-09-06 09:08  Ulrich Drepper  <drepper@cygnus.com>
778
779         * sysdeps/pthread/bits/libc-lock.h (enum __libc_tsd_key_t): Add
780         _LIBC_TSD_KEY_DL_ERROR.
781
782 1998-08-31  Ulrich Drepper  <drepper@cygnus.com>
783
784         * sysdeps/i386/i686/pt-machine.h (testandset): Add memory clobber.
785         * sysdeps/i386/pt-machine.h: Likewise.
786         Suggested by Roland McGrath.
787
788 1998-08-28 13:58  Ulrich Drepper  <drepper@cygnus.com>
789
790         * internals.h: Also define THREAD_GETMEM_NC and THREAD_SETMEM_NC to
791         access thread data with non-constant offsets.
792         * specific.c: Use THREAD_GETMEM_NC and THREAD_SETMEM_NC where
793         necessary.
794
795         * sysdeps/i386/useldt.h: Fix typo.  Add THREAD_GETMEM_NC and
796         THREAD_SETMEM_NC definitions.
797
798         * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM_NC and
799         THREAD_SETMEM_NC.
800         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
801
802 1998-08-26 15:46  Ulrich Drepper  <drepper@cygnus.com>
803
804         * internals.h: Define THREAD_GETMEM and THREAD_SETMEM to default if
805         not already defined.
806         (struct _pthread_descr_struct): Add p_self and p_nr field.
807         * manager.c (__pthread_handles): Define second element to point
808         to manager thread.
809         (__pthread_handles_num): Initialize to 2.
810         (__pthread_manager): Use INIT_THREAD_SELF with two arguments.
811         (pthread_start_thread): Likewise.
812         (pthread_handle_create): Start search for free slot at entry 2.
813         Initialize new fields p_self and p_nr.
814         Call __clone with CLONE_PTRACE if available.
815         (pthread_free): Call FREE_THREAD_SELF if available.
816         * pthread.c (__pthread_initial_thread): Initialize new fields.
817         (__pthread_manager_thread): Likewise.
818         (__pthread_initialize_manager): Call __clone with CLONE_PTRACE.
819
820         * cancel.c: Use THREAD_GETMEM and THREAD_SETMEM to access the
821         elements of the thread descriptor.
822         * condvar.c: Likewise.
823         * errno.c: Likewise.
824         * join.c: Likewise.
825         * manager.c: Likewise.
826         * pthread.c: Likewise.
827         * ptlongjmp.c: Likewise.
828         * semaphore.c: Likewise.
829         * signals.c: Likewise.
830         * specific.c: Likewise.
831         * spinlock.c: Likewise.
832
833         * sysdeps/alpha/pt-machine.h (INIT_THREAD_SELF): Add extra parameter.
834
835         * sysdeps/i386/useldt.h: New file.
836         * sysdeps/i386/i686/pt-machine.h: Show how to use this file.
837
838         * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM and
839         THREAD_SETMEM using __thread_self.
840         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
841
842 1998-08-24  Geoff Keating  <geoffk@ozemail.com.au>
843
844         * spinlock.c (__pthread_lock): Reset p_nextwaiting to NULL if it
845         turned out that we didn't need to queue after all.
846
847 1998-08-22  Geoff Keating  <geoffk@ozemail.com.au>
848
849         * sysdeps/powerpc/pt-machine.h: Remove testandset, it's not used
850         and wastes space; correct types.
851
852 1998-08-08 11:18  H.J. Lu  <hjl@gnu.org>
853
854         * signals.c (sigaction): Handle NULL argument.
855
856 1998-08-04  Ulrich Drepper  <drepper@cygnus.com>
857
858         * sysdeps/unix/sysv/linux/bits/sigthread.h: Use __sigset_t instead
859         of sigset_t.
860
861 1998-08-02  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
862
863         * Makefile (linuxthreads-version): Extract correct number from
864         Banner.
865
866 1998-07-29  Xavier Leroy  <Xavier.Leroy@inria.fr>
867
868         * Banner: Bump version number to 0.8
869         * FAQ.html: Many updates, in particular w.r.t. debugging.
870         * manager.c: Support for non-default stacksize for
871         LinuxThreads-allocated stacks;
872         don't use guard pages for stacks with default size, rely on
873         rlimit(RLIMIT_STACK) instead (it's cheaper).
874         * attr.c: Likewise.
875         * cancel.c: Use __pthread_sig_cancel and __pthread_sig_restart
876         everywhere instead of PTHREAD_SIG_CANCEL and PTHREAD_SIG_RESTART.
877         * condvar.c: Likewise.
878         * internals.h: Likewise.
879         * restart.h: Likewise.
880         * signals.c: Likewise.
881         * pthread.c: Likewise; set rlimit(RLIMIT_STACK) as we need it.
882
883 1998-07-23  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
884
885         * weaks.c: Define pthread_mutexattr_[sg]ettype instead of
886         __pthread_mutexattr_[sg]ettype.  Add more weak aliases.
887         * Versions: Put __pthread_mutexattr_settype under version
888         GLIBC_2.0.  Don't export __pthread_mutexattr_setkind_np and
889         __pthread_mutexattr_gettype.
890
891 1998-07-23  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
892
893         * sysdeps/pthread/bits/libc-lock.h: Make
894         __pthread_mutexattr_settype weak.  Don't make
895         __pthread_mutexattr_setkind_np weak.
896
897 1998-07-16 10:52  Ulrich Drepper  <drepper@cygnus.com>
898
899         * manager.c (pthread_handle_create): Check whether sched_setscheduler
900         call can succeed here.
901
902         * mutex.c: Define __pthread_mutexattr_settype and make
903         __pthread_mutexattr_setkind_np an alias.
904         Likewise for __pthread_mutexattr_gettype.
905
906 1998-07-15 11:00 -0400  Zack Weinberg  <zack@rabi.phys.columbia.edu>
907
908         * attr.c (pthread_attr_setschedpolicy): Don't check whether caller
909         is root.
910
911 1998-07-14 19:38  Ulrich Drepper  <drepper@cygnus.com>
912
913         * sysdeps/pthread/bits/libc-lock.h: Define __libc_cleanup_end.
914
915 1998-07-11  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
916
917         * Examples/ex6.c: Include <unistd.h> for usleep.
918
919 1998-06-13 11:04  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
920
921         * Examples/ex4.c (main): Use exit, not pthread_exit.
922
923 1998-07-09 13:39  Ulrich Drepper  <drepper@cygnus.com>
924
925         * Versions: Add __pthread_mutexattr_gettype and
926         __pthread_mutexattr_settype.
927         * lockfile.c: Use __pthread_mutexattr_settype instead of
928         __pthread_mutexattr_setkind_np.
929         * mutex.c: Define __pthread_mutexattr_gettype and
930         __pthread_mutexattr_settype.
931         * weak.c: Likewise.
932         * sysdeps/pthread/pthread.h: Declare __pthread_mutexattr_gettype and
933         __pthread_mutexattr_settype.
934         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_init_recursive):
935         Use __pthread_mutexattr_settype.
936
937 1998-07-08 22:26  Ulrich Drepper  <drepper@cygnus.com>
938
939         * Versions: Add pthread_mutexattr_gettype, pthread_mutexattr_settype.
940         * mutex.c: Define weak alias pthread_mutexattr_gettype and
941         pthread_mutexattr_settype.
942         * sysdeps/pthread/pthread.h: Declare these functions.
943         Move pthread_sigmask and pthread_kill declaration in separate header.
944         * sysdeps/unix/sysv/linux/bits/sigthread.h: New file.
945
946 1998-07-07 15:20  Ulrich Drepper  <drepper@cygnus.com>
947
948         * Makefile: Add rules to compile and run tests.
949         * Examples/ex1.c: Little changes to fix warnings.
950         * Examples/ex2.c: Likewise.
951         * Examples/ex3.c: Likewise.
952         * Examples/ex4.c: Likewise.
953         * Examples/ex5.c: Likewise.
954         * Examples/ex6.c: New file.
955
956 1998-07-05 11:54  Ulrich Drepper  <drepper@cygnus.com>
957
958         * Versions: Add pthread_attr_init to GLIBC_2.1 version in libc.
959
960 1998-07-01  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
961
962         * attr.c: Include <string.h>.
963
964 1998-06-30 11:47  Ulrich Drepper  <drepper@cygnus.com>
965
966         * attr.c: Include errno.h.  Use memcpy to copy sched_param.
967         * internals.h: Include limits.h.
968         * manager.c: Use memcpy to copy sched_param.
969         * ptfork.c: Include errno.h.
970         * pthread.c: Likewise.
971         * semaphore.c: Likewise.
972         * specific.c: Likewise.
973         * spinlock.h: Likewise.
974         * sysdeps/pthread/pthread.h: Include only allowed headers.  Move
975         type definition to ...
976         * sysdeps/pthread/bits/pthreadtypes.h: ...here.  New file.
977
978 1998-06-29 12:34  Ulrich Drepper  <drepper@cygnus.com>
979
980         * sysdeps/pthread/pthread.h: Use __PMT not __P for function pointers.
981
982         * sysdeps/pthread/pthread.h: Define various PTHREAD_* symbols also
983         as macros as demanded in POSIX.1, Annex C.
984
985 1998-06-29 12:29  Ulrich Drepper  <drepper@cygnus.com>
986
987         * internals.h (struct pthread_request): For free use pthread_t
988         instead of pthread_descr.
989         * join.c (pthread_join): Pass thread_id, not th to manager.
990         (pthread_detach): Likewise.
991         * manager.c (__pthread_manager): Except thread ID in FREE_REQ case.
992         (pthread_exited): Remove detached queue code.
993         (pthread_handle_free): Expect thread ID parameter and use it to
994         validate the thread decsriptor.  Don't use detached queue.
995         Patches by Xavier Leroy.
996
997 1998-06-27  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
998
999         * libpthread.map: Export accept, longjmp, sigaction, siglongjmp,
1000         _IO_flockfile, _IO_ftrylockfile, _IO_funlockfile,
1001         __pthread_atfork, __pthread_key_create, __pthread_once.
1002         * internals.h: Doc fix.
1003         * pthread.c (__pthread_initialize): Define again.
1004
1005 1998-06-26  Ulrich Drepper  <drepper@cygnus.com>
1006
1007         * manager.c (pthread_exited): If thread is not detached put it on
1008         special list.
1009         (pthread_handle_free): If thread is not on list with living threads
1010         search on list with detached threads.
1011
1012         * sysdeps/pthread/pthread.h (PTHREAD_RWLOCK_INITIALIZER): Correct
1013         for new definition of pthread_rwlock_t.
1014
1015         * spinlock.c: Correct test whether to compile
1016         __pthread_compare_and_swap or not.
1017
1018 1998-06-25 19:27  Ulrich Drepper  <drepper@cygnus.com>
1019
1020         * attr.c: Finish user stack support.  Change locking code to be safe
1021         in situations with different priorities.
1022         * cancel.c: Likewise.
1023         * condvar.c: Likewise.
1024         * internals.h: Likewise.
1025         * join.c: Likewise.
1026         * manager.c: Likewise.
1027         * mutex.c: Likewise.
1028         * pthread.c: Likewise.
1029         * ptlongjmp.c: Likewise.
1030         * queue.h: Likewise.
1031         * rwlock.c: Likewise.
1032         * semaphore.c: Likewise.
1033         * semaphore.h: Likewise.
1034         * signals.c: Likewise.
1035         * spinlock.c: Likewise.
1036         * spinlock.h: Likewise.
1037         * sysdeps/pthread/pthread.h: Likewise.
1038         Patches by Xavier Leroy.
1039
1040         * sysdeps/i386/i686/pt-machine.h: New file.
1041
1042 1998-06-25  Ulrich Drepper  <drepper@cygnus.com>
1043
1044         * sysdeps/pthread/pthread.h: Make [sg]et_stacksize and
1045         [sg]et_stackaddr prototypes always available.
1046
1047         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
1048         _POSIX_THREAD_ATTR_STACKSIZE and _POSIX_THREAD_ATTR_STACKADDR.
1049
1050 1998-06-24  Ulrich Drepper  <drepper@cygnus.com>
1051
1052         * manager.c (pthread_free): Undo patch from 980430.
1053         Reported by David Wragg <dpw@doc.ic.ac.uk>.
1054
1055 1998-06-09 15:07  Ulrich Drepper  <drepper@cygnus.com>
1056
1057         * manager.c: Define __pthread_manager_adjust_prio and use it to
1058         increase priority when needed.
1059         * internals.h: Add prototype for __pthread_manager_adjust_prio.
1060         * mutex.c: Optimize mutexes to wake up only one thread.
1061         * pthread.c: Move PID of manager for global variable in structure
1062         element.
1063         Patches by Xavier Leroy.
1064
1065 1998-06-07 13:47  Ulrich Drepper  <drepper@cygnus.com>
1066
1067         * sysdeps/pthread/bits/libc-lock.h: Optimize cleanup handlers a bit.
1068
1069 1998-06-03  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
1070
1071         * attr.c: Correct typo.
1072
1073 1998-05-01  Ulrich Drepper  <drepper@cygnus.com>
1074
1075         * manager.c (pthread_free): Unmap guard before the stack.
1076         Patch by Matthias Urlichs.
1077
1078 1998-04-30  Ulrich Drepper  <drepper@cygnus.com>
1079
1080         * manager.c (pthread_free): Detect already free child.
1081         Patch by Xavier Leroy, reported by Matthias Urlichs.
1082
1083 1998-04-23  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
1084
1085         * Makefile (linuxthreads-version): Renamed back from
1086         libpthread-version.
1087
1088 1998-04-21  Ulrich Drepper  <drepper@cygnus.com>
1089
1090         * ptlongjmp.c: Add prototypes for __libc_siglongjmp and
1091         __libc_longjmp.
1092
1093 1998-04-20 14:55  Ulrich Drepper  <drepper@cygnus.com>
1094
1095         * Makefile (libpthread-routines): Add ptlongjmp and spinlock.
1096         * internals.h: Add definitions for new spinlock implementation.
1097         * ptlongjmp.c: New file.
1098         * spinlock.c: New file.
1099         * spinlock.h (acquire): Don't reschedule using __sched_yield, use
1100         new function __pthread_acquire to prevent deadlocks with thread
1101         with different priorities.
1102         Patches by Xavier Leroy <Xavier.Leroy@inria.fr>.
1103
1104 1998-03-16  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
1105
1106         * manager.c (__pthread_manager): Reduce first argument to select
1107         to include just the needed file descriptor.
1108
1109 1998-03-17 00:06  Ulrich Drepper  <drepper@cygnus.com>
1110
1111         * manager.c: Fix last patch which caused core dumps.
1112
1113         * pthread.c: Correctly handle missing SIGRTMIN.
1114
1115 1998-03-15  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
1116
1117         * libpthread.map: Add __libc_internal_tsd_get and
1118         __libc_internal_tsd_set.  Add missing cancelable functions. Export
1119         libc internal versions of the cancelable functions.
1120
1121 1998-03-13 16:51  Ulrich Drepper  <drepper@cygnus.com>
1122
1123         * weaks.c: Define pthread_attr_init as GLIBC_2.0 and GLIBC_2.1.
1124
1125 1998-03-13 00:46  Ulrich Drepper  <drepper@cygnus.com>
1126
1127         * attr.c: Implement pthread_attr_[gs]etguardsize,
1128         pthread_attr_[gs]setstackaddr, pthread_attr_[gs]etstacksize.
1129         Change pthread_attr_init to have two interfaces.
1130         * internals.h (struct _pthread_descr_struct): Add new fields for
1131         above functions.
1132         * libpthread.map: Add names in GLIBC_2.1 section.
1133         * manager.c (pthread_handle_create): Implement guardsize and
1134         user stack.
1135         (pthread_free): Likewise.
1136         * pthread.c (pthread_create): Add new interface for changed
1137         pthread_attr_t.
1138         * sysdeps/pthread/pthread.h: Add prototypes for new functions.
1139         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add definition of
1140         PTHREAD_STACK_MIN.
1141
1142 1998-03-11 00:42  Wolfram Gloger  <wmglo@dent.med.uni-muenchen.de>
1143
1144         * manager.c: Enable resetting of the thread scheduling policy
1145         to SCHED_OTHER when the parent thread has a different one.
1146
1147 1998-02-01 13:51  Ulrich Drepper  <drepper@cygnus.com>
1148
1149         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
1150         _POSIX_ASYNCHRONOUS_IO.
1151
1152         * sysdeps/pthread/pthread.h: Define bits for Unix98 variants of
1153         mutexes.
1154         * mutex.c: Implement new mutex types.
1155
1156         * internals.h: Include <signal.h>.
1157
1158         * libpthread.map: Add __erno_location and __h_errno_location.
1159
1160         * errno.c: Return pointer to variable actually in use.  This might
1161         not be the one in the thread structure.
1162         * internals.h (struct _pthread_descr_struct): Add new fields p_errnop
1163         and p_h_errnop.
1164         * manager.c (__pthread_manager): Set p_errnop and p_h_errnop member
1165         of manager thread structure.
1166         (pthread_handle_create): Set p_errnop and p_h_errnop members for new
1167         thread.
1168         * pthread.c: Adapt initializer for thread structures.
1169         (__pthread_initial_thread): Set p_errnop and p_h_errnop member.
1170         (__pthread_reset_main_thread): Reset p_errnop and p_h_errnop of
1171         current thread to global variables.
1172
1173 1998-01-31 17:27  Ulrich Drepper  <drepper@cygnus.com>
1174
1175         * rwlock.c: New file.
1176         * Makefile (libpthread-routines): Add rwlock.
1177         * sysdeps/pthread/pthread.h: Define data structures and declare
1178         functions.
1179         * libpthread.map: Add new functions.
1180
1181 1997-12-18 13:50  Philip Blundell  <pb@nexus.co.uk>
1182
1183         * sysdeps/arm/pt-machine.h: New file; add ARM support.
1184         * sysdeps/arm/Implies: likewise.
1185         * README: Document it.
1186
1187 1997-12-13  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
1188
1189         * signals.c: Remove unneeded initializer for sigwaited, saving a
1190         warning.
1191
1192 1997-04-11 01:18  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
1193
1194         * semaphore.c (sem_init): Set sem_spinlock only if available.
1195
1196 1997-12-04 01:48  Ulrich Drepper  <drepper@cygnus.com>
1197
1198         * mutex.c: Implement PTHREAD_MUTEX_CHECKERROR.
1199         * sysdeps/pthread/pthread.h: Define PTHREAD_MUTEX_CHECKERROR.
1200
1201         * Makefile: Update from LinuxThreads 0.7.
1202         * internals.h. Likewise.
1203         * manager.c: Likewise.
1204         * mutex.c: Likewise.
1205         * pthread.c: Likewise.
1206         * signals.c: Likewise.
1207         * specific.c: Likewise.
1208         * Examples/ex3.c: Likewise.
1209
1210 1997-11-20 18:13  Ulrich Drepper  <drepper@cygnus.com>
1211
1212         * pthread.c (__pthread_reset_main_thread): Close pipe only if still
1213         open.
1214
1215 1997-10-29 05:38  Ulrich Drepper  <drepper@cygnus.com>
1216
1217         * wrapsyscall.c: Add socket functions which are also cancelation
1218         points.
1219
1220 1997-10-19 21:40  Wolfram Gloger  <wg@wolfram.dent.med.uni-muenchen.de>
1221
1222         * specific.c (__libc_internal_tsd_set, __libc_internal_tsd_get):
1223         New functions for fast thread specific data within libc.
1224
1225         * internals.h: Add new array p_libc_specific to struct
1226         _pthread_descr_struct.
1227
1228         * sysdeps/pthread/bits/libc-lock.h: Declare new functions.
1229
1230 1997-10-13 05:39  Ulrich Drepper  <drepper@cygnus.com>
1231
1232         * semaphore.h: Add __BEGIN_DECLS/__END_DECLS.
1233         Reported by Ralf Corsepius <corsepiu@faw.uni-ulm.de>.
1234
1235 1997-08-29 03:05  Ulrich Drepper  <drepper@cygnus.com>
1236
1237         * internals.h (struct _pthread_descr_struct): Add definitions for
1238         two-level specific key handling.
1239         * manager.c (pthread_handle_create): Initialize specific memory array.
1240         * specific.c: Implement two-level key handling.
1241         * weaks.c: Don't provide dummy key handling.
1242         * sysdeps/pthread/bits/libc-lock.h: Typedef __libc_lock_t (no #define).
1243         Add definition of __libc_key_t.
1244         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define PTHREAD_KEYS_MAX
1245         as 1024.
1246         Add definition of _POSIX_THREAD_DESTRUCTOR_ITERATIONS and
1247         PTHREAD_DESTRUCTOR_ITERATIONS.
1248
1249         * manager.c (pthread_handle_create): Compare mmap result with
1250         MAP_FAILED.
1251
1252         * ptfork.c: Rename to __pthread_atfork and make old name a weak alias.
1253         * sysdeps/pthread/bits/pthread.h: Add prototype for __pthread_atfork.
1254
1255 1997-08-22 19:04  Richard Henderson  <rth@cygnus.com>
1256
1257         sysdeps/sparc -> sysdeps/sparc/sparc32
1258         sysdeps/sparc64 -> sysdeps/sparc/sparc64
1259
1260         * internals.h: Change definition of THREAD_SELF to be an expression,
1261         not a statement that did a return.
1262         * sysdeps/alpha/pt-machine.h (THREAD_SELF): Update accordingly.
1263         * sysdeps/sparc/sparc32/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF):
1264         Follow Solaris and use a "system reserved" register (%g6) to hold
1265         the thread descriptor.
1266         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
1267
1268 1997-08-03 00:09  Ulrich Drepper  <drepper@cygnus.com>
1269
1270         * mutex.c: Correct pthread_once.  Patch by Xavier Leroy.
1271         * sysdeps/pthread/pthread.h: Add prototype for __pthread_once.
1272         * sysdeps/pthread/bits/pthread.h: Add macros for __libc_once.
1273
1274         * semaphore.c: Include spinlock.h only when needed.
1275
1276         * specific.c (__pthread_setsepcific, __pthread_getspecific): Reject
1277         keys for entries not in use.
1278
1279         * weaks.c: Implement key handling functions for real.
1280
1281 1997-06-29  01:04  Richard Henderson  <richard@gnu.ai.mit.edu>
1282
1283         Initial sparc64-linux support:
1284         * linuxthreads/sysdeps/sparc64/Implies: New file.
1285         * linuxthreads/sysdeps/sparc64/pt-machine.h: Likewise.
1286
1287 1997-06-29 00:48  Ulrich Drepper  <drepper@cygnus.com>
1288
1289         * semaphore.c: Include spinlock.h at correct place.
1290         Patch by HJ Lu.
1291
1292 1997-06-13 10:06  Richard Henderson  <rth@tamu.edu>
1293
1294         The Great Bit File Move:
1295         * sysdeps/alpha/semaphorebits.h: -> .../bits/semaphore.h.
1296         * sysdeps/powerpc/semaphorebits.h: Likewise.
1297         * sysdeps/pthread/cmpxchg/semaphorebits.h: Likewise.
1298         * sysdeps/pthread/no-cmpxchg/semaphorebits.h: Likewise.
1299         * sysdeps/pthread/libc-lock.h: -> bits/
1300         * sysdeps/pthread/stdio-lock.h: Likewise.
1301         * sysdeps/unix/sysv/linux/local_lim.h: Likewise.
1302         * sysdeps/unix/sysv/linux/posix_opt.h: Likewise.
1303         * semaphore.h: Likewise.
1304         * sysdeps/pthread/pthread.h: Likewise.
1305
1306         * lockfile.c: <foo.h> -> <bits/foo.h>.
1307         * semaphore.h: Likewise.
1308
1309         * Makefile: (headers): foo.h -> bits/foo.h.
1310         * sysdeps/pthread/Makefile: Likewise.
1311
1312 1997-04-11 01:18  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
1313
1314         * semaphore.c (sem_init): Set sem_spinlock only if available.
1315
1316         * sysdeps/m68k/pt-machine.h (testandset, __compare_and_swap): Fix
1317         asm constraints.
1318
1319 1997-04-09 03:00  Ulrich Drepper  <drepper@cygnus.com>
1320
1321         Update from LinuxThreads 0.6.
1322
1323         * attr.c (pthread_attr_getdetachstate): Use __sched_get_priority_max
1324         and __sched_get_priority_min instead of names without `__'.
1325
1326         * manager.c: Rewrite large parts to implement opaque pthread_t.
1327
1328         * cancel.c: Adapt for opaque pthread_t type.
1329         * condvar.c: Likewise.
1330         * errno.c: Likewise.
1331         * join.c: Likewise.
1332         * mutex.c: Likewise.
1333         * pthread.c: Likewise.
1334         * signals.c: Likewise.
1335         * specific.c: Likewise.
1336         * restart.h: Likewise.
1337         * queue.h: Likewise.
1338         * Examples/ex3.c: Likewise.
1339         * Examples/ex4.c: Likewise.
1340         * sysdeps/pthread/pthread.h: Likewise.
1341
1342         * pthread.c: Accumulate time for all threads in thread manager.
1343
1344         * semaphore.c: Implement fallback implementation for architectures
1345         sometimes missing compare-exchange operations.
1346
1347         * cancel.c (pthread_cancel): Validate handle argument.
1348         * join.c (pthread_join): Likewise.
1349         (pthread_detach): Likewise.
1350         * signals.c (pthread_kill): Likewise.
1351
1352         * spinlock.h (acquire): Use __sched_yield not sched_yield.
1353
1354         * queue.h (enqueue): Enqueue thread according to priority.
1355
1356         * internals.c (struct pthread_start_args): New struct for passing
1357         args to cloning function.
1358         (struct _pthread): Rename to _pthread_descr_struct and adapt for
1359         opaque pthread_t.
1360
1361         * Examples/Makefile (clean): Pass -f option to rm.
1362
1363         * sysdeps/i386/pt-machine.h: Add check for compare-exchange instruction
1364         and define TEST_FOR_COMPARE_AND_SWAP.
1365         * sysdeps/i386/i486/pt-machine.h: Removed.
1366
1367         * sysdeps/unix/sysv/linux/local_lim.h (PTHREAD_THREADS_MAX): Increase
1368         to 1024.
1369
1370 1997-04-04 16:38  Ulrich Drepper  <drepper@cygnus.com>
1371
1372         * restart.h (suspend): Clear p_signal before suspending.
1373         (suspend_with_cancellation): Likewise.
1374         Patch by Xavier Leroy <Xavier.Leroy@inria.fr>.
1375
1376         * weaks.c: Make __pthread_key_create return 1.
1377         * sysdeps/pthread/libc-lock.h: Define __libc_key_create,
1378         __libc_getspecific, __libc_setspecific, and __libc_key_t.
1379         * sysdeps/pthread/stdio-lock.h: Don't care for implementation not
1380         using libio.
1381
1382 1997-03-19 15:13  Miguel de Icaza  <miguel@nuclecu.unam.mx>
1383
1384         * sysdeps/sparc/pt-machine (RELEASE): Fix.
1385
1386 1997-03-01 07:55  Geoff Keating  <geoffk@ozemail.com.au>
1387
1388         * sysdeps/powerpc/Implies: Added.
1389         * sysdeps/powerpc/pt-machine.h: Added.
1390         * sysdeps/powerpc/semaphorebits.h: Added.
1391
1392 1997-01-22 01:22  Ulrich Drepper  <drepper@cygnus.com>
1393
1394         * linuxtheads/pthread.c (__pthread_initial_thread): Correct
1395         initializer.
1396         (__pthread_manager_thread): Likewise.
1397         Reported by Andreas Jaeger.
1398
1399 1997-01-18 22:15  Richard Henderson  <rth@tamu.edu>
1400
1401         Since sigset_t no longer fits in a register, we can't pass in the
1402         thread's initial mask so easily.  Take this opportunity to simplify
1403         the clone implementation by only accepting a single void* argument.
1404
1405         * linuxthreads/manager.c (__pthread_manager): Put thread vitals
1406         in the thread struct instead of as arguments through clone.
1407         (pthread_start_thread): Look for them there.
1408         * linuxthreads/internals.h (struct _pthread): Add p_initial_fn,
1409         p_initial_fn_arg, p_initial_mask.  Fix __pthread_manager proto.
1410         * linuxthreads/pthread.c (pthread_initialize_manager): Revise
1411         clone invocation.