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