]> git.ipfire.org Git - thirdparty/glibc.git/blob - linuxthreads/ChangeLog
f7a01f462d497e66972ff0e6236062b3fd36c4f8
[thirdparty/glibc.git] / linuxthreads / ChangeLog
1 2003-01-04 Jakub Jelinek <jakub@redhat.com>
2
3 * internals.h (LIBC_THREAD_GETMEM, LIBC_THREAD_SETMEM): Define
4 even if NOT_IN_libc is defined.
5
6 2003-01-05 Jakub Jelinek <jakub@redhat.com>
7
8 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
9 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
10 * sysdeps/s390/Makefile: New file.
11 * sysdeps/s390/tcb-offsets.sym: New file.
12 * sysdeps/s390/tls.h: New file.
13
14 2003-01-03 Richard Henderson <rth@redhat.com>
15
16 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
17
18 2003-01-03 Andreas Jaeger <aj@suse.de>
19
20 * sysdeps/pthread/bits/libc-tsd.h: Declare weak_extern functions.
21
22 2003-01-03 Jakub Jelinek <jakub@redhat.com>
23
24 * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
25
26 2003-01-02 Ulrich Drepper <drepper@redhat.com>
27
28 * tst-cancel-wrappers.sh: Exclude sigwait.c as well, it does not have
29 cancellation tests.
30
31 2003-01-02 Jakub Jelinek <jakub@redhat.com>
32
33 * internals.h (struct pthread_functions): Rename
34 ptr_pthread_cond_* fields to ptr___pthread_cond_*.
35 * pthread.c (pthread_functions): Adjust.
36 * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
37 pthread_cond_*@GLIBC_2.0 compatibility symbols.
38 * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
39 pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
40 and pthread_cond_wait.
41
42 * sysdeps/pthread/bits/pthreadtypes.h (__pthread_cond_align_t): New
43 type.
44 (pthread_cond_t): Add __align member, shorten __padding.
45 * sysdeps/pthread/pthread.h (PHTREAD_COND_INITIALIZER): Initialize
46 __padding and __align too.
47
48 * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call2): Add
49 __builtin_expect.
50 * sysdeps/pthread/sigaction.c: New file.
51 * sysdeps/unix/sysv/linux/raise.c: New file.
52 * sysdeps/unix/sysv/linux/sigwait.c: New file.
53 * sysdeps/unix/sysv/linux/fork.c (__pthread_fork): Protect
54 weak_extern with #ifndef SHARED.
55 * sysdeps/unix/sysv/linux/jmp-unwind.c (__pthread_cleanup_upto):
56 Likewise.
57 * signals.c (__sigaction): Renamed to...
58 (__pthread_sigaction): ... this.
59 (__sigaction): New strong alias, #ifdef SHARED only.
60 (sigaction): Protect with #ifdef SHARED.
61 (sigwait): Renamed to...
62 (__pthread_sigwait): ... this.
63 (sigwait): New strong alias, #ifdef SHARED only.
64 (raise): Renamed to...
65 (__pthread_raise): ... this.
66 (raise): New strong alias, #ifdef SHARED only.
67 * internals.h (__pthread_sigaction, __pthread_sigwait,
68 __pthread_raise): New prototypes.
69 (struct pthread_functions): Add ptr_pthread_sigaction,
70 ptr_pthread_sigwait, ptr_pthread_raise.
71 * pthread.c (pthread_functions): Renamed to...
72 (__pthread_functions): ... this. No longer static, no longer
73 SHARED only. Initialize ptr_pthread_sigaction, ptr_pthread_sigwait
74 and ptr_pthread_raise.
75 [SHARED] (ptr_pthread_functions): Change to &__pthread_functions.
76 * libc-cancellation.c (__pthread_thread_self): Remove weak_extern.
77 * ptfork.c (__fork, __vfork): Protect with #ifdef SHARED.
78 * ptlongjmp.c (siglongjmp, longjmp): Protect with #ifdef SHARED.
79
80 * Makefile (tests, tests-static): Add tst-cancel-static.
81 * tst-cancel-static.c: New test.
82
83 2003-01-02 Jakub Jelinek <jakub@redhat.com>
84
85 * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
86
87 2003-01-02 Ulrich Drepper <drepper@redhat.com>
88
89 * sysdeps/pthread/bits/pthreadtypes.h (pthread_cond_t): Add padding.
90 * condvar.c: Add symbol versioning. The compatibility versions
91 are the same as the change in the interface does not effect this
92 implementation.
93 * Versions [libpthread]: Add definitions for new pthread_cond_*
94 interfaces for version GLIBC_2.3.2.
95
96 2002-12-31 Ulrich Drepper <drepper@redhat.com>
97
98 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
99 __register_atfork.
100 * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
101 for __register_atfork.
102
103 2002-12-31 Jakub Jelinek <jakub@redhat.com>
104
105 * sysdeps/i386/i686/pt-machine.h: Use __ASSEMBLER__ instead of
106 ASSEMBLER test macro.
107 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Likewise.
108 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
109 * sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h: Likewise.
110 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
111 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
112 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
113
114 * sysdeps/pthread/errno-loc.c (__errno_location): Add
115 libc_hidden_def.
116 * sysdeps/pthread/herrno-loc.c (__h_errno_location): Likewise.
117 * sysdeps/pthread/res-state.c (__res_state): Likewise.
118 * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
119 __libc_current_sigrtmax): Likewise.
120 * Versions [libc] (GLIBC_PRIVATE): Remove __libc_internal_tsd_get,
121 __libc_internal_tsd_set, __libc_internal_tsd_address,
122 __libc_alloca_cutoff.
123 [libpthread] (GLIBC_PRIVATE): Remove __libc_internal_tsd_get,
124 __libc_internal_tsd_set, __libc_internal_tsd_address.
125
126 * sysdeps/pthread/list.h: Remove assert.h include.
127 * sysdeps/unix/sysv/linux/fork.c: Include <fork.h>, not "fork.h".
128
129 * sysdeps/pthread/list.h: New file.
130 * sysdeps/unix/sysv/linux/jmp-unwind.c: New file.
131 * sysdeps/unix/sysv/linux/fork.c: New file.
132 * sysdeps/unix/sysv/linux/fork.h: New file.
133 * sysdeps/unix/sysv/linux/ia64/fork.h: New file.
134 * sysdeps/unix/sysv/linux/sparc/fork.h: New file.
135 * sysdeps/unix/sysv/linux/register-atfork.c: New file.
136 * sysdeps/unix/sysv/linux/unregister-atfork.c: New file.
137 * sysdeps/unix/sysv/linux/Makefile: New file.
138 * sysdeps/unix/sysv/linux/Versions: New file.
139 * ptlongjmp.c (pthread_cleanup_upto): Rename to...
140 (__pthread_cleanup_upto): ...this. Add targetframe argument,
141 use it instead of currentframe. No longer static.
142 (siglongjmp, longjmp): Remove pthread_cleanup_upto calls.
143 * internals.h (__pthread_cleanup_upto, __pthread_fork): New prototypes.
144 (struct pthread_functions): Add ptr_pthread_fork,
145 ptr_pthread_cleanup_upto.
146 * pthread.c (pthread_functions): Initialize ptr_pthread_fork and
147 ptr_pthread_cleanup_upto.
148 * ptfork.c: Include fork.h.
149 (struct handler_list, struct handler_list_block): Remove.
150 (pthread_atfork_lock, pthread_atfork_prepare, pthread_atfork_parent,
151 pthread_atfork_child): Remove.
152 (pthread_insert_list, __pthread_atfork, pthread_call_handlers): Remove.
153 (__pthread_fork): New function.
154 (__fork, __vfork): Call __libc_fork.
155 * Makefile (libpthread-routines): Add old_pthread_atfork.
156 (libpthread-nonshared): Add pthread_atfork.
157 (others): Depend on $(objpfx)libpthread_nonshared.a.
158 ($(objpfx)libpthread_nonshared.a): New rule.
159 (install): Depend on $(inst_libdir)/libpthread.so.
160 ($(inst_libdir)/libpthread.so, $(inst_libdir)/libpthread_nonshared.a):
161 New rules.
162 (tests): Depend on libpthread_nonshared.a too.
163 * old_pthread_atfork.c: New file.
164 * pthread_atfork.c: New file.
165 * Makeconfig (shared-thread-library): Include libpthread_nonshared.a
166 too.
167
168 2002-12-30 Jakub Jelinek <jakub@redhat.com>
169
170 * forward.c: Make all functions available by default again. It
171 caused too much trouble.
172 * internals.h (struct pthread_functions): Rename ptr_pthread_exit
173 and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
174 ptr___pthread_attr_init_2_*.
175 * pthread.c (pthread_functions): Adjust.
176
177 2002-12-28 Jakub Jelinek <jakub@redhat.com>
178
179 * libc_pthread_init.c (__libc_pthread_init): Remove
180 MULTIPLE_THREADS_OFFSET check.
181 * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
182 (SYSINFO_OFFSET): Remove.
183 * sysdeps/i386/Makefile [csu] (gen-as-const-headers): Add
184 tcb-offsets.sym.
185 * sysdeps/i386/tcb-offsets.sym: New file.
186 * sysdeps/pthread/tcb-offsets.h: New file.
187 * sysdeps/sparc/sparc32/tls.h: Removed.
188 * sysdeps/sparc/sparc64/tls.h: Move...
189 * sysdeps/sparc/tls.h: ...here. Include tcb-offsets.h in assembler.
190 * sysdeps/sparc/Makefile: New file.
191 * sysdeps/sparc/tcb-offsets.sym: New file.
192 * sysdeps/ia64/tls.h: Include tcb-offsets.h in assembler.
193 * sysdeps/ia64/Makefile: New file.
194 * sysdeps/ia64/tcb-offsets.sym: New file.
195 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
196 (MULTIPLE_THREADS_OFFSET): Remove.
197 Replace defined MULTIPLE_THREADS_OFFSET
198 with defined FLOATING_STACKS && USE___THREAD.
199 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h
200 (MULTIPLE_THREADS_OFFSET): Remove.
201 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
202 (MULTIPLE_THREADS_OFFSET): Remove.
203 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
204 (MULTIPLE_THREADS_OFFSET): Remove.
205 * pthread.c (__pthread_initialize_manager): Remove
206 MULTIPLE_THREADS_OFFSET cbeck.
207
208 * tst-cancel-wrappers.sh: Add line continuations.
209
210 2002-12-27 Jakub Jelinek <jakub@redhat.com>
211
212 * sysdeps/pthread/bits/libc-tsd.h: Include linuxthreads/descr.h
213 and bits/libc-lock.h.
214 (__libc_internal_tsd_get, __libc_internal_tsd_set,
215 __libc_internal_tsd_address): Remove.
216 (__pthread_internal_tsd_address, __pthread_internal_tsd_get,
217 __pthread_internal_tsd_set): New weak_externs.
218 (__libc_tsd_address, __libc_tsd_get, __libc_tsd_set): Define
219 using __libc_maybe_call2.
220 (__libc_tsd_key_t): Move to ...
221 * descr.h (__libc_tsd_key_t): ...here.
222 Remove bits/libc-tsd.h include.
223 * sysdeps/pthread/errno-loc.c: New file.
224 * sysdeps/pthread/herrno-loc.c: New file.
225 * sysdeps/pthread/res-state.c: New file.
226 * libc-cancellation.c (THREAD_GETMEM, THREAD_SETMEM): Remove.
227 (__libc_enable_asynccancel, __libc_disable_asynccancel): Use
228 thread_self unconditionally. Use LIBC_THREAD_[SG]ETMEM instead
229 of THREAD_[SG]ETMEM.
230 * specific.c (libc_internal_tsd_set): Renamed to...
231 __pthread_internal_tsd_set. Remove static.
232 (libc_internal_tsd_get): Renamed to...
233 __pthread_internal_tsd_get. Remove static.
234 (libc_internal_tsd_address): Renamed to...
235 __pthread_internal_tsd_address. Remove static.
236 (__libc_internal_tsd_set, __libc_internal_tsd_get,
237 __libc_internal_tsd_address, __libc_alloca_cutoff): Remove.
238 * internals.h [!NOT_IN_libc] (LIBC_THREAD_GETMEM, LIBC_THREAD_SETMEM):
239 Define.
240 (__pthread_internal_tsd_set, __pthread_internal_tsd_get,
241 __pthread_internal_tsd_address): New prototypes.
242 (struct pthread_functions): Add
243 ptr_pthread_internal_tsd_([sg]et|address) fields.
244 [!NOT_IN_libc && !FLOATING_STACKS] (thread_self): Define.
245 * pthread.c (pthread_functions) [!USE_TLS && !HAVE___THREAD]:
246 Initialize ptr_pthread_internal_tsd_([sg]et|address) fields.
247 * Versions (libpthread): Remove __libc_alloca_cutoff@GLIBC_PRIVATE.
248 * alloca_cutoff.c: New file.
249 * no-tsd.c: Removed.
250 * Makefile (routines): Remove no-tsd. Add alloca_cutoff.
251 * pt-system.c (system): Remove cancellation handling.
252 * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
253 cancellation routines.
254
255 * sysdeps/i386/tls.h: Include dl-sysdep.h and stdint.h.
256 (tcbhead_t): Add sysinfo field.
257 (SYSINFO_OFFSET, INIT_SYSINFO): Define.
258 (TLS_INIT_TP): Use INIT_SYSINFO.
259 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
260 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
261 (MULTIPLE_THREADS_OFFSET): Adjust.
262 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h
263 (MULTIPLE_THREADS_OFFSET): Likewise.
264 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
265 (MULTIPLE_THREADS_OFFSET): Likewise.
266 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
267 (MULTIPLE_THREADS_OFFSET): Likewise.
268 * descr.h: Include stdint.h.
269 (struct _pthread_descr_struct): Add p_header.data.sysinfo field.
270
271 2002-12-22 Jakub Jelinek <jakub@redhat.com>
272
273 * libc_pthread_init.c: Include stdlib.h.
274 * sysdeps/i386/tls.h (tcbhead_t): Add multiple_threads member.
275 (TLS_INIT_TP_EXPENSIVE): Define.
276 * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call,
277 __libc_maybe_call2): In _LIBC check SHARED define.
278 * sysdeps/ia64/tls.h: New file.
279 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
280 * sysdeps/unix/sysv/linux/ia64/Makefile: New file.
281 * sysdeps/x86_64/tls.h (TLS_INIT_TP_EXPENSIVE): Define.
282 * sysdeps/sparc/sparc32/tls.h: New file.
283 * sysdeps/sparc/sparc64/tls.h: New file.
284 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
285 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
286 * Makefile (tests): Add tst-cancel[1-6].
287 (tests-reverse): Add tst-cancel5.
288 Link libc.so before libpthread.so for tests-reverse.
289 * tst-cancel1.c: New file.
290 * tst-cancel2.c: New file.
291 * tst-cancel3.c: New file.
292 * tst-cancel4.c: New file.
293 * tst-cancel5.c: New file.
294 * tst-cancel6.c: New file.
295
296 2002-12-27 Andreas Schwab <schwab@suse.de>
297
298 * sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h: New file.
299
300 2002-12-22 Roland McGrath <roland@redhat.com>
301
302 * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
303
304 2002-12-21 Ulrich Drepper <drepper@redhat.com>
305
306 * pthread.c (init_rtsigs): Remove incomplete __builtin_expect.
307 Reported by Art Hass <ahaas@airmail.net>.
308
309 2002-12-19 Jakub Jelinek <jakub@redhat.com>
310
311 * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
312 Use return 0 as 6th argument to FORWARD4.
313
314 2002-12-18 Jakub Jelinek <jakub@redhat.com>
315
316 * sysdeps/i386/useldt.h (FLOATING_STACKS, ARCH_STACK_MAX_SIZE): Only
317 define if __ASSUME_LDT_WORKS > 0.
318 * libc-cancellation.c (THREAD_GETMEM, THREAD_SETMEM): Redefine to
319 struct member access if !FLOATING_STACKS.
320 * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
321
322 2002-12-18 Jakub Jelinek <jakub@redhat.com>
323
324 * internals.h (__pthread_thread_self): New prototype.
325 (struct pthread_functions): Add ptr_pthread_thread_self field.
326 * pthread.c (pthread_functions): Initialize ptr_pthread_thread_self.
327 (__pthread_thread_self): New function.
328 * libc-cancellation.c (__pthread_thread_self): Add weak_extern.
329 (__libc_enable_asynccancel, __libc_disable_asynccancel): Don't
330 use thread_self() directly if not FLOATING_STACKS.
331
332 2002-12-18 Jakub Jelinek <jakub@redhat.com>
333
334 * sysdeps/x86_64/pt-machine.h: Guard most of the header
335 with #ifndef __ASSEMBLER__.
336 * pthread.c (pthread_functions): Use SHLIB_COMPAT around
337 pthread_attr_init_2_0 use.
338
339 2002-12-17 Jakub Jelinek <jakub@redhat.com>
340
341 * wrapsyscall.c: Removed.
342 * weaks.c: Removed.
343 * Makefile (distribute): Add tst-cancel-wrappers.sh.
344 (routines): Remove weaks. Add forward,
345 libc_pthread_init, libc-cancellation.
346 (shared-only-routines): Remove weaks. Add forward.
347 (libpthread-routines): Remove wrapsyscall.
348 Add ptw-write, ptw-read, ptw-close, ptw-fcntl, ptw-accept,
349 ptw-connect, ptw-recv, ptw-recvfrom, ptw-recvmsg, ptw-send,
350 ptw-sendmsg, ptw-sendto, ptw-fsync, ptw-lseek, ptw-lseek64,
351 ptw-llseek, ptw-msync, ptw-nanosleep, ptw-open, ptw-open64,
352 ptw-pause, ptw-pread, ptw-pread64, ptw-pwrite, ptw-pwrite64,
353 ptw-tcdrain, ptw-wait, ptw-waitpid, pt-system, pt-allocrtsig.
354 (libpthread-shared-only-routines): Add pt-allocrtsig.
355 (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
356 ($(objpfx)tst-cancel-wrappers.out): New rule.
357 * sysdeps/pthread/bits/libc-lock.h: Include linuxthreads/internals.h
358 if in libc.
359 (__libc_maybe_call): In libpthread.* don't check for existance
360 of the function.
361 (__libc_maybe_call2): Define.
362 (__libc_lock_init, __libc_lock_fini, __libc_lock_lock,
363 __libc_lock_trylock, __libc_lock_unlock): Use it.
364 * sysdeps/pthread/flockfile.c: New file.
365 * sysdeps/pthread/ftrylockfile.c: New file.
366 * sysdeps/pthread/funlockfile.c: New file.
367 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
368 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
369 * sysdeps/unix/sysv/linux/allocrtsig.c: New file.
370 * libc-cancellation.c: New file.
371 * forward.c: New file.
372 * libc_pthread_init.c: New file.
373 * pt-system.c: New file.
374 * pthread.c: Remove locale.h.
375 (__pthread_manager_thread): Initialize multiple_threads.
376 (__pthread_multiple_threads): Declare.
377 (pthread_functions): New variable.
378 (__pthread_initialize_minimal): Remove __uselocale call.
379 Call __libc_pthread_init.
380 (__pthread_initialize_manager): Initialize __pthread_multiple_threads,
381 initial thread's multiple_threads and __libc_multiple_threads.
382 Check MULTIPLE_THREADS_OFFSET value. Initialize manager thread's
383 multiple_threads.
384 (pthread_setschedparam, pthread_getschedparam): Rename to __
385 prefixed variants. Add strong_alias.
386 (current_rtmin, current_rtmax, __libc_current_sigrtmin,
387 __libc_current_sigrtmax, __libc_allocate_rtsig): Remove.
388 (init_rtsigs): Use __libc_current_sigrtmin_private.
389 (pthread_initialize): Only call init_rtsigs if
390 !__ASSUME_REALTIME_SIGNALS.
391 (__pthread_require_wrappers, __pthread_require_lockfile): Remove.
392 * internals.h (__pthread_attr_destroy, __pthread_attr_setdetachstate,
393 __pthread_attr_getdetachstate, __pthread_attr_setschedparam,
394 __pthread_attr_getschedparam, __pthread_attr_setschedpolicy,
395 __pthread_attr_getschedpolicy, __pthread_attr_setinheritsched,
396 __pthread_attr_getinheritsched, __pthread_attr_setscope,
397 __pthread_attr_getscope, __pthread_cond_init,
398 __pthread_cond_destroy, __pthread_cond_wait,
399 __pthread_cond_signal, __pthread_cond_broadcast,
400 __pthread_condattr_init, __pthread_condattr_destroy,
401 __pthread_equal, __pthread_getschedparam,
402 __pthread_setschedparam, __pthread_setcancelstate,
403 __pthread_setcanceltype, __pthread_enable_asynccancel,
404 __libc_enable_asynccancel, __libc_pthread_init): New prototype.
405 (__pthread_mutex_init, __pthread_mutex_destroy,
406 __pthread_mutex_lock, __pthread_mutex_unlock,
407 __pthread_mutex_trylock): Likewise.
408 Add hidden_proto.
409 (struct pthread_functions): New type.
410 (__libc_pthread_functions): New variable.
411 (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define.
412 * descr.h (struct _pthread_descr_struct): Add
413 p_header.data.multiple_threads field.
414 * manager.c (pthread_handle_create): Initialize multiple_threads.
415 * cancel.c (__pthread_enable_asynccancel,
416 __pthread_disable_asynccancel): New functions.
417 (__pthread_provide_wrappers): Remove.
418 (pthread_setcancelstate, pthread_setcanceltype): Rename to __
419 prefixed variants. Add strong_alias.
420 * condvar.c (pthread_cond_init, pthread_cond_destroy,
421 pthread_cond_wait, pthread_cond_signal, pthread_cond_broadcast,
422 pthread_condattr_init, pthread_condattr_destroy): Likewise.
423 * join.c (pthread_exit): Likewise.
424 * attr.c (pthread_attr_destroy, pthread_attr_setdetachstate,
425 pthread_attr_getdetachstate, pthread_attr_setschedparam,
426 pthread_attr_getschedparam, pthread_attr_setschedpolicy,
427 pthread_attr_getschedpolicy, pthread_attr_setinheritsched,
428 pthread_attr_getinheritsched, pthread_attr_setscope,
429 pthread_attr_getscope): Likewise.
430 * mutex.c (__pthread_mutex_init, __pthread_mutex_destroy,
431 __pthread_mutex_lock, __pthread_mutex_unlock,
432 __pthread_mutex_trylock): Add hidden_def.
433 * Versions (libc): Add __libc_pthread_init,
434 __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
435 __libc_allocate_rtsig_private @@GLIBC_PRIVATE.
436 * lockfile.c: Remove some USE_IN_LIBIO guards.
437 (__pthread_provide_lockfile): Remove.
438 * pt-allocrtsig.c: New file.
439 * tst-cancel-wrappers.sh: New test.
440
441 2002-12-15 Ulrich Drepper <drepper@redhat.com>
442
443 * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
444 readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
445 * wrapsyscall.c: Remove creat, poll, pselect, readv, select,
446 sigpause, sigsuspend, sigwaitinfo, waitid, and writev wrappers.
447
448 2002-12-10 Ulrich Drepper <drepper@redhat.com>
449
450 * wrapsyscall.c (CANCELABLE_SYSCALL): Don't define function as
451 weak. There is no reason for that.
452 (CANCELABLE_SYSCALL_VA): Likewise.
453
454 2002-12-09 Ulrich Drepper <drepper@redhat.com>
455
456 * wrapsyscall.c: Add wrappers for creat, poll, pselect, readv, select,
457 sigpause, __xpg_sigpause, sigsuspend, sigwaitinfo, waitid, and writev.
458 * Versions: Export creat, poll, pselect, readv, select, sigpause,
459 __xpg_sigpause, sigsuspend, sigwaitinfo, waitid, and writev from
460 libpthread in version GLIBC_2.3.2.
461
462 2002-12-06 Ulrich Drepper <drepper@redhat.com>
463
464 * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
465
466 2002-12-05 Roland McGrath <roland@redhat.com>
467
468 * pthread.c (__pthread_initialize_minimal)
469 [USE_TLS && SHARED && !USE___THREAD]: Initialize TLS and set up the
470 TCB if the dynamic linker didn't do it at startup.
471
472 * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
473 string.
474 (TLS_DO_SET_THREAD_AREA, TLS_DO_MODIFY_LDT, TLS_SETUP_GS_SEGMENT):
475 Submacros updated.
476 * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
477 * sysdeps/alpha/tls.h (TLS_INIT_TP): Likewise (always zero).
478
479 2002-12-03 Roland McGrath <roland@redhat.com>
480
481 * pthread.c (pthread_initialize) [SHARED]: Copy dl_error_tsd value
482 from dynamic linker internal cell to new libc cell.
483
484 2002-11-28 Roland McGrath <roland@redhat.com>
485
486 * tst-context.c: #define IS_IN_libpthread around #include <tls.h>
487 before other headers, so FLOATING_STACKS is not defined wrongly.
488
489 * sysdeps/i386/tls.h [!IS_IN_libpthread]: Enable TLS support
490 even if [! FLOATING_STACKS].
491 (TLS_DO_MODIFY_LDT_KERNEL_CHECK): New macro.
492 If not under [__ASSUME_LDT_WORKS > 0], then do a runtime check of
493 dl_osversion >= 2.3.99 and fatal if not.
494 (TLS_DO_MODIFY_LDT): Use it.
495
496 2002-11-28 Ulrich Drepper <drepper@redhat.com>
497
498 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
499 require it to 200112L. Remove _POSIX_POLL and _POSIX_SELECT.
500 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
501
502 2002-11-19 Ulrich Drepper <drepper@redhat.com>
503
504 * Versions (libc: GLIBC_2.0): Remove names of functions which are
505 not defined in libc.
506 * Makefile (shared-only-routines): Add weaks.
507 * weaks.c: Remove functions which are not exported from libc.so.
508
509 2002-11-14 Roland McGrath <roland@redhat.com>
510
511 * libc-tsd.c: New file.
512 * Makefile (distribute): Add it.
513 (libc-link.so): New variable.
514 ($(objpfx)libpthread.so): Depend on that instead of libc.so file name.
515 (libc-ok-for-link): New variable.
516 [$(versioning) = yes]: Include $(common-objpfx)tls.make and define
517 libc-ok-for-link to $(use-thread).
518 [$(libc-ok-for-link) = no]
519 (libc-link.so): Set to $(objpfx)libc.so, not $(common-objpfx)libc.so.
520 ($(objpfx)libc_pic_lite.a,$(objpfx)libc_pic_lite.os, $(objpfx)libc.so):
521 New targets.
522 (generated): Append them.
523 (extra-objs): Append libc-tsd.os.
524
525 * libc-tls-loc.c: New file.
526 * Makefile (libpthread-routines): Add it.
527
528 2002-11-14 Andreas Schwab <schwab@suse.de>
529
530 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Fix unterminated
531 string.
532
533 2002-11-13 Roland McGrath <roland@redhat.com>
534
535 * Examples/ex6.c (main): Improve error reporting.
536
537 2002-11-04 Ulrich Drepper <drepper@redhat.com>
538
539 * sysdeps/i386/Makefile: Compile pthread.c and sighandler.c with
540 -fno-omit-frame-pointer. Patch by Andreas Steinmetz <ast@domdv.de>.
541
542 * sysdeps/i386/useldt.h [PIC] (USETLS_LOAD_EBX): Use correct input
543 register number.
544 (DO_SET_THREAD_AREA): Mark asm output specifiers correctly.
545
546 2002-10-22 Jakub Jelinek <jakub@redhat.com>
547
548 * manager.c (pthread_start_thread): Call __uselocale even
549 if [! SHARED]. Patch by Leon Kanter <leon@geon.donetsk.ua>.
550
551 2002-10-17 Roland McGrath <roland@redhat.com>
552
553 * Makefile (unload): Don't link in libpthread.so.
554 ($(objpfx)unload.out): Do depend on it.
555 * unload.c (main): Improve error reporting.
556
557 2002-10-09 Roland McGrath <roland@redhat.com>
558
559 * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
560 Under [__PIC__], call the function via the pointer fetched for
561 comparison rather than a call by name that uses the PLT.
562 (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
563 (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
564 (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
565 (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
566 (__libc_key_create, __libc_getspecific, __libc_setspecific)
567 (__libc_atfork): Use it.
568
569 * pthread.c [SHARED] (__libc_dl_error_tsd): New function.
570 (pthread_initialize) [SHARED]: Set _dl_error_catch_tsd to that.
571 * Versions (libc: GLIBC_PRIVATE): Add __libc_dl_error_tsd.
572 (ld: GLIBC_PRIVATE): Set removed.
573
574 2002-10-11 Ulrich Drepper <drepper@redhat.com>
575
576 * sysdeps/unix/sysv/linux/execve.c: New file.
577
578 2002-10-09 Jakub Jelinek <jakub@redhat.com>
579
580 * no-tsd.c: Include stdlib.h.
581
582 2002-10-07 Jakub Jelinek <jakub@redhat.com>
583
584 * sysdeps/unix/sysv/linux/allocalim.h: New file.
585 * descr.h (struct _pthread_descr_struct): Add p_alloca_cutoff
586 field.
587 * manager.c (__pthread_allocate_stack): Add out_stacksize argument.
588 Pass stack size to caller.
589 (pthread_handle_create): Set p_alloca_cutoff.
590 * pthread.c (__pthread_initial_thread): Use C99 designated
591 initializers. Set p_alloca_cutoff.
592 (__pthread_manager_thread): Likewise.
593 (__pthread_initialize_minimal) [USE_TLS]: Set p_alloca_cutoff
594 for initial thread.
595 (__pthread_init_max_stacksize): Possibly decrease p_alloca_cutoff
596 for initial thread.
597 (__pthread_initialize_manager) [USE_TLS]: Set p_alloca_cutoff
598 for manager thread.
599 * specific.c (__libc_alloca_cutoff): New function.
600 * no-tsd.c (__libc_alloca_cutoff): New function.
601 * Versions: Export __libc_alloca_cutoff@@GLIBC_PRIVATE from libc
602 and libpthread.
603
604 2002-10-02 Kaz Kojima <kkojima@rr.iij4u.or.jp>
605
606 * sysdeps/sh/pt-machine.h: Make C code ifndef'ed with __ASSEMBLER__.
607 * sysdeps/sh/tls.h: Likewise.
608 * sysdeps/unix/sysv/linux/sh/smp.h: New file.
609
610 2002-09-29 Jakub Jelinek <jakub@redhat.com>
611
612 * sysdeps/pthread/tst-timer.c (main): Clear
613 SIGEV2.sigev_notify_attributes.
614
615 2002-09-29 Ulrich Drepper <drepper@redhat.com>
616
617 * sysdeps/i386/useldt.h (DO_SET_THREAD_AREA): Don't use
618 INLINE_SYSCALL for set_thread_area syscall.
619
620 2002-09-28 Roland McGrath <roland@redhat.com>
621
622 * pthread.c (__pthread_reset_main_thread) [FLOATING_STACKS]:
623 Don't call setrlimit, since we did no prior bogon we need to undo.
624
625 2002-09-27 Roland McGrath <roland@redhat.com>
626
627 * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Don't include <pt-machine.h>.
628
629 2002-09-24 Roland McGrath <roland@redhat.com>
630
631 * sysdeps/x86_64/tls.h: New file.
632
633 2002-09-23 Roland McGrath <roland@redhat.com>
634
635 * Examples/ex13.c (dump_mut): int -> size_t for counter.
636
637 2002-09-18 Bruno Haible <bruno@clisp.org>
638
639 * Examples/ex10.c (thread): Fail if pthread_mutex_timedlock() returns
640 an unexpected error code.
641
642 * internals.h (__pthread_message): Add const to first parameter type.
643 * pthread.c (__pthread_message): Likewise.
644
645 * sysdeps/unix/sysv/linux/configure: Moved to ../sysdeps/pthread.
646
647 2002-09-17 Roland McGrath <roland@redhat.com>
648
649 * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT, TLS_DO_SET_THREAD_AREA):
650 Set the descriptor limit to the full 4GB, so %gs:OFFSET works for any
651 offset (positive or negative) relative to the thread struct.
652 * sysdeps/i386/useldt.h (DO_MODIFY_LDT, DO_SET_THREAD_AREA): Likewise.
653
654 2002-09-12 Jakub Jelinek <jakub@redhat.com>
655
656 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: Move...
657 * sysdeps/unix/sysv/linux/sparc/Makefile: ...here.
658 Replace /usr/lib/crt[in].o with crt[in].o too.
659
660 2002-09-11 Steven Munroe <sjmunroe@us.ibm.com>
661
662 * sysdeps/powerpc/powerpc64/pt-machine.h: New file.
663
664 2002-09-04 Bruno Haible <bruno@clisp.org>
665
666 * pthread.c: Include <sys/time.h>.
667 (is_smp_system): Move to sysdeps/unix/sysv/linux/smp.h.
668 * sysdeps/unix/sysv/linux/smp.h: New file, extracted from pthread.c.
669 * Makefile (distribute): Add smp.h to the list.
670
671 2002-09-04 Bruno Haible <bruno@clisp.org>
672
673 * sysdeps/alpha/pt-machine.h: Choose different include file location
674 on non-Linux platforms.
675
676 * wrapsyscall.c (PROMOTE_INTEGRAL_TYPE): New macro.
677 (open, open64): Change va_arg argument type to the integral type to
678 which mode_t promotes.
679
680 * sysdeps/pthread/tst-timer.c (main): Don't assume anything about
681 the structure of 'struct sigevent'.
682
683 * errno.c (__errno_location, __h_errno_location, __res_state):
684 Use prototype function definitions.
685
686 2002-07-29 Steven Munroe <sjmunroe@us.ibm.com>
687
688 * shlib-versions: Set libpthread version to 2.3 for powerpc64.
689 * sysdeps/powerpc/pt-machine.h: moved to...
690 * sysdeps/powerpc/powerpc32/pt-machine.h: ...here
691 * sysdeps/powerpc/powerpc64/pt-machine.h: New file.
692
693 2002-09-02 Roland McGrath <roland@redhat.com>
694
695 * sysdeps/powerpc/Makefile (CFLAGS-pt-initfini.s): New variable.
696
697 2002-09-01 Roland McGrath <roland@redhat.com>
698
699 * sysdeps/pthread/bits/libc-tsd.h (enum __libc_tsd_key_t): Add new keys
700 CTYPE_B, CTYPE_TOLOWER, CTYPE_TOUPPER.
701
702 * sysdeps/pthread/bits/libc-tsd.h (__libc_tsd_address): New macro.
703 (__libc_internal_tsd_address): Declare it.
704 * Versions (libc, ld, libpthread: GLIBC_PRIVATE): Add
705 __libc_internal_tsd_address.
706 * specific.c (libc_internal_tsd_address): New function.
707 (__libc_internal_tsd_address): New variable.
708 * no-tsd.c (__libc_internal_tsd_address): New variable.
709
710 2002-08-31 Ulrich Drepper <drepper@redhat.com>
711
712 * Makefile: Don't use rule for crt%.o, spell it out as rules for
713 crti.o and crtn.o.
714
715 2002-08-30 Roland McGrath <roland@redhat.com>
716
717 * Makefile (extra-objs, omit-deps): Add crtn.
718 ($(objpfx)libpthread.so): Depend on $(objpfx)crtn.o.
719 ($(objpfx)libpthread.so: +postinit): Append $(objpfx)crtn.o.
720 ($(objpfx)crtn.S): New target.
721 ($(objpfx)crt%.o): Pattern rule replaces crti.o target.
722 (generated): Add crtn.S.
723
724 * sysdeps/unix/sysv/linux/x86_64/Makefile ($(objpfx)specs): Massage
725 crtn.o pathname too.
726
727 2002-08-30 Jakub Jelinek <jakub@redhat.com>
728
729 * pthread.c (__pthread_initialize_minimal): Call __uselocale even
730 if [! SHARED].
731
732 2002-08-30 Roland McGrath <roland@redhat.com>
733
734 * tst-static-locale.c: New file.
735 * Makefile (tests, tests-static): Add it.
736
737 2002-04-24 Steven Munroe <sjmunroe@us.ibm.com>
738
739 * spinlock.c (__pthread_lock): Fix spurious wakeup
740 handling. Don't clear lowest bit of list pointer as sign the thread
741 is still on the wait list. Don't restart after spurious wakeup
742 with spinning to get the lock.
743 (__pthread_unlock): Take set lowest bit into account when handling
744 pointer to list elements.
745 Patch by Steve Munroe <sjmunroe@us.ibm.com>.
746
747 2002-08-28 Roland McGrath <roland@redhat.com>
748
749 * sysdeps/pthread/timer_routines.c (thread_func): Fix type in cast.
750
751 2002-08-28 Jakub Jelinek <jakub@redhat.com>
752
753 * sysdeps/unix/sysv/linux/hppa/aio_cancel.c: New file.
754 * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
755 * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
756
757 2002-08-28 Ulrich Drepper <drepper@redhat.com>
758
759 * sysdeps/pthread/timer_routines.c (thread_func): Change return
760 type to void and add casts in use to avoid warnings with all gcc
761 versions.
762
763 2002-08-08 Jakub Jelinek <jakub@redhat.com>
764
765 * sysdeps/unix/sysv/linux/bits/local_lim.h (PTHREAD_THREADS_MAX):
766 Bump to 16384.
767 * manager.c (__pthread_handles): Remove.
768 * pthandles.c: New file.
769 * pthread.c (__pthread_initialize_minimal): Initialize
770 __pthread_handles[0] and __pthread_handles[1].
771 * Makefile (libpthread-routines): Add pthandles (must be last).
772
773 2002-08-26 Brian Youmans <3diff@gnu.org>
774
775 * Examples/ex10.c: Corrected version number in Lesser GPL copying
776 permission notice from 2 to 2.1.
777 * Examples/ex11.c: Likewise.
778 * Examples/ex13.c: Likewise.
779 * Examples/ex8.c: Likewise.
780 * Examples/ex9.c: Likewise.
781 * barrier.c: Likewise.
782 * events.c: Likewise.
783 * lockfile.c: Likewise.
784 * no-tsd.c: Likewise.
785 * pt-machine.c: Likewise.
786 * ptclock_gettime.c: Likewise.
787 * ptclock_settime.c: Likewise.
788 * rwlock.c: Likewise.
789 * sysdeps/alpha/pspinlock.c: Likewise.
790 * sysdeps/alpha/pt-machine.h: Likewise.
791 * sysdeps/arm/pspinlock.c: Likewise.
792 * sysdeps/arm/pt-machine.h: Likewise.
793 * sysdeps/cris/pspinlock.c: Likewise.
794 * sysdeps/cris/pt-machine.h: Likewise.
795 * sysdeps/hppa/pspinlock.c: Likewise.
796 * sysdeps/hppa/pt-machine.h: Likewise.
797 * sysdeps/i386/i686/pt-machine.h: Likewise.
798 * sysdeps/i386/pspinlock.c: Likewise.
799 * sysdeps/i386/pt-machine.h: Likewise.
800 * sysdeps/i386/useldt.h: Likewise.
801 * sysdeps/ia64/pspinlock.c: Likewise.
802 * sysdeps/ia64/pt-machine.h: Likewise.
803 * sysdeps/m68k/pspinlock.c: Likewise.
804 * sysdeps/m68k/pt-machine.h: Likewise.
805 * sysdeps/mips/pspinlock.c: Likewise.
806 * sysdeps/mips/pt-machine.h: Likewise.
807 * sysdeps/powerpc/pspinlock.c: Likewise.
808 * sysdeps/powerpc/pt-machine.h: Likewise.
809 * sysdeps/pthread/bits/initspin.h: Likewise.
810 * sysdeps/pthread/bits/libc-lock.h: Likewise.
811 * sysdeps/pthread/bits/libc-tsd.h: Likewise.
812 * sysdeps/pthread/getcpuclockid.c: Likewise.
813 * sysdeps/pthread/posix-timer.h: Likewise.
814 * sysdeps/pthread/timer_create.c: Likewise.
815 * sysdeps/pthread/timer_delete.c: Likewise.
816 * sysdeps/pthread/timer_getoverr.c: Likewise.
817 * sysdeps/pthread/timer_gettime.c: Likewise.
818 * sysdeps/pthread/timer_routines.c: Likewise.
819 * sysdeps/pthread/timer_settime.c: Likewise.
820 * sysdeps/pthread/tst-timer.c: Likewise.
821 * sysdeps/s390/pspinlock.c: Likewise.
822 * sysdeps/s390/s390-32/pt-machine.h: Likewise.
823 * sysdeps/s390/s390-64/pt-machine.h: Likewise.
824 * sysdeps/sh/pspinlock.c: Likewise.
825 * sysdeps/sh/pt-machine.h: Likewise.
826 * sysdeps/sparc/sparc32/pspinlock.c: Likewise.
827 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
828 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: Likewise.
829 * sysdeps/sparc/sparc64/pspinlock.c: Likewise.
830 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
831 * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
832 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
833 * sysdeps/unix/sysv/linux/bits/sigthread.h: Likewise.
834 * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: Likewise.
835 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
836 * tststack.c: Likewise.
837 * unload.c: Likewise.
838 * weaks.c: Likewise.
839 * wrapsyscall.c: Likewise.
840
841 * sysdeps/pthread/pt-initfini.c: Changed copying
842 permission notice to Lesser GPL from Library GPL, including the
843 references in the special exception.
844 * sysdeps/unix/sysv/linux/hppa/pt-initfini.c: Likewise.
845 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Likewise.
846 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c:
847 Likewise.
848 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c:
849 Likewise.
850 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: Likewise.
851
852 2002-08-26 Ulrich Drepper <drepper@redhat.com>
853
854 * Examples/ex10.c (thread): tv_nsec == 1000000000 is already
855 overflow [PR libc/4244].
856
857 2002-08-25 Ulrich Drepper <drepper@redhat.com>
858
859 * sysdeps/pthread/timer_routines.c (thread_func): Make the
860 compiler happy by adding a return statement which will never be
861 reached.
862
863 * tst-context.c (main): Cast to long before casting to pointer.
864
865 * Examples/ex17.c (main): Use correct format string.
866
867 * Examples/ex9.c (thread): Remove incorrect return statement.
868
869 2002-08-23 Ulrich Drepper <drepper@redhat.com>
870
871 * pthread.c (__linuxthreads_version): New global constant.
872
873 2002-08-23 Andreas Jaeger <aj@suse.de>
874
875 * sysdeps/x86_64/pt-machine.h: Use %fs instead of %gs
876 as thread specific register.
877 (testandset): Fix inline asm.
878 (THREAD_GETMEM): Fix inline asm.
879
880 2002-08-22 Roland McGrath <roland@redhat.com>
881
882 * sysdeps/i386/useldt.h (INIT_THREAD_SELF): Remove [HAVE_TLS_SUPPORT]
883 conditional.
884 (INIT_THREAD_SELF): Pass second arg to DO_SET_THREAD_AREA.
885 (DO_SET_THREAD_AREA): Take second arg, pass to DO_SET_THREAD_AREA_REUSE
886 macro. That chooses whether to reuse %gs value or let kernel set it.
887 [USE_TLS] (DO_SET_THREAD_AREA_REUSE): New macro, always 1.
888 [!USE_TLS] (DO_SET_THREAD_AREA_REUSE): New macro, true if arg is
889 not constant 0.
890
891 2002-08-21 Ulrich Drepper <drepper@redhat.com>
892
893 * sysdeps/i386/tls.h (TLS_SETUP_GS_SEGMENT): Add new parameter
894 also to the third definition of this macro.
895
896 2002-06-17 Andreas Jaeger <aj@suse.de>
897
898 * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
899 Set it.
900
901 2002-08-20 Ulrich Drepper <drepper@redhat.com>
902
903 * sysdeps/i386/useldt.h: Go back to using 16-bit instructions when
904 loading/reading segment registers. Some old hardware doesn't
905 handle the 32-bit instructions as expected.
906 * sysdeps/i386/tls.h: Likewise.
907
908 * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Second parameter is
909 renamed to secondcall and use is negated.
910 (TLS_SETUP_GS_SEGMENT): Likewise.
911 (TLS_INIT_TP): Likewise.
912 * sysdeps/sh/tls.h (TLS_INIT_TP): Second parameter is renamed to
913 secondcall.
914
915 * sysdeps/i386/tls.h: Use 32-bit operations when handling segment
916 registers. No need to mask upper 16 bits in this case.
917 * sysdeps/i386/useldt.h: Likewise.
918 (DO_SET_THREAD_AREA): We have to load %gs again even if the value
919 is the same since the GDT content changed.
920
921 * sysdeps/i386/tls.h (TLS_INIT_TP): Add new parameter and pass it on
922 to TLS_SETUP_GS_SEGMENT.
923 (TLS_SETUP_GS_SEGMENT): Add new parameter and pass it on to
924 TLS_DO_SET_THREAD_AREA.
925 (TLS_DO_SET_THREAD_AREA): If new parameter is zero determine
926 entry number from %gs value.
927 * sysdeps/sh/tls.h (TLS_INIT_TP): Add new parameter and simply
928 ignore it.
929
930 * manager.c (pthread_handle_create): Pass NULL to _dl_allocate_tls.
931 Pass true to _dl_deallocate_tls.
932 (pthread_free): Likewise.
933 * pthread.c (__pthread_initialize_manager): Likewise.
934
935 2002-08-19 Ulrich Drepper <drepper@redhat.com>
936
937 * sysdeps/i386/useldt.h (DO_SET_THREAD_AREA): Use correct shift when
938 computing index from %gs value.
939
940 2002-08-16 Roland McGrath <roland@redhat.com>
941
942 * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Calculate segment
943 register value from entry number properly.
944
945 * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT): Rewrite asm to use %ebx
946 optimally conditional on [__PIC__].
947 (TLS_DO_SET_THREAD_AREA): New macro, implement inline syscall
948 without touching errno, and use latest modify_ldt-like interface.
949 (TLS_SETUP_GS_SEGMENT): Use that instead of INLINE_SYSCALL.
950 * sysdeps/i386/useldt.h (DO_MODIFY_LDT): Set %gs in this macro.
951 (DO_SET_THREAD_AREA): New macro, uses current syscall interface with
952 existing %gs value as the segment to set.
953 (INIT_THREAD_SELF): Rewritten using those. Use set_thread_area only
954 under [HAVE_TLS_SUPPORT] so we can rely on the initialization done
955 by the first thread's early TLS setup.
956
957 2002-08-15 Roland McGrath <roland@redhat.com>
958
959 * sysdeps/i386/tls.h (TLS_INIT_TP): Use statement expression and
960 return a value as callers now expect.
961
962 2002-08-11 Roland McGrath <roland@redhat.com>
963
964 * pthread.c (__pthread_initialize_manager): Initialize
965 p_header.data.tcb field of manager thread's descriptor.
966 (__pthread_initialize_minimal): Don't initialize p_header.data.self
967 field, already done by TLS_INIT_TP.
968
969 * manager.c (pthread_handle_create): Move p_header field initializers
970 together.
971
972 2002-08-08 Ulrich Drepper <drepper@redhat.com>
973
974 * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Removed.
975
976 2002-08-07 Ulrich Drepper <drepper@redhat.com>
977
978 * pthread.c (__linuxthreads_initial_report_events): New variable.
979 (__pthread_initialize_manager): Use it to initialize p_report_events
980 of initial thread.
981 [TLS]: Store pointer to descriptor of manager in __pthread_handles.
982
983 2002-08-07 Roland McGrath <roland@redhat.com>
984
985 * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT): Add an extra argument with
986 an "m" constraint to the asm so the compiler knows LDT_ENTRY was used.
987
988 2002-08-02 Roland McGrath <roland@redhat.com>
989
990 * sysdeps/pthread/bits/libc-tsd.h (enum __libc_tsd_key_t):
991 Add _LIBC_TSD_KEY_LOCALE.
992 * manager.c (pthread_start_thread) [!(USE_TLS && HAVE___THREAD)]:
993 Call __uselocale to initialize our per-thread locale pointer to
994 the global one.
995 * pthread.c (__pthread_initialize_minimal): Likewise.
996
997 * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Add missing \s.
998
999 2002-08-02 Ulrich Drepper <drepper@redhat.com>
1000
1001 * pthread.c: Declare _errno, _h_errno, and _res unless we use TLS
1002 internally.
1003
1004 * cancel.c (__pthread_perform_cleanup) [USE_TLS && HAVE___THREAD]:
1005 Don't use p_libc_specific element in thread descriptor.
1006
1007 2002-07-30 Roland McGrath <roland@redhat.com>
1008
1009 * sysdeps/pthread/bits/libc-tsd.h: Include <tls.h>.
1010 [USE_TLS && HAVE___THREAD]: Just include the sysdeps/generic file,
1011 which does the right thing when __thread support is available.
1012 * descr.h (struct _pthread_descr_struct) [USE_TLS && HAVE___THREAD]:
1013 Omit `p_libc_specific', `p_errnop', `p_errno', `p_h_errnop',
1014 `p_h_errno', `p_resp', and `p_res' members.
1015 * pthread.c (__pthread_initialize_minimal) [USE_TLS && HAVE___THREAD]:
1016 Don't initialize `p_errnop' and `p_h_errnop' members.
1017 (__pthread_reset_main_thread): Likewise.
1018 (__pthread_initialize_manager): Likewise.
1019 * manager.c (__pthread_manager, pthread_handle_create): Likewise.
1020 * pthread.c (pthread_initialize) [USE_TLS && HAVE___THREAD]:
1021 Don't initialize `p_resp' member.
1022 (__pthread_reset_main_thread): Likewise.
1023 * manager.c (pthread_handle_create): Likewise.
1024 * specific.c (libc_internal_tsd_set, libc_internal_tsd_get):
1025 Conditionalize these on [!(USE_TLS && HAVE___THREAD)].
1026 * no-tsd.c: Conditionalize contents on [!(USE_TLS && HAVE___THREAD)].
1027 * errno.c [USE_TLS && HAVE___THREAD]
1028 (__h_errno_location, __res_state): Don't define these at all.
1029
1030 * sysdeps/i386/tls.h (INSTALL_DTV): Add parens around arguments!
1031 (INSTALL_NEW_DTV, GET_DTV): Likewise.
1032 * sysdeps/sh/tls.h (INSTALL_DTV, INSTALL_NEW_DTV, GET_DTV): Likewise.
1033
1034 * weaks.c: Don't include <errno.h> here.
1035
1036 2002-08-01 Roland McGrath <roland@redhat.com>
1037
1038 * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT): New macro, broken out of
1039 TLS_INIT_TP.
1040 (TLS_DO_SET_THREAD_AREA): New macro, uses thread_set_area syscall.
1041 (TLS_SETUP_GS_SEGMENT): New macro, try one or the other or both.
1042 (TLS_INIT_TP): Use that.
1043
1044 2002-08-02 Jakub Jelinek <jakub@redhat.com>
1045
1046 * sysdeps/i386/useldt.h (DO_MODIFY_LDT): Move from INIT_THREAD_SELF.
1047 (INIT_THREAD_SELF): Use sys_thread_area syscall instead if available.
1048 (FREE_THREAD): Avoid modify_ldt if using GDT.
1049 * sysdeps/i386/pspinlock.c (__have_no_set_thread_area): New variable.
1050
1051 2002-07-25 Jakub Jelinek <jakub@redhat.com>
1052
1053 * sysdeps/i386/tls.h: Use __ASSEMBLER__ test macro not ASSEMBLER.
1054 * sysdeps/i386/pt-machine.h: Likewise.
1055 * sysdeps/i386/useldt.h: Likewise.
1056
1057 2002-07-22 Ulrich Drepper <drepper@redhat.com>
1058
1059 * pthread.c (__pthread_initialize_minimal): If !SHARED and TLS
1060 call __libc_setup_tls first.
1061 * Makefile: Actually create tst-signal.out file when running the test.
1062 (tests): Add tststatic.
1063 * Examples/tststatic.c: New file.
1064
1065 2002-07-19 Ulrich Drepper <drepper@redhat.com>
1066
1067 * errno.c (__errno_location): Don't define unless !USE_TLS
1068 || !HAVE___THREAD.
1069 * sysdeps/i386/pt-machine.c: Protect C code with #ifndef ASSEMBLER.
1070 * sysdeps/i386/tls.h: Likewise.
1071 * sysdeps/i386/useldt.h: Likewise.
1072 * sysdeps/i386/i686/pt-machine.h: Likewise.
1073
1074 2002-07-02 H.J. Lu <hjl@gnu.org>
1075
1076 * sysdeps/mips/pspinlock.c: Don't include <sgidefs.h>. Always
1077 use ll/sc.
1078 * sysdeps/mips/pt-machine.h: Likewise.
1079
1080 2002-07-14 Ulrich Drepper <drepper@redhat.com>
1081
1082 * manager.c (pthread_handle_create): Initialize self-reference in
1083 descriptor.
1084
1085 2002-07-01 Jakub Jelinek <jakub@redhat.com>
1086
1087 * Examples/ex9.c (main): Remove unused th variable.
1088
1089 2002-07-10 Ulrich Drepper <drepper@redhat.com>
1090
1091 * wrapsyscall.c: Add __nanosleep alias.
1092 * Versions (GLIBC_2.2.6): Add __nanosleep.
1093 * bug-sleep.c: New file.
1094 * Makefile (tests): Add bug-sleep.
1095
1096 2002-06-19 Steven Munroe <sjmunroe@vnet.ibm.com>
1097
1098 * Examples/ex9.c (main): Use list of children and join them.
1099 (thread): Do not call exit.
1100
1101 2002-06-20 Ulrich Drepper <drepper@redhat.com>
1102
1103 * spinlock.c (wait_node_alloc): We cannot use compare-and-exchange.
1104 Unconditionally use the code using spinlock. Use __pthread_release
1105 to free a spinlock.
1106 (wait_node_free): Likewise.
1107 (__pthread_acquire, __pthread_release): Unconditionally define.
1108
1109 2002-06-07 Jakub Jelinek <jakub@redhat.com>
1110
1111 * sysdeps/ia64/pt-machine.h (MEMORY_BARRIER): Fix typo.
1112
1113 2002-05-24 Ulrich Drepper <drepper@redhat.com>
1114
1115 * sysdeps/ia64/pt-machine.h (MEMORY_BARRIER): Use __sync_synchronize.
1116
1117 2002-05-21 Ulrich Drepper <drepper@redhat.com>
1118
1119 * sysdeps/pthread/pthread.h (pthread_create): Rename first
1120 parameter.
1121 (pthread_cancel): Likewise.
1122 * internals.h (__pthread_create_2_1): Likewise.
1123 * sysdeps/unix/sysv/linux/bits/sigthread.h (pthread_kill): Likewise.
1124
1125 2002-05-20 Ulrich Drepper <drepper@redhat.com>
1126
1127 * sysdeps/alpha/pt-machine.c (THREAD_SELF): Remove clobber.
1128 Patch by Glen Nakamura <gen@flex.com>.
1129
1130 2002-05-03 Ulrich Drepper <drepper@redhat.com>
1131
1132 * signals.c: Move sighandler functions to...
1133 * sighandler.c: ...here. New file.
1134 * signals.c: Move signal handler related type definitions to...
1135 * internals.h: ...here. Add prototypes for signal handlers.
1136 * Makefile (libpthread-routines): Add sighandler.
1137 (CFLAGS-sighandler.c): Add $(exceptions).
1138
1139 2002-04-30 Jakub Jelinek <jakub@redhat.com>
1140
1141 * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
1142
1143 2002-04-08 Ulrich Drepper <drepper@redhat.com>
1144
1145 * sysdeps/pthread/timer_getoverr.c: Return real overrun.
1146 * sysdeps/pthread/posix-timer.h (struct timer_node): Add overrun_count.
1147 * sysdeps/pthread/timer_routines.c (thread_func): Schedule next timeout
1148 based on previous one and not on current time. Count overruns.
1149 Patch by Eric F. Sorton <eric@cctcorp.com>.
1150
1151 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add DELAYTIMER_MAX.
1152
1153 2002-04-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
1154
1155 * sysdeps/sh/pt-machine.h: Define _PT_MACHINE_H
1156 if it isn't defined yet.
1157 (FLOATING_STACKS, ARCH_STACK_MAX_SIZE): Defined.
1158 (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
1159 Likewise.
1160 * sysdeps/sh/tls.h: New file.
1161
1162 2002-04-08 Jakub Jelinek <jakub@redhat.com>
1163
1164 * manager.c (__pthread_manager_event): Use self instead of arg
1165 for INIT_THREAD_SELF.
1166 * sysdeps/i386/useldt.h (INIT_THREAD_SELF): Use sizeof (struct
1167 _pthread_descr_struct) instead of sizeof (*descr).
1168
1169 2002-04-05 Ulrich Drepper <drepper@redhat.com>
1170
1171 * sysdeps/ia64/pt-machine.h: Protect against multiple inclusion.
1172 * sysdeps/alpha/pt-machine.h: Likewise.
1173 * sysdeps/arm/pt-machine.h: Likewise.
1174 * sysdeps/cris/pt-machine.h: Likewise.
1175 * sysdeps/hppa/pt-machine.h: Likewise.
1176 * sysdeps/m68k/pt-machine.h: Likewise.
1177 * sysdeps/mips/pt-machine.h: Likewise.
1178 * sysdeps/powerpc/pt-machine.h: Likewise.
1179 * sysdeps/s390/s390-32/pt-machine.h: Likewise.
1180 * sysdeps/s390/s390-64/pt-machine.h: Likewise.
1181 * sysdeps/sh/pt-machine.h: Likewise.
1182 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
1183 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
1184 * sysdeps/x86_64/pt-machine.h: Likewise.
1185
1186 2002-04-05 Jakub Jelinek <jakub@redhat.com>
1187
1188 * man/pthread_mutexattr_init.man (pthread_mutexattr_settype): Document
1189 instead of pthread_mutexattr_setkind_np.
1190 (pthread_mutexattr_gettype): Similarly.
1191 * man/pthread_mutexattr_setkind_np.man: New.
1192 * man/Makefile (SOURCES): Add pthread_mutexattr_setkind_np.man.
1193
1194 2002-04-02 Ulrich Drepper <drepper@redhat.com>
1195
1196 * sysdeps/ia64/pt-machine.h (MEMORY_BARRIER): Define.
1197
1198 2002-03-22 Jakub Jelinek <jakub@redhat.com>
1199
1200 * sysdeps/mips/pt-machine.h (MEMORY_BARRIER): Remove.
1201
1202 2002-03-22 Ulrich Drepper <drepper@redhat.com>
1203
1204 * internals.h (MEMORY_BARRIER): Define as asm with memory as clobber.
1205
1206 2002-03-17 Andreas Jaeger <aj@suse.de>
1207
1208 * sysdeps/i386/pt-machine.h: Add testandset and __compare_and_swap
1209 prototpyes.
1210 * sysdeps/alpha/pt-machine.h: Likewise.
1211 * sysdeps/arm/pt-machine.h: Likewise.
1212 * sysdeps/cris/pt-machine.h: Likewise.
1213 * sysdeps/hppa/pt-machine.h: Likewise.
1214 * sysdeps/i386/i686/pt-machine.h: Likewise.
1215 * sysdeps/ia64/pt-machine.h: Likewise.
1216 * sysdeps/m68k/pt-machine.h: Likewise.
1217 * sysdeps/mips/pt-machine.h: Likewise.
1218 * sysdeps/powerpc/pt-machine.h: Likewise.
1219 * sysdeps/s390/s390-32/pt-machine.h: Likewise.
1220 * sysdeps/s390/s390-64/pt-machine.h: Likewise.
1221 * sysdeps/sh/pt-machine.h: Likewise.
1222 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
1223 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
1224 * sysdeps/x86_64/pt-machine.h: Likewise.
1225
1226 * internals.h: Move testandset and __compare_and_swap prototypes
1227 to pt-machine.h.
1228
1229 2002-03-03 Andreas Jaeger <aj@suse.de>
1230
1231 * errno.c: Include resolv.h to avoid warning.
1232
1233 2002-02-27 Ulrich Drepper <drepper@redhat.com>
1234
1235 * pthread.c [USE_TLS] (thread_self_stack): Correct check for upper
1236 stack limit.
1237
1238 2002-02-23 Ulrich Drepper <drepper@redhat.com>
1239
1240 * attr.c (pthread_getattr_np): Don't take thread descriptor size
1241 into account if USE_TLS.
1242 * manager.c (pthread_handle_create): Free TLS data structures if call
1243 failed. Pass correct stack to clone if USE_TLS.
1244 * sysdeps/i386/pt-machine.h: Handle multiple inclusion.
1245 * sysdeps/i386/i686/pt-machine.h: Likewise.
1246 * sysdeps/i386/tls.h: Unconditionally include <pt-machine.h>.
1247
1248 * descr.h (struct _pthread_descr_struct): Update p_header for TLS.
1249 Add p_stackaddr element #if USE_TLS.
1250 * internals.c: Include <tls.h>.
1251 * manager.c: Integrate creating and handling of thread descriptor
1252 for TLS.
1253 * pthread.c: Likewise.
1254 * sysdeps/i386/tls.h (tcbhead_t): Add self pointer.
1255 Include <linuxthreads/descr.h> only if TLS is really used.
1256 (GET_DTV): New macro.
1257 (TLS_INIT_TP): Initialize self pointer.
1258
1259 2002-02-17 Andreas Schwab <schwab@suse.de>
1260
1261 * signals.c (sigwait): Check for old sighandler being SIG_ERR,
1262 not NULL.
1263
1264 2002-02-12 Ulrich Drepper <drepper@redhat.com>
1265
1266 * sysdeps/i386/tls.c (INSTALL_NEW_DTV): Define.
1267 (INSTALL_DTV): Adjust for being passed pointer to element with length.
1268
1269 2002-02-08 Ulrich Drepper <drepper@redhat.com>
1270
1271 * sysdeps/i386/tls.h (TLS_INIT_TP): Also initialize %gs.
1272
1273 2002-02-08 Richard Henderson <rth@redhat.com>
1274
1275 * sysdeps/alpha/elf/pt-initfini.c: Use \n\ for multiline string.
1276
1277 2002-02-08 Ulrich Drepper <drepper@redhat.com>
1278
1279 * sysdeps/i386/tls.h: TLS cannot be supported with FLOATING_STACKS
1280 after all.
1281
1282 2002-02-07 H.J. Lu <hjl@gnu.org>
1283
1284 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Silence the
1285 gcc warning.
1286 (__pthread_spin_lock): Remove ".set noreorder".
1287 * sysdeps/mips/pt-machine.h (__compare_and_swap): Liekwise.
1288
1289 2002-02-05 H.J. Lu <hjl@gnu.org>
1290
1291 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Not use
1292 branch likely.
1293 * sysdeps/mips/pt-machine.h (testandset): Likewise.
1294 (__compare_and_swap): Likewise.
1295
1296 2002-02-07 Ulrich Drepper <drepper@redhat.com>
1297
1298 * internals.h: Move declarations/definitions of
1299 __pthread_initial_thread_bos, __pthread_initial_thread,
1300 __pthread_manager_thread_bos, __pthread_manager_thread_tos,
1301 __pthread_manager_thread, __pthread_nonstandard_stacks, STACK_SIZE,
1302 CURRENT_STACK_FRAME, __pthread_find_self, and thread_self...
1303 * descr.h: ...here.
1304 * sysdeps/i386/tls.h: Add TLS definitions also for !FLOATING_STACKS.
1305 Define THREAD_GETMEM accordingly.
1306
1307 2002-02-06 Ulrich Drepper <drepper@redhat.com>
1308
1309 * sysdeps/i386/tls.h: Include <stddef.h> for size_t.
1310
1311 * sysdeps/i386/tls.h: Define THREAD_DTV.
1312
1313 2002-02-04 Ulrich Drepper <drepper@redhat.com>
1314
1315 * internals.h: Move thread descriptor definition...
1316 * descr.h.: ...here. New file.
1317 * sysdeps/i386/tls.h: New file.
1318
1319 2002-02-01 H.J. Lu <hjl@gnu.org>
1320
1321 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Use a
1322 different register in the delayed slot. Use branch likely.
1323
1324 * sysdeps/mips/pt-machine.h (testandset): Call _test_and_set.
1325 (__compare_and_swap): Return 0 only when failed to compare. Use
1326 branch likely.
1327
1328 2002-02-01 Jakub Jelinek <jakub@redhat.com>
1329
1330 * Versions (__libc_internal_tsd_get, __libc_internal_tsd_set,
1331 __pthread_kill_other_threads_np): Move to GLIBC_PRIVATE.
1332 * sysdeps/i386/i586/Versions: Move all symbols to GLIBC_PRIVATE.
1333 * sysdeps/i386/i686/Versions: Move all symbols to GLIBC_PRIVATE.
1334 * sysdeps/sparc/sparc32/sparcv9/Versions: New file.
1335 * sysdeps/sparc/sparc64/Versions: New file.
1336 * sysdeps/ia64/Versions: Move all symbols to GLIBC_PRIVATE.
1337
1338 2002-01-31 Ulrich Drepper <drepper@redhat.com>
1339
1340 * pthread.c: _dl_cpuclock_offset is not any longer a global variable
1341 in SHARED code, use GL(dl_cpuclock_offset).
1342
1343 2002-01-28 Andreas Jaeger <aj@suse.de>
1344
1345 * sysdeps/mips/pspinlock.c (__pthread_spin_init): Clear *LOCK to
1346 0. Patch by Machida Hiroyuki <machida@sm.sony.co.jp>.
1347
1348 2002-01-16 Martin Schwidefsky <schwidefsky@de.ibm.com>
1349
1350 * sysdeps/s390/s390-32/pt-machine.h (MEMORY_BARRIER): Define.
1351 (CURRENT_STACK_FRAME): Remove duplicate definition.
1352 * sysdeps/s390/s390-64/pt-machine.h: Likewise.
1353
1354 2002-01-14 Martin Schwidefsky <schwidefsky@de.ibm.com>
1355
1356 * Makefile (CFLAGS-tst-cancel.c): Add -fno-inline-functions to prevent
1357 automatic inline.
1358
1359 2002-01-12 Andreas Schwab <schwab@suse.de>
1360
1361 * Makefile (test-srcs): Add tst-signal.
1362 (tests): Run tst-signal.
1363 (distribute): Add tst-signal.sh.
1364 * tst-signal.c, tst-signal.sh: New files.
1365
1366 2002-01-14 Andreas Jaeger <aj@suse.de>
1367
1368 * sysdeps/x86_64/pt-machine.h (INIT_THREAD_SELF): Avoid warning.
1369
1370 2002-01-11 Andreas Schwab <schwab@suse.de>
1371
1372 * signals.c (sighandler): Initialize all elements to SIG_ERR.
1373 (__sigaction): Don't use value from sighandler if it is SIG_ERR.
1374
1375 2002-01-06 Richard Henderson <rth@redhat.com>
1376
1377 * sysdeps/alpha/elf/pt-initfini.c: New file.
1378
1379 2001-12-29 Andreas Jaeger <aj@suse.de>
1380
1381 * Examples/ex9.c: Add noreturn attribute for thread.
1382 * Examples/ex10.c: Likewise.
1383 * Examples/ex13.c (thread_start): Likewise.
1384 * Examples/ex15.c (worker): Likewise.
1385
1386 * Examples/ex18.c: Include unistd.h for prototype of sleep.
1387
1388 2001-12-14 Ulrich Drepper <drepper@redhat.com>
1389
1390 * man/pthread_atfork.man: Adjust description of mutex handling
1391 after fork for current implementation.
1392 * linuxthreads.texi: Likewise [PR libc/2519].
1393
1394 2001-12-13 Andreas Schwab <schwab@suse.de>
1395
1396 * specific.c (pthread_key_delete): Don't contact the thread
1397 manager if no threads have been created yet.
1398
1399 2001-12-12 NIIBE Yutaka <gniibe@m17n.org>
1400
1401 * sysdeps/sh/pt-machine.h (INIT_THREAD_SELF): Added __volatile__
1402 qualifier to be safe.
1403
1404 2001-11-30 Andreas Schwab <schwab@suse.de>
1405
1406 * pthread.c (pthread_handle_sigcancel) [THREAD_SELF]: Double check
1407 that self is the manager thread, and initialize the thread
1408 register if not.
1409 (thread_self_stack) [THREAD_SELF]: New function to find self via
1410 stack pointer.
1411 * manager.c (pthread_handle_create): Don't block cancel signal any
1412 more.
1413
1414 2001-11-29 Andreas Jaeger <aj@suse.de>
1415
1416 * sysdeps/x86_64/pt-machine.h: Use %gs as thread specific register.
1417 (THREAD_SELF): New.
1418 (INIT_THREAD_SELF): New.
1419 (THREAD_GETMEM): New.
1420 (THREAD_GETMEM_NC):
1421 (THREAD_SETMEM): New.
1422 (THREAD_SETMEM_NC): New.
1423 (FLOATING_STACKS): Define.
1424 (ARCH_STACK_MAX_SIZE): Define.
1425
1426 2001-11-28 Kaz Kylheku <kaz@ashi.footprints.net>
1427
1428 Bugfix to pthread_key_delete. It was iterating over the thread
1429 manager's linked list of threads, behind the thread manager's
1430 back causing a race. The fix is to have the manager iterate over
1431 the threads instead, using a new request type for doing so.
1432 * internals.h (struct pthread_request): New manager request type
1433 REQ_FOR_EACH_THREAD.
1434 * manager.c (pthread_for_each_thread): New function.
1435 (__pthread_manager): Handle new REQ_FOR_EACH_THREAD request.
1436 * specific.c (struct pthread_key_delete_helper_args): New type.
1437 (pthread_key_delete_helper): New static function.
1438 (pthread_key_delete): Use the new thread manager
1439 REQ_FOR_EACH_THREAD function to iterate over the threads and set
1440 the delete key slot to a null value in each thread.
1441 * Examples/ex18.c: New test.
1442 * Makefile (tests): Add ex18.
1443
1444 2001-11-22 Wolfram Gloger <wg@malloc.de>
1445
1446 * pthread.c (pthread_onexit_process): Don't call free
1447 after threads have been asynchronously terminated.
1448
1449 * manager.c (pthread_handle_exit): Surround cancellation
1450 of threads with __flockfilelist()/__funlockfilelist().
1451
1452 2001-11-26 Andreas Schwab <schwab@suse.de>
1453
1454 * manager.c (pthread_handle_create): Start the child thread with
1455 the cancel signal blocked, so that it does not handle it before
1456 the thread register is set up. Save errno from failed clone call.
1457
1458 2001-11-15 Ulrich Drepper <drepper@redhat.com>
1459
1460 * sysdeps/i386/i686/Implies: Removed.
1461 * sysdeps/i386/i686/Versions: New file.
1462
1463 2001-10-31 Andreas Jaeger <aj@suse.de>
1464
1465 * sysdeps/x86_64/Makefile: Remove, we do not need it anymore.
1466
1467 2001-10-05 Kevin Buettner <kevinb@cygnus.com>
1468
1469 * pthread.c (__linuxthread_pthread_sizeof_descr): Change name
1470 to __linuxthreads_pthread_sizeof_descr to match name used by
1471 symbol_list_arr[LINUXTHREADS_PTHREAD_SIZEOF_DESCR] in
1472 linuxthreads_db/td_symbol_list.c.
1473
1474 2001-09-22 Andreas Jaeger <aj@suse.de>
1475
1476 * linuxthreads/tst-context.c: Avoid compile warning.
1477
1478 2001-09-20 Andreas Jaeger <aj@suse.de>
1479
1480 * shlib-versions: Add x86-64.
1481
1482 2001-09-19 Andreas Jaeger <aj@suse.de>
1483
1484 * sysdeps/x86_64/Makefile: New file.
1485 * sysdeps/x86_64/pspinlock.c: New file.
1486 * sysdeps/x86_64/pt-machine.h: New file.
1487
1488 2001-09-12 Jakub Jelinek <jakub@redhat.com>
1489
1490 * sysdeps/pthread/timer_delete.c (timer_delete): Thread may be NULL
1491 for SIGEV_NONE.
1492 * sysdeps/pthread/timer_settime.c (timer_settime): Likewise.
1493
1494 2001-09-11 Ulrich Drepper <drepper@redhat.com>
1495 Wolfram Gloger <wg@malloc.de>
1496
1497 * join.c: Protect all communications from and to manager with
1498 TEMP_FAILURE_RETRY.
1499 * manager.c: Likewise.
1500 * pthread.c: Likewise.
1501 * smeaphore.c: Likewise.
1502
1503 2001-08-29 Ulrich Drepper <drepper@redhat.com>
1504
1505 * spinlock.c (__pthread_lock): Top max_count value with
1506 MAX_ADAPTIVE_SPIN_COUNT.
1507 * internals.h (MAX_ADAPTIVE_SPIN_COUNT): Define if not already done.
1508
1509 * sysdeps/i386/i686/pt-machine.h (BUSY_WAIT_NOP): New macro to
1510 help P4.
1511
1512 2001-08-27 Jakub Jelinek <jakub@redhat.com>
1513
1514 * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_t): Only define to
1515 non-opaque type if __USE_UNIX98.
1516
1517 2001-08-26 Jakub Jelinek <jakub@redhat.com>
1518
1519 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_t): Define
1520 non-opaque lock types also if _IO_MTSAFE_IO is defined.
1521
1522 2001-08-23 Roland McGrath <roland@frob.com>
1523
1524 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start): Take
1525 new first argument, skip the cleanup handler if it's zero.
1526 (_LIBC_LOCK_RECURSIVE_INITIALIZER): New macro.
1527 (__libc_lock_define_initialized_recursive): Use it.
1528 * sysdeps/pthread/bits/stdio-lock.h: File removed.
1529 The sysdeps/generic file from the main tree now suffices.
1530
1531 2001-08-22 Roland McGrath <roland@frob.com>
1532
1533 * sysdeps/pthread/bits/stdio-lock.h: Include <bits/libc-lock.h>
1534 instead of <pthread.h>.
1535 (_IO_lock_t): Define this typedef using __libc_lock_define_recursive.
1536 (_IO_lock_initializer): Add braces.
1537 (_IO_lock_lock): Use __libc_lock_lock_recursive.
1538 (_IO_lock_unlock): Use __libc_lock_unlock_recursive.
1539
1540 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_recursive_t): New type.
1541 (__libc_lock_define_initialized_recursive): Use it.
1542 (__libc_lock_init_recursive): Likewise.
1543 (__libc_lock_fini_recursive): Likewise.
1544 (__libc_lock_lock_recursive): Likewise.
1545 (__libc_lock_trylock_recursive): Likewise.
1546 (__libc_lock_unlock_recursive): Likewise.
1547 (__libc_lock_define_recursive): New macro.
1548
1549 2001-08-14 Jakub Jelinek <jakub@redhat.com>
1550
1551 * lockfile.c (__pthread_provide_lockfile): New variable.
1552 * pthread.c (__pthread_require_lockfile): New variable.
1553 * cancel.c (__pthread_require_lockfile): New variable.
1554
1555 2001-07-31 Ulrich Drepper <drepper@redhat.com>
1556
1557 * tst-context.c (threadfct): Initialize context before calling
1558 makecontext.
1559
1560 * Examples/ex17.c: Make sure test thread is around long enough.
1561
1562 2001-07-26 kaz Kojima <kkojima@rr.iij4u.or.jp>
1563
1564 * sysdeps/sh/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF): Defined.
1565
1566 2001-07-24 Ulrich Drepper <drepper@redhat.com>
1567
1568 * tst-context.c (main): Print explanation before bailing out
1569 because context handling is not supported.
1570
1571 2001-07-23 Ulrich Drepper <drepper@redhat.com>
1572
1573 * Makefile (tests): Add tst-context.
1574 * tst-context.c: New file.
1575
1576 * sysdeps/pthread/bits/stdio-lock.h: Define
1577 _IO_cleanup_region_start_noarg.
1578
1579 2001-07-23 Jakub Jelinek <jakub@redhat.com>
1580
1581 * sysdeps/alpha/pt-machine.h (FLOATING_STACKS): Define.
1582 (ARCH_STACK_MAX_SIZE): Define.
1583 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
1584 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
1585
1586 2001-07-19 Jakub Jelinek <jakub@redhat.com>
1587
1588 * sysdeps/i386/useldt.h: Fix typo in ARCH_STACK_MAX_SIZE comment.
1589
1590 * sysdeps/ia64/pt-machine.h (FLOATING_STACKS): Define.
1591 (ARCH_STACK_MAX_SIZE): Define.
1592 * manager.c (pthread_allocate_stack): Handle FLOATING_STACKS with
1593 NEED_SEPARATE_REGISTER_STACK.
1594
1595 2001-07-16 Andreas Schwab <schwab@suse.de>
1596
1597 * Makefile (before-compile): Don't add $(objpfx)crti.o.
1598 (omit-deps): Add crti.
1599 ($(objpfx)libpthread.so): Depend on $(objpfx)crti.o, but make sure
1600 it is filtered out of the link command.
1601
1602 2001-07-16 Ulrich Drepper <drepper@redhat.com>
1603
1604 * pthread.c (pthread_initialize): For FLOATING_STACKS don't bother
1605 to find the right value for __pthread_initial_thread_bos, it's not
1606 used. If not FLOATING_STACKS first run
1607 __pthread_init_max_stacksize.
1608
1609 2001-06-16 H.J. Lu <hjl@gnu.org>
1610
1611 * internals.h: Include <stackinfo.h>.
1612
1613 * attr.c: Don't include <stackinfo.h> here.
1614 * cancel.c: Likewise.
1615 * manager.c: Likewise.
1616 * pthread.c: Likewise.
1617 * ptlongjmp.c: Likewise.
1618
1619 2001-03-23 Matthew Wilcox <willy@ldl.fc.hp.com>
1620
1621 * attr.c: Make _STACK_GROWS_UP work.
1622 * internals.h: Likewise.
1623 * manager.c: Likewise.
1624 * pthread.c: Likewise.
1625
1626 2001-06-15 H.J. Lu <hjl@gnu.org>
1627
1628 * pthread.c (__pthread_reset_main_thread): Fix a typo.
1629
1630 2001-02-02 John S. Marvin <jsm@udlkern.fc.hp.com>
1631
1632 * semaphore.h: Use struct _pthread_fastlock as an element of
1633 sem_t instead of an identical struct.
1634 * rwlock.c: Remove casts.
1635 * semaphore.c: Likewise.
1636
1637 2001-04-30 Alan Modra <amodra@one.net.au>
1638
1639 * sysdeps/unix/sysv/linux/hppa/pt-initfini.c: New.
1640
1641 2001-05-25 Bruce Mitchener <bruce@cubik.org>
1642
1643 * linuxthreads.texi: Spelling corrections.
1644
1645 2001-05-25 Ulrich Drepper <drepper@redhat.com>
1646
1647 * oldsemaphore.c (__old_sem_wait): Clear p_nextwaiting before
1648 returning successfully.
1649 Patch by Gene Cooperman <gene@ccs.neu.edu>.
1650
1651 2001-05-24 Ulrich Drepper <drepper@redhat.com>
1652
1653 * spinlock.c (__pthread_lock) [HAS_COMPARE_AND_SWAP]: Before doing any
1654 serious work try once whether the lock is uncontested.
1655 Remove duplicate reading of __status before loop.
1656 Change suggested by Hans Boehm <hans_boehm@hp.com>.
1657
1658 * spinlock.h (__pthread_trylock): Remove need for oldstatus variable.
1659 (__pthread_alt_trylock): Likewise.
1660
1661 2001-05-01 Kaz Kylheku <kaz@ashi.footprints.net>
1662
1663 Memory barrier overhaul following line by line inspection.
1664 * mutex.c (pthread_once): Missing memory barriers added.
1665 * pthread.c (__pthread_wait_for_restart_signal,
1666 __pthread_timedsuspend_new, __pthread_restart_new): Added
1667 memory barriers ``just in case'' and for documentary value.
1668 * spinlock.c (__pthread_release): New inline function for releasing
1669 spinlock, to complement __pthread_acquire. Includes memory
1670 barrier prior to assignment to spinlock, and __asm __volatile
1671 dance to prevent reordering or optimization of the spinlock access.
1672 * spinlock.c (__pthread_unlock, __pthread_alt_lock,
1673 __pthread_alt_timedlock, __pthread_alt_unlock,
1674 __pthread_compare_and_swap): Updated to use new __pthread_release
1675 instead of updating spinlock directly.
1676 * spinlock.c (__pthread_lock, __pthread_unlock, wait_node_alloc,
1677 wait_node_free, wait_node_dequeue, __pthread_alt_lock,
1678 __pthread_alt_timedlock, __pthread_alt_unlock, __pthread_acquire):
1679 Memory barrier overhaul. Lots of missing memory barriers added,
1680 a couple needless ones removed.
1681 * spinlock.c (__pthread_compare_and_swap): testandset optimization
1682 removed, just calls __pthread_acquire, which has the new read
1683 barrier in it before its testandset.
1684
1685 2001-05-20 Roland McGrath <roland@frob.com>
1686
1687 * Makeconfig: New file, variables used to be in main libc Makeconfig.
1688
1689 2001-05-09 Geoff Keating <geoffk@redhat.com>
1690
1691 * sysdeps/powerpc/pt-machine.h
1692 (HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS): Define.
1693 (__compare_and_swap): Remove memory barriers.
1694 (__compare_and_swap_with_release_semantics): New function.
1695
1696 2001-04-24 Andreas Jaeger <aj@suse.de>
1697
1698 * wrapsyscall.c: send* and recv* return ssize_t.
1699
1700 * sysdeps/pthread/timer_getoverr.c (timer_getoverrun): Unlock the
1701 mutex instead of double locking it.
1702 Reported by Pierre Artaud <partaud@sodatec.com>.
1703
1704 2001-04-23 Ulrich Drepper <drepper@redhat.com>
1705
1706 * sysdeps/pthread/getcpuclockid.c: Make function generic, test
1707 using #ifdef whether the clock is available.
1708 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c: Removed.
1709
1710 * sysdeps/ia64/Versions: New file.
1711
1712 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init): We don't
1713 have to call __gmon_start__ in the libpthread DSO.
1714 * sysdeps/pthread/pt-initfini.c (_init): Likewise.
1715
1716 * Makefile (libpthread-routines): Add ptclock_gettime and
1717 ptclock_settime.
1718 * internals.h: Don't use cpuclock-init.h definitions, use
1719 hp-timing.h definitions.
1720 * pthread.c: Likewise.
1721 * manager.c: Likewise.
1722 * ptclock_gettime.c: New file.
1723 * ptclock_settime.c: New file.
1724 * internals.h: Fix parameter type for __pthread_clock_gettime and
1725 __pthread_clock_settime.
1726
1727 * sysdeps/i386/i586/ptclock_gettime.c: Removed.
1728 * sysdeps/i386/i586/ptclock_settime.c: Removed.
1729 * sysdeps/i386/i586/Makefile: Removed.
1730
1731 2001-04-22 Ulrich Drepper <drepper@redhat.com>
1732
1733 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_ASYNCH_IO.
1734 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1735
1736 2001-04-21 Andreas Jaeger <aj@suse.de>
1737
1738 * sysdeps/pthread/timer_routines.c (thread_func): Add noreturn
1739 attribute, remove statements that will never be executed.
1740 (thread_func): Remove mutex_unlock call since it's never executed.
1741 (thread_func): Fix comment as suggested by Jakub Jelinek.
1742
1743 * manager.c (__pthread_manager): Add noreturn
1744 attribute.
1745 (pthread_start_thread): Likewise, remove return statement.
1746 (pthread_start_thread_event): Likewise.
1747 Add noreturn attribute for pthread_handle_exit.
1748 * weaks.c: Add noreturn attribute for pthread_exit.
1749
1750 * internals.h: Add __pthread_clock_gettime and
1751 __pthread_clock_settime prototypes.
1752
1753 2001-04-21 Ulrich Drepper <drepper@redhat.com>
1754
1755 * internals.h: Include <cpuclock-init.h>.
1756 (struct _pthread_descr_struct): Add p_cpuclock_offset field if
1757 CPUCLOCK_VARDEF is defined.
1758 * pthread.c (__pthread_initialize_minimal): Initialize
1759 p_cpuclock_offset field for main thread if CPUCLOCK_INIT is defined.
1760 * manager.c (pthread_start_thread): Set p_cpuclock_offset field
1761 for new thread to current CPU clock value.
1762
1763 * sysdeps/i386/useldt.h: Extend all the macros to handle 8-byte values.
1764
1765 * sysdeps/i386/i586/Makefile: New file.
1766 * sysdeps/i386/i586/Versions: New file.
1767 * sysdeps/i386/i586/ptclock_gettime.c: New file.
1768 * sysdeps/i386/i586/ptclock_settime.c: New file.
1769 * sysdeps/i386/i686/Implies: New file.
1770
1771 2001-04-18 Jakub Jelinek <jakub@redhat.com>
1772
1773 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: Put specs into
1774 $generated, not $postclean-generated.
1775
1776 2001-04-18 Andreas Jaeger <aj@suse.de>
1777
1778 * Makefile (otherlibs): Added.
1779
1780 2001-04-18 Jakub Jelinek <jakub@redhat.com>
1781
1782 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
1783
1784 2001-04-16 Ulrich Drepper <drepper@redhat.com>
1785
1786 * signals.c (sigwait): NSIG is no signal number. Block all
1787 signals while in signal handler for signals in SET.
1788 Patch by Manfred Spraul <manfred@colorfullife.com>.
1789
1790 2001-04-12 Ulrich Drepper <drepper@redhat.com>
1791
1792 * tst-cancel.c: Disable most tests. Add new test where all
1793 cleanup handlers must run.
1794 * Makefile (tests): Add tst-cancel again.
1795
1796 * cancel.c (__pthread_perform_cleanup): Correct condition for
1797 leaving cleanup loop early.
1798
1799 * sysdeps/i386/Makefile: Make sure gcc uses a frame pointer for
1800 all the files which use CURRENT_STACK_FRAME.
1801 * sysdeps/i386/pt-machine.h (CURRENT_STACK_FRAME): Define using
1802 __builtin_frame_address.
1803 * sysdeps/i386/i686/pt-machine.h: Likewise.
1804
1805 2001-04-11 Ulrich Drepper <drepper@redhat.com>
1806
1807 * Makefile (tests): Comment out tst-cancel for now.
1808
1809 * tst-cancel.c (main): Cleanup 4 is supposed to run. Create
1810 temporary file in object directory.
1811 * Makefile: Don't allow inlining when compiling tst-cancel.c.
1812 Pass $(objpfx) to tst-cancel.
1813
1814 2001-04-11 David S. Miller <davem@redhat.com>
1815
1816 * sysdeps/sparc/sparc32/pt-machine.h (stack_pointer): Advance
1817 up closer to user local variables so that new cleanup heuristics work.
1818 * sysdeps/sparc/sparc64/pt-machine.h (stack_pointer): Likewise.
1819
1820 2001-04-11 Ulrich Drepper <drepper@redhat.com>
1821
1822 * cancel.c (_pthread_cleanup_push): Catch invalid __prev buffer
1823 and remove it.
1824 (_pthread_cleanup_push_defer): Likewise.
1825
1826 * tst-cancel.c (main): Fix loop printing cleanup output.
1827
1828 2001-04-10 kaz Kojima <kkojima@rr.iij4u.or.jp>
1829
1830 * sysdeps/sh/pspinlock.c (__pthread_spin_lock): Fix a reverse
1831 test.
1832 (__pthread_spin_trylock): Likewise.
1833 * sysdeps/sh/pt-machine.h (testandset): Likewise.
1834
1835 2001-04-10 Ulrich Drepper <drepper@redhat.com>
1836
1837 * join.c (pthread_exit): Move code to new function __pthread_do_exit
1838 which takes an extra parameter with the current frame pointer.
1839 Call new function with CURRENT_STACK_FRAME.
1840 (__pthread_do_exit): New function. Call __pthread_perform_cleanup
1841 with the new parameter.
1842 (pthread_join): Call __pthread_do_exit instead of pthread_exit.
1843 * cancel.c (__pthread_perform_cleanup): Takes extra parameter. Use
1844 this parameter as the initial value the cleanup handler records are
1845 compared against. No active cleanup handler record must have an
1846 address lower than the previous one and the initial record must be
1847 above (below on PA) the frame address passed in.
1848 (pthread_setcancelstate): Call __pthread_do_exit instead of
1849 pthread_exit.
1850 (pthread_setcanceltype): Likewise.
1851 (pthread_testcancel): Likewise.
1852 (_pthread_cleanup_pop_restore): Likewise.
1853 * condvar.c (pthread_cond_wait): Likewise.
1854 (pthread_cond_timedwait_relative): Likewise.
1855 * manager.c (pthread_start_thread): Likewise.
1856 * oldsemaphore.c (__old_sem_wait): Likewise.
1857 * pthread.c (pthread_handle_sigcancel): Likewise.
1858 * semaphore.c (__new_sem_wait): Likewise.
1859 (sem_timedwait): Likewise.
1860 * ptlongjmp.c (pthread_cleanup_upto): Also use current stack frame
1861 to limit the cleanup handlers which get run.
1862 * internals.h: Add prototype for __pthread_do_exit. Adjust prototype
1863 for __pthread_perform_cleanup.
1864
1865 * Makefile (tests): Add tst-cancel.
1866 * tst-cancel.c: New file.
1867
1868 2001-04-08 Hans-Peter Nilsson <hp@axis.com>
1869
1870 * sysdeps/cris/pt-machine.h: New file.
1871 * sysdeps/cris/pspinlock.c: New file.
1872
1873 2001-04-09 Hans-Peter Nilsson <hp@axis.com>
1874
1875 * shlib-versions: Add case for Linux on CRIS.
1876
1877 2001-03-26 Ulrich Drepper <drepper@redhat.com>
1878
1879 * attr.c (pthread_getattr_np): Correct computation of stack size
1880 for machiens with register stack.
1881
1882 * Examples/ex17.c (main): Correct detection of failed mmap call.
1883
1884 2001-03-21 Jakub Jelinek <jakub@redhat.com>
1885
1886 * pthread.c (__pthread_initialize_manager): Fix a typo.
1887
1888 2001-03-21 Jakub Jelinek <jakub@redhat.com>
1889
1890 * attr.c (__pthread_attr_setstack): Fix alignment check.
1891 (pthread_getattr_np): __stackaddr is top of stack, not bottom.
1892 * Makefile (tests): Add ex17 test.
1893 * Examples/ex17.c: New test.
1894
1895 2001-03-20 Ulrich Drepper <drepper@redhat.com>
1896
1897 * Makefile: Define -D_RPC_THREAD_SAFE_ for cancel.c.
1898 * cancel.c (__pthread_perform_cleanup): Call __rpc_thread_destroy.
1899 * sysdeps/pthread/bits/libc-tsd.h: Define _LIBC_TSD_KEY_VARS.
1900
1901 2001-03-18 Ulrich Drepper <drepper@redhat.com>
1902
1903 * Makefile: When generating DSO link with libc_nonshared.a.
1904
1905 2001-02-26 Jakub Jelinek <jakub@redhat.com>
1906
1907 * signals.c (pthread_sighandler): Use CALL_SIGHANDLER.
1908
1909 2001-02-23 Jakub Jelinek <jakub@redhat.com>
1910
1911 * internals.h (__pthread_init_max_stacksize): New prototype.
1912 * attr.c (__pthread_attr_setstacksize): Call
1913 __pthread_init_max_stacksize if not yet initialized.
1914 * pthread.c (__pthread_init_max_stacksize): New function.
1915 (__pthread_initialize_manager): Call it.
1916 Patch by <dtc@cmucl.cons.org>.
1917
1918 2001-03-16 Ulrich Drepper <drepper@redhat.com>
1919
1920 * attr.c (pthread_getattr_np): Fix __stacksize computation for IA-64.
1921
1922 2001-03-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
1923
1924 * shlib-versions: Add rule for Linux on 64 bit S/390.
1925 * sysdeps/s390/s390-64/pt-machine.h: New file.
1926 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
1927
1928 2001-03-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
1929
1930 * sysdeps/s390/pt-machine.h: Move to...
1931 * sysdeps/s390/s390-32/pt-machine.h: ...here.
1932 Add defines for FLOATING_STACK and ARCH_STACK_MAX_SIZE.
1933
1934 2001-03-15 Ulrich Drepper <drepper@redhat.com>
1935
1936 * Versions [libpthread] (GLIBC_2.2.3): Add pthread_getattr_np.
1937 * attr.c: Implement pthread_getattr_np.
1938 * sysdeps/pthread/pthread.h: Add prototype for pthread_getattr_np.
1939 * internals.h (struct _pthread_descr_struct): Add p_inheritsched.
1940 * manager.c (pthread_handle_create): Initialize p_inheritsched.
1941
1942 2001-03-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
1943
1944 * sysdeps/unix/sysv/linux/s390/pt-initfini.c: Use 0x07 padding for
1945 code alignment.
1946
1947 2001-02-20 Hans Boehm <hans_boehm@hp.com>
1948
1949 * manager.c (manager_mask): Removed static vesion. Now always local
1950 to __pthread_manager().
1951 (manager_mask_all): Removed completely.
1952 (__pthread_manager): Remove manager_mask_all initialization.
1953 (pthread_handle_create): Remove code to set and reset signal mask
1954 around __clone2() calls.
1955
1956 2001-02-17 Jakub Jelinek <jakub@redhat.com>
1957
1958 * spinlock.c (__pthread_lock): Force lock->__status to be read from
1959 memory on every spin.
1960
1961 2001-02-10 Andreas Jaeger <aj@suse.de>
1962
1963 * Makefile (extra-objs): New.
1964
1965 2001-02-09 Jakub Jelinek <jakub@redhat.com>
1966
1967 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Add
1968 __pthread_initialize_minimal prototype.
1969
1970 2001-02-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
1971
1972 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
1973
1974 2001-02-06 Martin Schwidefsky <schwidefsky@de.ibm.com>
1975
1976 * sysdeps/unix/sysv/linux/s390/pt-initfini.c: New file.
1977
1978 2001-02-06 Ulrich Drepper <drepper@redhat.com>
1979
1980 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: First attempt to fix the
1981 broken code. Patch by Jes Sorensen.
1982
1983 2001-02-06 Andreas Jaeger <aj@suse.de>
1984
1985 * sysdeps/pthread/pthread.h: Move __pthread_initialize from here
1986 to...
1987 * internals.h: ...here.
1988
1989 2001-02-05 Jes Sorensen <jes@linuxcare.com>
1990
1991 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
1992
1993 2001-02-02 Ulrich Drepper <drepper@redhat.com>
1994
1995 * Versions: Remove __pthread_initialize_minimal.
1996
1997 2001-02-01 Ulrich Drepper <drepper@redhat.com>
1998
1999 * Makefile: Add rules to build crti.o and make it being used in
2000 building libpthread.so.
2001 * sysdeps/i386/Makefile: New file.
2002 * sysdeps/pthread/pt-initfini.c: New file.
2003
2004 * pthread.c: Cleanups.
2005
2006 2001-01-28 Andreas Jaeger <aj@suse.de>
2007
2008 * oldsemaphore.c (__old_sem_init): Adjust for last change.
2009 * sysdeps/pthread/bits/libc-lock.h: Likewise.
2010 * spinlock.c: Likewise.
2011
2012 2001-01-28 Ulrich Drepper <drepper@redhat.com>
2013
2014 * sysdeps/pthread/bits/initspin.h: Make all names namespace clean.
2015 * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: Likewise.
2016 * manager.c: Adjust for namespace cleanup in bits/initspin.h.
2017 * pthread.c: Likewise.
2018 * spinlock.h: Likewise.
2019 * sysdeps/pthread/pthread.h: Likewise.
2020
2021 2001-01-26 Ulrich Drepper <drepper@redhat.com>
2022
2023 * sysdeps/pthread/bits/pthreadtypes.h: Define pthread_attr_t also
2024 as struct __pthread_attr_s.
2025
2026 * semaphore.h (sem_t): Cleanup namespace, rename status and
2027 spinlock elements.
2028
2029 2001-01-13 Jakub Jelinek <jakub@redhat.com>
2030
2031 * pthread.c (pthread_onexit_process): Clear
2032 __pthread_manager_thread_bos after freeing it.
2033 * Makefile (tests): Add ex16.
2034 * Examples/ex16.c: New file.
2035
2036 2001-01-11 Jakub Jelinek <jakub@redhat.com>
2037
2038 * Makefile (CFLAGS-pthread.c): Pass -DHAVE_Z_NODELETE if ld supports
2039 -z nodelete.
2040 * pthread.c (pthread_exit_process): Rename to...
2041 (pthread_onexit_process): ...this.
2042 (pthread_atexit_process, pthread_atexit_retcode): New.
2043 (pthread_initialize): Call __cxa_atexit instead of __cxa_on_exit
2044 and only if HAVE_Z_NODELETE is not defined.
2045 (__pthread_initialize_manager): Register pthread_atexit_retcode
2046 with __cxa_atexit.
2047
2048 2001-01-11 Ulrich Drepper <drepper@redhat.com>
2049
2050 * pthread.c (pthread_initialize): Use __cxs_on_exit not __cxa_atexit.
2051
2052 2001-01-11 Jakub Jelinek <jakub@redhat.com>
2053
2054 * Makefile (tests): Add ex15.
2055 * Examples/ex15.c: New test.
2056
2057 2001-01-08 Ulrich Drepper <drepper@redhat.com>
2058
2059 * pthread.c (pthread_exit_process): Free memory allocated for
2060 manager stack.
2061
2062 2000-12-31 Ulrich Drepper <drepper@redhat.com>
2063
2064 * manager.c (pthread_alloca_stack): Remove MAP_FIXED from mmap calls.
2065 (pthread_free): Always unmap the stack. It's safe now that we don't
2066 use MAP_FIXED to allocate stacks.
2067
2068 2000-12-31 Ulrich Drepper <drepper@redhat.com>
2069
2070 * sysdeps/powerpc/pspinlock.c: Don't include pt-machine.h here.
2071
2072 * manager.c (pthread_allocate_stack): Prepare for removal of MAP_FIXED.
2073
2074 2000-11-15 Wolfram Gloger <wg@malloc.de>
2075
2076 * manager.c (pthread_free): [!FLOATING_STACKS]: Only remap the
2077 stack to PROT_NONE, don't unmap it, avoiding collisions with malloc.
2078
2079 2000-12-27 Andreas Jaeger <aj@suse.de>
2080
2081 * Examples/ex13.c: Make local functions static.
2082 * ecmutex.c: Likewise.
2083 * joinrace.c: Likewise.
2084 * Examples/ex14.c: Likewise.
2085
2086 * Examples/ex2.c: Make local functions static; reformat.
2087 * Examples/ex1.c: Likewise.
2088 * Examples/ex4.c: Likewise.
2089 * Examples/ex5.c: Likewise.
2090 * Examples/ex7.c: Likewise.
2091
2092 * oldsemaphore.c: Add prototypes to shut up GCC.
2093 * pt-machine.c: Likewise.
2094
2095 * weaks.c: Add prototype for pthread_exit.
2096
2097 * internals.h: Add some prototypes, format prototypes and add
2098 missing externs.
2099 Move __libc_waitpid prototype to include/sys/wait.h.
2100
2101 * rwlock.c: Include <bits/libc-lock.h> for prototypes.
2102 * mutex.c: Likewise.
2103 * specific.c: Likewise.
2104 * ptfork.c: Likewise.
2105
2106 * lockfile.c: Include internals.h to get prototypes.
2107 * events.c: Likewise.
2108 * sysdeps/alpha/pspinlock.c: Likewise.
2109 * sysdeps/arm/pspinlock.c: Likewise.
2110 * sysdeps/hppa/pspinlock.c: Likewise.
2111 * sysdeps/i386/pspinlock.c: Likewise.
2112 * sysdeps/ia64/pspinlock.c: Likewise.
2113 * sysdeps/m68k/pspinlock.c: Likewise.
2114 * sysdeps/mips/pspinlock.c: Likewise.
2115 * sysdeps/powerpc/pspinlock.c: Likewise.
2116 * sysdeps/s390/pspinlock.c: Likewise.
2117 * sysdeps/sh/pspinlock.c: Likewise.
2118 * sysdeps/sparc/sparc32/pspinlock.c: Likewise.
2119 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: Likewise.
2120 * sysdeps/sparc/sparc64/pspinlock.c: Likewise.
2121
2122 2000-12-27 Ulrich Drepper <drepper@redhat.com>
2123
2124 * attr.c (__pthread_attr_setstack): Fix setting of __stackaddr element.
2125 (__pthread_attr_getstack): Return correct address.
2126 Add warnings for using pthread_attr_getstackaddr and
2127 pthread_attr_setstackaddr.
2128
2129 2000-12-26 Ulrich Drepper <drepper@redhat.com>
2130
2131 * Examples/ex6.c (test_thread): Make static.
2132 * Examples/ex12.c (test_thread): Make static and add noreturn
2133 attribute.
2134
2135 2000-12-18 Jes Sorensen <jes@linuxcare.com>
2136
2137 * linuxthreads/sysdeps/ia64/pt-machine.h: __compare_and_swap
2138 and compare_and_swap_with_release_semantics returns int not long.
2139
2140 2000-12-17 Andreas Jaeger <aj@suse.de>
2141
2142 * sysdeps/s390/pt-machine.h (testandset): Use long int as return
2143 value.
2144 * sysdeps/arm/pt-machine.h (testandset): Likewise.
2145 * sysdeps/hppa/pt-machine.h (testandset): Likewise.
2146 * sysdeps/m68k/pt-machine.h (testandset): Likewise.
2147 * sysdeps/sh/pt-machine.h (testandset): Likewise.
2148 * sysdeps/sparc/sparc32/pt-machine.h (testandset): Likewise.
2149 * sysdeps/sparc/sparc64/pt-machine.h (testandset): Likewise.
2150
2151 2000-12-17 Ulrich Drepper <drepper@redhat.com>
2152
2153 * sysdeps/i386/pt-machine.h (testandset): Adjust for prototype change.
2154 * sysdeps/i386/i686/pt-machine.h (testandset): Likewise.
2155
2156 2000-12-17 Andreas Jaeger <aj@suse.de>
2157
2158 * internals.h: Add prototypes for testandset and
2159 __compare_and_swap to shut up gcc warnings.
2160
2161 2000-12-06 Wolfram Gloger <wg@malloc.de>
2162
2163 * join.c (pthread_detach): Allow case where the thread has already
2164 terminated.
2165
2166 2000-12-05 Andreas Jaeger <aj@suse.de>
2167
2168 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Don't set mips2.
2169 * sysdeps/mips/pt-machine.h (testandset): Likewise.
2170 (__compare_and_swap): Likewise.
2171 Patches by Maciej W. Rozycki <macro@ds2.pg.gda.pl>.
2172
2173 2000-11-20 Jakub Jelinek <jakub@redhat.com>
2174
2175 * Examples/ex3.c (main): Cast int to long before casting to void *.
2176 (search): Cast void * to long, not int.
2177 * Examples/ex8.c (main, thread): Similarly.
2178 * Examples/ex11.c (main): Similarly.
2179 * Examples/ex14.c (worker, do_test): Similarly.
2180 * ecmutex.c (worker, do_test): Similarly.
2181 (nlocks): Cast to int.
2182
2183 2000-11-08 Bruce Mitchener <bruce@cubik.org>
2184
2185 * linuxthreads.texi: Add documentation for pthreads attributes
2186 guardsize, stackaddr, stacksize, and stack. Fix typo in previous
2187 patch. Document pthread_[sg]etconcurrency(). Mark
2188 pthread_mutexattr_[sg]ettype() as POSIX rather than GNU.
2189
2190 2000-11-07 Ulrich Drepper <drepper@redhat.com>
2191
2192 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
2193 Don't define it.
2194 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
2195 Reported by Christopher Yeoh <cyeoh@linuxcare.com.au>.
2196
2197 2000-11-06 Ulrich Drepper <drepper@redhat.com>
2198
2199 * cancel.c (pthread_cancel): Always set p_canceled, even if we are
2200 not doing it right now.
2201 Reported by Kaz Kylheku <kaz@ashi.footprints.net>.
2202
2203 2000-10-30 Ulrich Drepper <drepper@redhat.com>
2204
2205 * Examples/ex4.c (main): Don't use exit() to avoid warning with
2206 broken compilers.
2207
2208 2000-10-29 Ulrich Drepper <drepper@redhat.com>
2209
2210 * attr.c (__pthread_attr_setguardsize): Don't round guardsize
2211 here. Reported by Bruce Mitchener <bruce@cubik.org>.
2212
2213 * linuxthreads.texi: Changes terminology to 'type' from 'kind' when
2214 discussing mutexes. (As per the Unix98 name for the API.)
2215 Changes documentation for pthread_mutexattr_setkind_np() and
2216 pthread_mutexattr_getkind_np() over to the Unix98 APIs for the
2217 same: pthread_mutexattr_settype() and pthread_mutexattr_gettype().
2218 Changes references to PTHREAD_MUTEXATTR_FAST_NP to
2219 PTHREAD_MUTEXATTR_ADAPTIVE_NP.
2220 Begins to introduce discussion of the ``timed'' mutex type. This
2221 discussion is currently incomplete.
2222 Patch by Bruce Mitchener <bruce@cubik.org>.
2223
2224 2000-10-26 Kazumoto Kojima <kkojima@rr.iij4u.or.jp>
2225 Yutaka Niibe <gniibe@chroot.org>
2226
2227 * sysdeps/sh/pt-machine.h (testandset): Since the operand of TAS.B
2228 has restrictions, use register.
2229
2230 2000-10-23 Andreas Schwab <schwab@suse.de>
2231
2232 * Examples/ex14.c (TIMEOUT): Override default timeout.
2233
2234 2000-10-16 Ulrich Drepper <drepper@redhat.com>
2235
2236 * specific.c: Protect tsd array modification in thread data
2237 structures by getting the thread lock in pthread_key_delete and
2238 __pthread_destroy_specifics.
2239 Patch by Wolfram Gloger <Wolfram.Gloger@dent.med.uni-muenchen.de>.
2240
2241 2000-10-12 Alan Modra <alan@linuxcare.com.au>
2242
2243 * sysdeps/pthread/bits/initspin.h: New file.
2244 * spinlock.h: Move LOCK_INITIALIZER definition to <bits/initspin.h>.
2245 (__pthread_init_lock): Initialize lock with LT_SPINLOCK_INIT.
2246 (__pthread_alt_init_lock): Likewise.
2247 (__pthread_alt_trylock): Release lock with LT_SPINLOCK_INIT.
2248
2249 2000-10-12 David Huggins-Daines <dhd@linuxcare.com>
2250
2251 * oldsemaphore.c (__old_sem_init): Release lock with
2252 LT_SPINLOCK_INIT, not zero.
2253 * spinlock.c (__pthread_unlock): Likewise.
2254 (__pthread_alt_lock): Likewise.
2255 (__pthread_alt_timedlock): Likewise.
2256 (__pthread_alt_unlock): Likewise.
2257 * sysdeps/pthread/bits/libc-lock.h: Initialize locks with
2258 LT_SPINLOCK_INIT if it is non-zero. Likewise for init-once flags.
2259 * sysdeps/pthread/pthread.h: Include bits/initspin.h. Use
2260 LT_SPINLOCK_INIT do initialize spinlocks not 0.
2261
2262 2000-10-12 David Huggins-Daines <dhd@linuxcare.com>
2263
2264 * shlib-versions: Add version definitions for hppa-linux.
2265
2266 2000-10-12 Alan Modra <alan@linuxcare.com.au>
2267
2268 * sysdeps/hppa/pspinlock.c: New file.
2269 * sysdeps/hppa/pt-machine.h: New file.
2270 * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: New file.
2271
2272 2000-10-05 Jakub Jelinek <jakub@redhat.com>
2273
2274 * mutex.c (__pthread_mutex_destroy): Correct test of
2275 busy mutex for mutexes using alternate fastlocks.
2276 Patch by dtc@cmucl.cons.org.
2277
2278 2000-09-28 Martin Schwidefsksy <schwidefsky@de.ibm.com>
2279
2280 * sysdeps/s390/pt-machine.h: Make %a0 the thread register.
2281
2282 2000-09-28 Ulrich Drepper <drepper@redhat.com>
2283
2284 * mutex.c (__pthread_mutex_unlock): For PTHREAD_MUTEX_RECURSIVE_NP
2285 test for owner first.
2286 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2287
2288 * cancel.c (pthread_cancel): Don't do anything if cancelation is
2289 disabled.
2290
2291 2000-09-26 Ulrich Drepper <drepper@redhat.com>
2292
2293 * spinlock.h (__pthread_set_own_extricate_if): Optimize a bit.
2294 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2295
2296 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
2297 _POSIX_MONOTONIC_CLOCK.
2298
2299 * spinlock.h (__pthread_set_own_extricate_if): Add back locking
2300 and explain why.
2301
2302 2000-09-20 Andreas Jaeger <aj@suse.de>
2303
2304 * pthread.c [!__ASSUME_REALTIME_SIGNALS]: Make inclusion of
2305 "testrtsig.h" conditional.
2306
2307 2000-09-11 Ulrich Drepper <drepper@redhat.com>
2308
2309 * sysdeps/pthread/pthread.h: Declare pthread_attr_getstack and
2310 pthread_attr_setstack.
2311 * Versions [libpthread] (GLIBC_2.2): Export pthread_attr_getstack and
2312 pthread_attr_setstack.
2313 * attr.c (pthread_attr_getstack, pthread_attr_setstack): New functions.
2314
2315 2000-09-05 Ulrich Drepper <drepper@redhat.com>
2316
2317 * Examples/ex14.c: New file.
2318 * Makefile (tests): Add ex14.
2319
2320 * mutex.c (__pthread_mutex_unlock): Correct test for already unlocked
2321 mutex. Patch by dtc@cmucl.cons.org.
2322
2323 * ecmutex.c: New file.
2324 * Makefile (tests): Add ecmutex.
2325
2326 2000-09-04 H.J. Lu <hjl@gnu.org>
2327
2328 * attr.c (__pthread_attr_setguardsize): Use page_roundup
2329 instead of roundup to round up to the page size.
2330
2331 2000-09-03 Mark Kettenis <kettenis@gnu.org>
2332
2333 * manager.c (pthread_exited): Correctly report event as TD_REAP
2334 instead of TD_DEATH. Fix comments.
2335
2336 2000-09-03 Ulrich Drepper <drepper@redhat.com>
2337
2338 * spinlock.h (testandset): Add cast to avoid warning.
2339 Patch by Franz Sirl <Franz.Sirl-kernel@lauterbach.com>.
2340
2341 2000-09-02 Andreas Jaeger <aj@suse.de>
2342
2343 * sysdeps/pthread/timer_routines.c: Include stdlib.h for abort
2344 prototype.
2345
2346 2000-09-01 Ulrich Drepper <drepper@redhat.com>
2347
2348 * sysdeps/pthread/bits/stdio-lock.h (_IO_cleanup_region_start):
2349 Fix typo in last patch (_mode -> _flags).
2350
2351 * sysdeps/pthread/bits/stdio-lock.h (_IO_cleanup_region_start):
2352 Provide definition which respects _IO_USER_LOCK flag.
2353
2354 2000-08-30 Ulrich Drepper <drepper@redhat.com>
2355
2356 * manager.c (pthread_allocate_stack): Clear descriptor only if not
2357 mmaped.
2358
2359 2000-08-25 Ulrich Drepper <drepper@redhat.com>
2360
2361 * Makefile: Add rules to build and run unload.
2362 * unload.c: New file.
2363
2364 * pthread.c (pthread_exit_process): Move thread_self use inside `if'.
2365
2366 * sysdeps/pthread/pthread.h
2367 (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Defined.
2368 (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: Defined.
2369
2370 2000-08-24 Andreas Jaeger <aj@suse.de>
2371
2372 * Examples/ex13.c: Include <string.h> for strerror prototype and
2373 <stdlib.h> for abort prototype.
2374 (pthr_cond_signal_mutex): Rewrite to silence GCC.
2375 (thread_start): Remove unused variable err.
2376 (main): Silence GCC warnings.
2377
2378 2000-08-22 Andreas Jaeger <aj@suse.de>
2379
2380 * Examples/ex13.c: New test by Kurt Garloff <garloff@suse.de>.
2381
2382 * Makefile (tests): Add ex13.
2383
2384 2000-08-20 Ulrich Drepper <drepper@redhat.com>
2385
2386 * semaphore.h: Add restrict where required by AGd4.
2387 * sysdeps/pthread/pthread.h: Likewise.
2388 * sysdeps/pthread/unix/sysv/linux/bits/sigthread.h: Likewise.
2389
2390 2000-08-15 Ulrich Drepper <drepper@redhat.com>
2391
2392 * Makefile (tests): Add ex12. Add rule to build it.
2393 * Examples/ex12.c: New file.
2394
2395 2000-08-13 Ulrich Drepper <drepper@redhat.com>
2396
2397 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_SEMAPHORES
2398 even though the implementation is not quite complete (but it reports
2399 it). Define _POSIX_MESSAGE_PASSING to -1.
2400 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
2401
2402 2000-08-12 Andreas Jaeger <aj@suse.de>
2403
2404 * sysdeps/mips/pt-machine.h (testandset): Add .set mips2 for
2405 assembler.
2406 (__compare_and_swap): Likewise.
2407 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Likewise.
2408
2409 2000-08-10 Ulrich Drepper <drepper@redhat.com>
2410
2411 * pthread.c (__pthread_initial_thread): Initialize p_errnop and
2412 p_h_errnop correctly and not to NULL.
2413
2414 2000-08-05 Ulrich Drepper <drepper@redhat.com>
2415
2416 * Banner: Bump version number to 0.9.
2417
2418 2000-08-04 Ulrich Drepper <drepper@redhat.com>
2419
2420 * Makefile (tests): Add tststack. Add rule to build the program.
2421 * tststack.c: New file.
2422
2423 * internals.h: Declare __pthread_max_stacksize.
2424 * pthread.c (__pthread_max_stacksize): New variable.
2425 (__pthread_initialize_manager): Determine __pthread_initialize_manager
2426 value.
2427 * manager.c (thread_segment): Return always NULL if FLOATING_STACKS.
2428 (pthread_allocate_stack): Allow kernel to choose stack address if
2429 FLOATING_STACKS. This also handles variable-sized stacks.
2430 Always allocate stack and guardpage together. Use mprotect to
2431 change guardpage access.
2432 * sysdeps/i386/useldt.h: Define FLOATING_STACKS and
2433 ARCH_STACK_MAX_SIZE.
2434
2435 * attr.c (__pthread_attr_setstacksize): Also test value against
2436 upper limit.
2437
2438 * manager.c (__pthread_nonstandard_stacks): Define only if
2439 THREAD_SELF is not defined.
2440 (pthread_allocate_stack): Always initialize gardaddr to a correct
2441 value.
2442 (pthread_handle_create): Unmap thread with one call.
2443 (pthread_free): Remove test for initial thread before removing stack.
2444 Unmap stack with one call.
2445
2446 * pthread.c (__pthread_initial_thread): Initialize p_userstack to
2447 1 to avoid removing the stack.
2448
2449 2000-07-27 Jes Sorensen <jes@linuxcare.com>
2450
2451 * sysdeps/ia64/pspinlock.c (__pthread_spin_lock): Add
2452 load of spin lock to prime the cache before the atomic compare and
2453 exchange operation (cmpxchg4). This avoids the spinning on the
2454 cmpxchg4 instruction and reduces movement of the cache line back
2455 and forth between the processors (explanation by Asis K. Mallick
2456 from Intel). This basically makes the implementation operate the
2457 same as the Linux kernel implementation.
2458
2459 * shlib-versions: Use GLIBC_2_2 for Linux/ia64.
2460 * sysdeps/ia64/pspinlock.c: New file.
2461
2462 2000-08-03 Ulrich Drepper <drepper@redhat.com>
2463
2464 * pthread.c: Move definition of __pthread_set_own_extricate_if...
2465 * spinlock.h: ...here. Remove locking.
2466 * internals.h: Remove __pthread_set_own_extricate_if prototype.
2467
2468 * rwlock.c: Use THREAD_GETMEM And THREAD_SETMEM.
2469 (rwlock_rd_extricate_func): Don't determine self, let
2470 __pthread_lock do it.
2471 (rwlock_wr_extricate_func): Likewise.
2472 (rwlock_have_already): Optimize *pself handling a bit.
2473
2474 * mutex.c: Use __builtin_expect.
2475 * pthread.c: Likewise.
2476
2477 2000-08-02 Andreas Jaeger <aj@suse.de>
2478
2479 * sysdeps/s390/pspinlock.c: New file.
2480 * sysdeps/s390/pt-machine.h: New file.
2481 Patches by Martin Schwidefsky <schwidefsky@de.ibm.com>.
2482
2483 2000-07-12 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
2484
2485 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Implement for
2486 R3K.
2487 * sysdeps/mips/pt-machine.h (testandset): Likewise.
2488
2489 2000-07-26 Andreas Jaeger <aj@suse.de>
2490
2491 * pthread.c: Initialize p_sem_avail.
2492
2493 2000-07-25 Ulrich Drepper <drepper@redhat.com>
2494
2495 * internals.h (struct __pthread_descr_struct): Add p_sem_avail.
2496 * semaphore.c: Handle spurious wakeups.
2497
2498 * sysdeps/pthread/pthread.h: Add back PTHREAD_MUTX_FAST_NP as an alias
2499 for PTHREAD_MUTEX_ADAPTIVE_NP for source code compatibility.
2500
2501 * pthread.c (__pthread_set_own_extricate): Use THREAD_GETMEM.
2502 (__pthread_wait_for_restart): Likewise.
2503
2504 * condvar.c (pthread_cond_wait): Also check whether thread is
2505 cancelable before aborting loop.
2506 (pthread_cond_timedwait): Likewise.
2507
2508 * signals.c (pthread_sighandler): Remove special code to restrore
2509 %gs on x86.
2510 (pthread_sighandler_t): Likewise.
2511
2512 2000-07-25 Mark Kettenis <kettenis@gnu.org>
2513
2514 * internals.h (__RES_PTHREAD_INTERNAL): Remove define.
2515 * pthread.c: Include <resolv.h>.
2516 (_res): Undefine. Add extern declaration.
2517
2518 2000-07-24 Ulrich Drepper <drepper@redhat.com>
2519
2520 * pthread.c (__pthread_initial_thread): Update initializer.
2521 (__pthread_manager_thread): Likewise.
2522 (pthread_initialize): Move setrlimit call to...
2523 (__pthread_initialize_manager): ...here.
2524 (__pthread_reset_main_thread): Reset also soft limit on stack size.
2525
2526 * condvar.c: Handle spurious wakeups. [PR libc/1749].
2527 * internals.h (struct _pthread_descr_struct): Add p_condvar_avail.
2528
2529 2000-07-21 Ulrich Drepper <drepper@redhat.com>
2530
2531 * spinlock.h: If IMPLEMENT_TAS_WITH_CAS is defined use
2532 __compare_and_swap to define testandset.
2533 * sysdeps/powerpc/pt-machine.h: Add volatile to asms.
2534 Define IMPLEMENT_TAS_WITH_CAS.
2535
2536 2000-07-20 Ulrich Drepper <drepper@redhat.com>
2537
2538 * Makefile: Pass -z nodelete to linker for libpthread.so
2539 generation if it understand this option.
2540
2541 2000-07-18 Mark Kettenis <kettenis@gnu.org>
2542
2543 * manager.c (pthread_handle_create): Remove initialization of
2544 new_thread->p_res._sock.
2545
2546 2000-07-19 Kaz Kylheku <kaz@ashi.footprints.net>
2547
2548 Bugfixes to the variant of the code for machines with no compare
2549 and swap.
2550
2551 * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Wait
2552 node was not being properly enqueued, due to failing to update
2553 the lock->__status field.
2554
2555 * spinlock.c (__pthread_alt_timedlock): The oldstatus variable was
2556 being set inappropriately, causing the suspend function to be called
2557 with a null self pointer and crash.
2558
2559 2000-07-18 Ulrich Drepper <drepper@redhat.com>
2560
2561 * spinlock.h (__pthread_alt_trylock): Fix code used if no
2562 compare&swap is available.
2563
2564 * spinlock.h (__pthread_trylock): Use __compare_and_swap, not
2565 compare_and_swap.
2566
2567 * pthread.c (pthread_initialize): Don't use sysconf to determine
2568 whether the machine has more than one processor.
2569
2570 * spinlock.c (__pthread_alt_timedlock): Add back one of the
2571 removed thread_self calls.
2572
2573 2000-07-18 Kaz Kylheku <kaz@ashi.footprints.net>
2574
2575 * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Changed
2576 __compare_and_swap to compare_and_swap in code which assumes
2577 compare swap is available.
2578
2579 2000-07-18 Kaz Kylheku <kaz@ashi.footprints.net>
2580
2581 * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Fixed
2582 bug whereby thr field of waitnode structure would not be correctly
2583 set unless a null self pointer is passed to the functions.
2584 Eliminated redundant calls to thread_self().
2585
2586 2000-07-18 Jakub Jelinek <jakub@redhat.com>
2587
2588 * pthread.c (__pthread_initialize_manager): Lock
2589 __pthread_manager_thread.p_lock before calling clone.
2590
2591 2000-05-05 H.J. Lu <hjl@gnu.org>
2592
2593 * sysdeps/ia64/pt-machine.h (__compare_and_swap): Change it to
2594 have acquire semantics.
2595 (__compare_and_swap_with_release_semantics): New inline
2596 function.
2597 (HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS): New macro.
2598
2599 2000-01-28 Hans Boehm <hboehm@exch.hpl.hp.com>
2600
2601 * manager.c: Fix the problem with signals at startup.
2602 Change the way that thread stacks are allocated on IA64.
2603 Clean up some of the guard page allocation stuff.
2604
2605 1999-12-19 H.J. Lu <hjl@gnu.org>
2606
2607 * internals.h (page_roundup): New.
2608 * attr.c (__pthread_attr_setguardsize); Use page_roundup
2609 instead of roundup.
2610 * manager.c (pthread_allocate_stack): Make sure guardaddr is
2611 page aligned with page_roundup if NEED_SEPARATE_REGISTER_STACK
2612 is define.
2613
2614 1999-12-17 Hans Boehm <hboehm@exch.hpl.hp.com>
2615
2616 * manager.c (pthread_allocate_stack): Unmap the stack top
2617 if failed to map the stack bottom.
2618 Fix the guard page.
2619 (pthread_free): Fix the guard page.
2620
2621 * pthread.c (pthread_initialize): Set rlimit correctly for
2622 NEED_SEPARATE_REGISTER_STACK.
2623
2624 1999-12-16 H.J. Lu <hjl@gnu.org>
2625
2626 * pthread.c (__pthread_initialize_manager): Pass
2627 __pthread_manager_thread_bos instead of
2628 __pthread_manager_thread_tos to __clone2.
2629
2630 1999-12-16 H.J. Lu <hjl@gnu.org>
2631
2632 * manager.c (pthread_allocate_stack): Correct the calculation
2633 of "new_thread_bottom". Remove MAP_GROWSDOWN from mmap for
2634 stack bottom.
2635
2636 1999-12-13 H.J. Lu <hjl@gnu.org>
2637
2638 * sysdeps/ia64/pt-machine.h (__compare_and_swap): Added a stop
2639 bit after setting ar.ccv.
2640
2641 1999-12-12 H.J. Lu <hjl@gnu.org>
2642
2643 * manager.c (pthread_allocate_stack): Make the starting
2644 address of the stack bottom page aligned. FIXME: it may
2645 need changes in other places.
2646 (pthread_handle_create): Likewise.
2647
2648 1999-12-11 Hans Boehm <hboehm@exch.hpl.hp.com>
2649
2650 * manager.c (pthread_allocate_stack): Handle
2651 NEED_SEPARATE_REGISTER_STACK.
2652 (pthread_handle_create): Likewise.
2653 * pthread.c (__pthread_initialize_manager): Likewise.
2654
2655 * sysdeps/ia64/pt-machine.h: Use r13 for thread pointer.
2656
2657 1999-12-02 H.J. Lu <hjl@gnu.org>
2658
2659 * sysdeps/ia64/pt-machine.h: New.
2660
2661 2000-07-13 Ulrich Drepper <drepper@redhat.com>
2662
2663 * wrapsyscall.c: Mark non-__ protected names as weak.
2664 PR libc/1466.
2665
2666 2000-07-12 Bruno Haible <haible@clisp.cons.org>
2667
2668 * Examples/ex8.c: Include <sys/wait.h>, not <wait.h>.
2669
2670 2000-07-12 Ulrich Drepper <drepper@redhat.com>
2671
2672 * spinlock.c: Fix code for TEST_FOR_COMPARE_AND_SWAP being defined.
2673 Add tests also to new alternative spinlock implementation.
2674 * spinlock.h: Likewise.
2675 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2676
2677 2000-07-06 Ulrich Drepper <drepper@redhat.com>
2678
2679 * Version: Export __sigaction.
2680 * signals.c: Define __sigaction alias. Use __libc_sigaction instead
2681 of __sigaction.
2682 * pthread.c: Use __libc_sigaction instead of __sigaction.
2683
2684 * condvar.c: Implement pthread_condattr_getpshared and
2685 pthread_condattr_setpshared.
2686 * mutex.c: Implement pthread_mutexattr_getpshared and
2687 pthread_mutexattr_setpshared.
2688 * Versions: Export new functions.
2689 * sysdeps/pthread/pthread.h: Add prototypes for new functions.
2690
2691 * rwlock.c (pthread_rwlockattr_init): Use PTHREAD_PROCESS_PRIVATE.
2692 (pthread_rwlockattr_setpshared): Fail if PTHREAD_PROCESS_PRIVATE
2693 is not selected.
2694
2695 2000-07-04 Greg McGary <greg@mcgary.org>
2696
2697 * sysdeps/pthread/bits/libc-lock.h: Remove BP_SYM from
2698 pragmas. Include bp-sym.h only if _LIBC.
2699
2700 2000-07-04 Ulrich Drepper <drepper@redhat.com>
2701
2702 * spinlock.c (__pthread_unlock): Properly place write barrier.
2703 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2704
2705 2000-07-03 Ulrich Drepper <drepper@redhat.com>
2706
2707 * spinlock.c: Replace fast spinlocks by adaptive spinlocks which are
2708 faster on SMP systems. No more emulation of compare&swap for adaptive
2709 spinlocks.
2710 * spinlock.h: Likewise.
2711 * sysdeps/pthread/pthread.h: Shuffle PTHREAD_MUTEX_* values around.
2712 Replace fast with adaptive mutex.
2713 * mutex.c: Rewrite for replacement of fast by adaptive mutex.
2714 * condvar.c: Likewise.
2715 * pthread.c: Define and initialize __pthread_smp_kernel variable.
2716 * internals.h: Declare __pthread_smp_kernel.
2717 * sysdeps/pthread/bits/pthreadtypes.h: Update comment of
2718 _pthread_fastlock structure.
2719 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2720
2721 * pthread.c: Remove initialization to zero from global variables.
2722
2723 2000-06-29 Jakub Jelinek <jakub@redhat.com>
2724
2725 * shlib-versions: Make sparc64 GLIBC_2.2+ only.
2726
2727 2000-06-28 Greg McGary <greg@mcgary.org>
2728
2729 * weaks.c: Wrap BP_SYM () around weak extern declarations of
2730 pthread functions that have pointers in their return+arg signatures.
2731
2732 2000-06-27 Greg McGary <greg@mcgary.org>
2733
2734 * sysdeps/pthread/bits/libc-lock.h: Wrap BP_SYM () around weak
2735 extern declarations of pthread functions that have pointers in
2736 their return+arg signatures.
2737
2738 2000-06-26 Ulrich Drepper <drepper@redhat.com>
2739
2740 * Makefile (tests): Add ex11. Add rules to build it.
2741 * Examples/ex11.c: New file.
2742 * rwlock.c: Fix complete braindamaged previous try to implement
2743 timedout functions.
2744
2745 * spinlock.c: Pretty print.
2746
2747 2000-06-25 Ulrich Drepper <drepper@redhat.com>
2748
2749 * Makefile (tests): Add ex10. Add rules to build it.
2750 * Versions [GLIBC_2.2] (libpthread): Add pthread_mutex_timedlock,
2751 pthread_rwlock_timedrdlock, and pthread_rwlock_timedwrlock.
2752 * condvar.c (pthread_cond_wait): Allow mutex of kind
2753 PTHREAD_MUTEX_TIMED_NP.
2754 (pthread_cond_timedwait_relative): Likewise.
2755 * mutex.c (__pthread_mutex_init): Default is PTHREAD_MUTEX_TIMED_NP.
2756 (__pthread_mutex_trylock): Use __pthread_alt_trylock for
2757 PTHREAD_MUTEX_ERRORCHECK_NP. Handle PTHREAD_MUTEX_TIMED_NP.
2758 (__pthread_mutex_lock): Use __pthread_alt_lock for
2759 PTHREAD_MUTEX_ERRORCHECK_NP. Handle PTHREAD_MUTEX_TIMED_NP.
2760 (__pthread_mutex_timedlock): New function.
2761 (__pthread_mutex_unlock): Use __pthread_alt_unlock for
2762 PTHREAD_MUTEX_ERRORCHECK_NP. Handle PTHREAD_MUTEX_TIMED_NP.
2763 (__pthread_mutexattr_init): Use PTHREAD_MUTEX_TIMED_NP.
2764 (__pthread_mutexattr_settype): Allow PTHREAD_MUTEX_TIMED_NP.
2765 * spinlock.c: Implement alternate fastlocks.
2766 * spinlock.h: Add prototypes.
2767 * Examples/ex10.c: New file.
2768 * sysdeps/pthread/pthread.h: Add prototypes for new functions.
2769 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2770
2771 * rwlock.c (__pthread_rwlock_rdlock): Optimize loop a bit.
2772 (__pthread_rwlock_timedrdlock): New function.
2773 (__pthread_rwlock_timedwrlock): New function.
2774 Use laternate fastlock function everywhere.
2775
2776 2000-06-21 Andreas Jaeger <aj@suse.de>
2777
2778 * sysdeps/pthread/timer_routines.c: Include <string.h> for memset
2779 prototype.
2780
2781 * join.c: Include <stdlib.h> for exit prototype.
2782
2783 2000-06-20 Ulrich Drepper <drepper@redhat.com>
2784
2785 * sysdeps/i386/useldt.h: Include <stdlib.h>.
2786
2787 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_BARRIERS.
2788 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
2789
2790 * Makefile (libpthread-routines): Add barrier.
2791 (tests): Add ex9. Add rule to build ex9.
2792 * Versions: Export barrier functions.
2793 * barrier.c: New file.
2794 * Examples/ex9.c: New file.
2795 * sysdeps/pthread/pthread.h: Add barrier data types and declarations.
2796 * sysdeps/pthread/bits/pthreadtypes.h: Likewise.
2797 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2798
2799 2000-06-19 H.J. Lu <hjl@gnu.org>
2800
2801 * spinlock.h (HAS_COMPARE_AND_SWAP): Defined if
2802 HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS is defined.
2803 (compare_and_swap_with_release_semantics): New. Default to
2804 compare_and_swap if HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS
2805 is not defined.
2806
2807 * spinlock.c (__pthread_unlock): Call
2808 compare_and_swap_with_release_semantics () instead of
2809 compare_and_swap ().
2810
2811 2000-06-19 Ulrich Drepper <drepper@redhat.com>
2812
2813 * sysdeps/pthread/timer_create.c: Use _set_errno instead of assigning
2814 to errno directly.
2815 * sysdeps/pthread/timer_delete.c: Likewise.
2816 * sysdeps/pthread/timer_getoverr.c: Likewise.
2817 * sysdeps/pthread/timer_gettime.c: Likewise.
2818 * sysdeps/pthread/timer_settime.c: Likewise.
2819
2820 2000-06-13 Kaz Kylheku <kaz@ashi.footprints.net>
2821
2822 Timer nodes are now reference counted, and can be marked
2823 as deleted. This allows for the safe release of the global mutex
2824 in the middle without losing the timer being operated on.
2825
2826 * sysdeps/pthread/posix-timer.h (struct timer_node): The inuse
2827 member is now an enum with three values, so that an intermediate
2828 state can be represented (deleted but not free for reuse yet).
2829 New refcount member added.
2830 * sysdeps/pthread/timer_routines.c: Likewise.
2831
2832 * sysdeps/pthread/posix-timer.h (timer_addref, timer_delref,
2833 timer_valid): New inline functions added.
2834
2835 * sysdeps/pthread/timer_gettime.c (timer_gettime): Function
2836 restructured, recursive deadlock bug fixed.
2837
2838 * sysdeps/pthread/timer_gettime.c (timer_gettime): Uses new
2839 timer_addref to ensure that timer won't be deleted while mutex is not
2840 held. Also uses timer_invalid to perform validation of timer handle.
2841 * sysdeps/pthread/timer_settime.c (timer_settime): Likewise.
2842 * sysdeps/pthread/timer_getoverr.c (timer_getoverrun): Likewise.
2843
2844 2000-06-14 Ulrich Drepper <drepper@redhat.com>
2845
2846 * shlib-versions: Add entry for SH.
2847 Patch by Kaz Kojima <kkojima@rr.iij4u.or.jp>.
2848
2849 2000-06-13 Kaz Kylheku <kaz@ashi.footprints.net>
2850
2851 A few optimizations. Got rid of unnecessary wakeups of timer threads,
2852 tightened up some critical regions and micro-optimized some list
2853 manipulation code.
2854
2855 * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
2856 Returns int value now to indicate whether timer was queued at head.
2857 * sysdeps/pthread/posix-timer.h: Likewise.
2858 * sysdeps/pthread/timer_settime.c (timer_settime): Takes advantage of
2859 new return value from __timer_thread_queue_timer to avoid waking
2860 up timer thread unnecessarily.
2861
2862 * sysdeps/pthread/posix-timer.h (timer_id2ptr): No longer checks
2863 inuse flag, because this requires mutex to be held. Callers updated
2864 to do the check when they have the mutex.
2865 * sysdeps/pthread/timer_getoverr.c: Add check for inuse here.
2866
2867 * sysdeps/pthread/timer_settime.c (timer_settime): Tighter critical
2868 regions: avoids making system calls while holding timer mutex, and
2869 a few computations were moved outside of the mutex as well.
2870 * sysdeps/pthread/timer_gettime.c (timer_gettime): Likewise.
2871
2872 * sysdeps/pthread/posix-timer.h (list_unlink_ip): Function name changed
2873 to list_unlink_ip, meaning idempotent. Pointer manipulation
2874 changed to get better better code out of gcc.
2875 * sysdeps/pthread/timer_routines.c (list_unlink): Non-idempotent
2876 version of list_unlink added here.
2877 * sysdeps/pthread/timer_delete.c: Use appropriate list unlink
2878 function in all places: idempotent one for timers, non-idempotent
2879 one for thread nodes.
2880 * sysdeps/pthread/timer_settime: Likewise.
2881 * sysdeps/pthread/timer_routines.c: Likewise.
2882
2883 2000-06-13 Ulrich Drepper <drepper@redhat.com>
2884
2885 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_TIMERS): Define.
2886 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
2887
2888 * sysdeps/pthread/Makefile: Remove tests definition.
2889
2890 2000-06-12 Kazumoto Kojima <kkojima@rr.iij4u.or.jp>
2891 Yutaka Niibe <gniibe@chroot.org>
2892
2893 * sysdeps/sh/pspinlock.c: New file.
2894 * sysdeps/sh/pt-machine.h: New file.
2895
2896 2000-06-12 Ulrich Drepper <drepper@redhat.com>
2897
2898 * Makefile (tests): Add joinrace.
2899
2900 * Examples/ex6.c: Test return value of pthread_join.
2901
2902 2000-06-11 Geoff Keating <geoffk@cygnus.com>
2903
2904 * sysdeps/powerpc/pspinlock.c (__pthread_spin_lock): Implement.
2905 (__pthread_spin_trylock): Implement.
2906 (__pthread_spin_unlock): Implement.
2907 (__pthread_spin_init): Implement.
2908 (__pthread_spin_destroy): Implement.
2909
2910 2000-06-10 Ulrich Drepper <drepper@redhat.com>
2911
2912 * sysdeps/pthread/timer_routines.c (list_append): Little fix to
2913 really append the entry.
2914
2915 2000-06-10 Andreas Jaeger <aj@suse.de>
2916
2917 * lockfile.c (__fresetlockfiles): Remove unused variable fp.
2918
2919 2000-06-10 Kaz Kylheku <kaz@ashi.footprints.net>
2920
2921 * sysdeps/pthread/timer_create.c: Thread matching now done on
2922 clock type as well as thread attributes.
2923 There are individual global signal-delivering threads for
2924 different clock types.
2925 * sysdeps/pthread/posix-timer.h: Likewise.
2926 * sysdeps/pthread/timer_routines.c: Likewise.
2927
2928 * sysdeps/pthread/timer_routines.c: Thread allocation and
2929 deallocation function now remembers to put thread on active
2930 list and remove from active list.
2931 Thus now the feature of binding multiple timers
2932 to a single thread actually works.
2933
2934 2000-06-10 Ulrich Drepper <drepper@redhat.com>
2935
2936 * pthread.c (__pthread_create_2_1): Optimize a bit.
2937
2938 * internals.h (invalid_handle): Also test for p_terminated != 0.
2939 (nonexisting_handle): New function. Same as old invalid_handle.
2940 * join.c (pthread_join): Use nonexisting_handle instead of
2941 invalid_handle to test for acceptable thread handle.
2942 * manager.c (pthread_handle_free): Likewise.
2943 * joinrace.c: New file.
2944 Reported by Permaine Cheung <pcheung@cygnus.com>.
2945
2946 2000-06-08 Ulrich Drepper <drepper@redhat.com>
2947
2948 * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
2949 Correct handling of matching variable.
2950
2951 * sysdeps/pthread/tst-timer.c (main): Rewrite initializers to
2952 avoid warnings.
2953
2954 * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
2955 Be prepared for empty timer list.
2956
2957 * sysdeps/pthread/timer_create.c (timer_create): Correct names of
2958 CPUTIME clock ID. Add support for thread clocks.
2959
2960 * sysdeps/pthread/posix-timer.h (timer_ptr2id): Operands in
2961 subtraction were switched.
2962
2963 * sysdeps/pthread/timer_routines.c (init_module): Use
2964 THREAD_MAXNODES threads.
2965
2966 * sysdeps/pthread/posix-timer.h (struct timer_node): Add creator_pid.
2967 * sysdeps/pthread/timer_create.c: Fill in creator_pid.
2968 * sysdeps/pthread/timer_routines.c (thread_expire_timer): Send signal
2969 with sigqueueinfo is this system call is available.
2970
2971 * sysdeps/pthread/timer_create.c (timer_create): Allow
2972 CLOCK_CPUTIME if _POSIX_CPUTIME is defined.
2973
2974 * sysdeps/pthread/Makefile: New file. Add rules to build timer
2975 functionality.
2976 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add TIMER_MAX.
2977
2978 2000-06-04 Kaz Kylheku <kaz@ashi.footprints.net>
2979
2980 * sysdeps/pthread/posix-timer.h: New file.
2981 * sysdeps/pthread/timer_create.c: New file.
2982 * sysdeps/pthread/timer_delete.c: New file.
2983 * sysdeps/pthread/timer_getoverr.c: New file.
2984 * sysdeps/pthread/timer_gettime.c: New file.
2985 * sysdeps/pthread/timer_routines.c: New file.
2986 * sysdeps/pthread/timer_settime.c: New file.
2987 * sysdeps/pthread/tst-timer.c: New file.
2988
2989 2000-06-08 Ulrich Drepper <drepper@redhat.com>
2990
2991 * sysdeps/unix/sysv/linux/bits/local_lim.h: Remove OPEN_MAX and
2992 LINK_MAX definitions if necessary.
2993
2994 2000-06-04 Kaz Kylheku <kaz@ashi.footprints.net>
2995
2996 Added missing fork time handling of global libio lock.
2997
2998 * lockfile.c (__fresetlockfiles): Now also resets the list lock,
2999 not just the individual stream locks. Rewritten to use new
3000 iterator interface provided by libio rather than accessing
3001 global variable.
3002
3003 * lockfile.c (__flockfilelist, _funlockfilelist): New functions
3004 which lock and unlock the stream list using the new interface
3005 provied by libio.
3006 * internals.h: Likewise.
3007
3008 * ptfork.c (__fork): Now calls __flockfilelist before fork,
3009 and __funlockfilelist in the parent after the fork.
3010 Child still calls __fresetlockfiles as before.
3011
3012 * linuxthreads.texi: Now explains what happens to streams at
3013 fork time. Also whole new section on forking and thread added.
3014 Definition of pthread_atfork moved out of Miscellaneous Functions
3015 to this new section.
3016
3017 2000-06-04 Jakub Jelinek <jakub@redhat.com>
3018
3019 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c (__pthread_spin_lock):
3020 Add missing register.
3021 * sysdeps/sparc/sparc64/pspinlock.c (__pthread_spin_lock): Likewise.
3022
3023 2000-06-02 Jakub Jelinek <jakub@redhat.com>
3024
3025 * sysdeps/sparc/sparc32/pspinlock.c: Implement spinlocks.
3026 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: New.
3027 * sysdeps/sparc/sparc64/pspinlock.c: Implement spinlocks.
3028
3029 2000-05-31 Andreas Jaeger <aj@suse.de>
3030
3031 * sysdeps/mips/pspinlock.c: Implement spinlocks.
3032
3033 2000-05-28 Ulrich Drepper <drepper@redhat.com>
3034
3035 * spinlock.c (__pthread_lock): Remove ASSERT.
3036
3037 * Makefile (tests): Add ex8.
3038 * Examples/ex8.c: New file.
3039
3040 2000-05-12 Kaz Kylheku <kaz@ashi.footprints.net>
3041
3042 Bugfix: The pthread_atfork mechanism now takes care of its
3043 own internal mutex at fork time.
3044
3045 * ptfork.c (__fork): Revised so that the mutex is held across
3046 the fork operation and while the handlers are called, and so that
3047 the child resets the mutex.
3048
3049 * linuxthreads.texi: Updated pthread_atfork documentation to make
3050 it clear that fork and pthread_atfork can't be reentered from
3051 atfork handlers, that pthread_atfork and fork are mutually atomic,
3052 and that the handlers are inherited by the child process.
3053
3054 2000-05-24 Ulrich Drepper <drepper@redhat.com>
3055
3056 * Makefile (libpthread-routines): Add pspinlock.
3057 * cancel.c: Rename __pthread_spin_unlock back to __pthread_unlock.
3058 Use struct _pthread_fastlock instead of pthread_spinlock_t.
3059 * condvar.c: Likewise.
3060 * internals.h: Likewise.
3061 * join.c: Likewise.
3062 * manager.c: Likewise.
3063 * mutex.c: Likewise.
3064 * pthread.c: Likewise.
3065 * rwlock.c: Likewise.
3066 * semaphore.c: Likewise.
3067 * signals.c: Likewise.
3068 * spinlock.h: Likewise.
3069 * spinlock.c: Likewise. Remove pthread_spin_lock functions.
3070 * sysdeps/alpha/pspinlock.c: New file.
3071 * sysdeps/arm/pspinlock.c: New file.
3072 * sysdeps/i386/pspinlock.c: New file.
3073 * sysdeps/m68k/pspinlock.c: New file.
3074 * sysdeps/mips/pspinlock.c: New file.
3075 * sysdeps/powerpc/pspinlock.c: New file.
3076 * sysdeps/sparc/sparc32/pspinlock.c: New file.
3077 * sysdeps/sparc/sparc64/pspinlock.c: New file.
3078 * sysdeps/pthread/bits/pthreadtypes.h: Remove pthread_spinlock_t
3079 back to _pthread_fastlock. Define new pthread_spinlock_t.
3080
3081 2000-05-24 Andreas Jaeger <aj@suse.de>
3082
3083 * sysdeps/i386/i686/pt-machine.h: Only use LDT on newer kernels.
3084
3085 2000-05-21 Jakub Jelinek <jakub@redhat.com>
3086
3087 * manager.c (pthread_handle_create): Initialize p_res._sock to -1.
3088
3089 2000-05-13 Jakub Jelinek <jakub@redhat.com>
3090
3091 * internals.h (__RES_PTHREAD_INTERNAL): Define.
3092
3093 2000-05-06 Kaz Kylheku <kaz@ashi.footprints.net>
3094
3095 * mutex.c (pthread_once): IN_PROGRESS state of pthread_once_t
3096 object state is represented with additional bits which distinguish
3097 whether that state was set up in the current process, or
3098 in an ancestor process. If that state was set in an ancestor,
3099 it means that a fork happened while thread was executing the init
3100 function. In that case, the state is reset to NEVER.
3101 * mutex.c (__pthread_once_fork_prepare): New function.
3102 (__pthread_once_fork_child): Likewise
3103 (__pthread_once_fork_parent): Likewise
3104 (__pthread_reset_pthread_once): Removed.
3105 * ptfork.c (__fork): Call new handlers in mutex.c.
3106 * internals.h: Declarations of new mutex.c functions added.
3107 Declaration of removed function deleted.
3108 * linuxthreads.texi: Updated documentation about pthread_once
3109 to clarify what happens under cancellation and forking.
3110
3111 2000-05-06 Kaz Kylheku <kaz@ashi.footprints.net>
3112
3113 * internals.h: New thread manager request type, REQ_KICK.
3114 * join.c (pthread_exit): main thread now calls exit() instead
3115 of _exit() in order to proper process cleanup.
3116 * manager.c (__pthread_manager): Do not terminate manager
3117 after unblocking main thread; wait for main thread's
3118 REQ_PROCESS_EXIT request instead.
3119 Also, added REQ_KICK case to handle new request; this just does
3120 nothing.
3121 * manager.c (pthread_exited): Do not terminate manager after
3122 unblocking main thread.
3123 * manager.c (__pthread_manager_sighandler): If the main thread
3124 is waiting for all other threads to die, send a REQ_KICK into
3125 the thread manager request pipe to get it to clean out the threads
3126 and unblock the main thread as soon as possible. This fixes
3127 the 2000 millisecond hang on shutdown bug.
3128 * Examples/ex7.c: New file, tests shutdown behavior when all threads
3129 including the main one call pthread_exit(), or implicitly do so.
3130 * Makefile (tests): Add ex7.
3131
3132 2000-05-05 Andreas Jaeger <aj@suse.de>
3133
3134 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
3135 (pthread_getcpuclockid): Correct test for ourselves.
3136
3137 2000-05-05 Ulrich Drepper <drepper@redhat.com>
3138
3139 * internals.h (struct _pthread_descr_struct): Reorganization.
3140 Allocate room for 16 pointers at head of the structure for future
3141 thread-local data handling. Move p_self member in this area.
3142 * manager.c (pthread_handle_create): Adjust use of p_self.
3143 * sysdeps/i386/useldt.h (THREAD_SELF): Likewise.
3144 * pthread.c (__pthread_initial_thread): Adjust initialization.
3145 (__pthread_manager_thread): Likewise.
3146
3147 2000-04-29 Bruno Haible <haible@clisp.cons.org>
3148
3149 * join.c (pthread_exit): Use THREAD_GETMEM_NC instead of THREAD_GETMEM
3150 for eventmask larger than 1 word.
3151
3152 2000-04-27 Ulrich Drepper <drepper@redhat.com>
3153
3154 * Versions [libpthread] (GLIBC_2.2): Add __pthread_initialize_minimal.
3155 * pthread.c (__pthread_initialize_minimal): New function. Perform
3156 minimal initialization.
3157 (pthread_initialize): Remove this code here.
3158 * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h" again. We
3159 are working around the problem in glibc.
3160
3161 2000-04-25 Ulrich Drepper <drepper@redhat.com>
3162
3163 * sysdeps/i386/i686/pt-machine.h: Do not use "../useldt.h" for
3164 now. First gcc must be fixed (more concrete: libgcc).
3165
3166 2000-04-24 Ulrich Drepper <drepper@redhat.com>
3167
3168 * pthread.c: Remove special treatement for interrupt handlers on x86.
3169 * manager.c (pthread_free): Use FREE_THREAD not FREE_THREAD_SELF.
3170 * sysdeps/i386/useldt.h: Use "q" constraint instead of "r" where
3171 necessary.
3172 * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h".
3173
3174 2000-04-24 Mark Kettenis <kettenis@gnu.org>
3175
3176 * join.c (pthread_exit): Set p_terminated after reporting the
3177 termination event instead of before.
3178
3179 2000-04-20 Jakub Jelinek <jakub@redhat.com>
3180
3181 * sysdeps/pthread/bits/libc-lock.h: Only declare __pthread_rwlock_*
3182 if __USE_UNIX98.
3183
3184 2000-04-18 Andreas Jaeger <aj@suse.de>
3185
3186 * Versions: Use ld instead of ld.so.
3187
3188 2000-04-18 Jakub Jelinek <jakub@redhat.com>
3189
3190 * sysdeps/unix/sysv/linux/sparc/bits/sigcontext.h (struct sigcontext):
3191 Remove the typedef keyword.
3192
3193 2000-04-18 Jakub Jelinek <jakub@redhat.com>
3194
3195 * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Use membar,
3196 not stbar.
3197 (READ_MEMORY_BARRIER): Define.
3198 * spinlock.c (__pthread_spin_unlock): Use READ_MEMORY_BARRIER, not
3199 MEMORY_BARRIER.
3200 * internals.h (READ_MEMORY_BARRIER): Define if not defined in sysdep
3201 headers.
3202
3203 2000-04-17 Ulrich Drepper <drepper@redhat.com>
3204
3205 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
3206 (pthread_getcpuclockid): Don't compare thread_id with thread_self,
3207 use thread_handle().
3208
3209 2000-04-16 Ulrich Drepper <drepper@redhat.com>
3210
3211 * condvar.c (pthread_cond_timedwait_relative): Don't test for owner
3212 if fast mutex is used. Don't initialize `already_canceled' twice.
3213 Correctly test for return value of timedsuspend.
3214
3215 * pthread.c: Correct long-time braino. We never set SA_SIGINFO and
3216 therefore don't need the _rt versions of the signal handlers.
3217
3218 2000-04-15 Ulrich Drepper <drepper@redhat.com>
3219
3220 * pthread.c (pthread_yield): New function.
3221 * sysdeps/pthread/pthread.h (pthread_yield): Add prototype.
3222 * Versions [libpthread] (GLIBC_2.2): Add pthread_yield.
3223 * internals.h: Declare __pthread_yield.
3224
3225 * pthread.c (pthread_initialize): Avoid a bit more code if
3226 realtime signals are known to exist.
3227
3228 * pthread.c: Is __ASSUME_REALTIME_SIGNALS then avoid generating code
3229 to dynamically detect RT signals and avoid generating compatibility
3230 functions with old kernel.
3231 * restart.h (restart) [__ASSUME_REALTIME_SIGNALS]: Use
3232 __pthread_restart_new directly.
3233 (suspend) [__ASSUME_REALTIME_SIGNALS]: Use
3234 __pthread_wait_for_restart_signal directly.
3235 (timedsuspend) [__ASSUME_REALTIME_SIGNALS]: Use
3236 __pthread_timedsuspend_new directly.
3237
3238 2000-04-15 Ulrich Drepper <drepper@redhat.com>
3239
3240 * condvar.c: Remove all the special code to handle cond_timedwait.
3241 Use timedsuspend instead.
3242 * internals.h: Declare __pthread_timedsuspend_old,
3243 __pthread_timedsuspend_new, and __pthread_timedsuspend.
3244 Remove declaration of __pthread_init_condvar.
3245 * pthread.c: Define __pthread_timedsuspend variable.
3246 (__pthread_timedsuspend_old): New function. Timed suspension
3247 implementation for old Linux kernels.
3248 (__pthread_timedsuspend_new): New function. Timed suspension
3249 implementation for new Linux kernels.
3250 * restart.h (timedsuspend): New function. Call appropriate
3251 suspension function through __pthread_timedsuspend.
3252 * semaphore.c (sem_timedwait): Use timedsuspend, don't duplicate
3253 the code.
3254 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
3255
3256 * internals.h (WRITE_MEMORY_BARRIER): Define as MEMORY_BARRIER if
3257 undefined.
3258 * spinlock.c: Use WRITE_MEMORY_BARRIER instead of MEMORY_BARRIER
3259 where possible.
3260 * sysdeps/alpha/pt-machine.h: Define WRITE_MEMORY_BARRIER.
3261 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
3262
3263 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _POSIX_SPAWN.
3264 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3265
3266 2000-04-14 Andreas Jaeger <aj@suse.de>
3267
3268 * weaks.c: Fix typo.
3269
3270 * shlib-versions (mips.*-.*-linux.*): Support only GLIBC 2.0 and
3271 2.2 for linuxthreads.
3272
3273 2000-04-13 Ulrich Drepper <drepper@redhat.com>
3274
3275 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
3276 (pthread_getcpuclockid): Fix typo.
3277
3278 2000-04-12 Ulrich Drepper <drepper@redhat.com>
3279
3280 * Makefile (libpthread-routines): Add getcpuclockid.
3281 * Versions [libpthread] (GLIBC_2.2): Add pthread_getcpuclockid.
3282 * sysdeps/pthread/getcpuclockid.c: New file.
3283 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c: New file.
3284 * sysdeps/pthread/pthread.h: Add prototype for pthread_getcpuclockid.
3285
3286 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_SPIN_LOCKS):
3287 Defined.
3288 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3289
3290 * sysdeps/pthread/pthread.h: Add prototypes for pthread_spin_init,
3291 pthread_spin_destroy, pthread_spin_lock, pthread_spin_trylock,
3292 and pthread_spin_unlock.
3293 * sysdeps/pthread/bits/pthreadtypes.h: Change struct _pthread_fastlock
3294 into pthread_spinlock_t. Change all uses.
3295 * spinlock.c: Implement pthread_spin_lock.
3296 Rename __pthread_unlock to __pthread_spin_unlock and define weak
3297 alias for real name.
3298 Define pthread_spin_trylock, pthread_spin_init, and
3299 pthread_spin_destroy.
3300 Change all uses of _pthread_fastlock to pthread_spinlock_t.
3301 * spinlock.h: Rename __pthread_unlock to __pthread_spin_unlock.
3302 Change all uses of _pthread_fastlock to pthread_spinlock_t.
3303 * Versions [libpthread] (GLIBC_2.2): Add pthread_spin_init,
3304 pthread_spin_destroy, pthread_spin_lock, pthread_spin_trylock,
3305 and pthread_spin_unlock.
3306 * cancel.c: Use __pthread_spin_unlock instead of __pthread_unlock.
3307 Change all uses of _pthread_fastlock to pthread_spinlock_t.
3308 * condvar.c: Likewise.
3309 * internals.h: Likewise.
3310 * join.c: Likewise.
3311 * manager.c: Likewise.
3312 * mutex.c: Likewise.
3313 * pthread.c: Likewise.
3314 * rwlock.c: Likewise.
3315 * semaphore.c: Likewise.
3316 * signals.c: Likewise.
3317
3318 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add various new POSIX
3319 macros.
3320 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
3321
3322 2000-04-11 Ulrich Drepper <drepper@redhat.com>
3323
3324 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add
3325 _POSIX_SHARED_MEMORY_OBJECTS.
3326
3327 2000-04-11 Andreas Jaeger <aj@suse.de>
3328
3329 * sysdeps/mips/pt-machine.h (MEMORY_BARRIER): Define.
3330 (__compare_and_swap): Mark as modifying memory.
3331
3332 2000-04-11 Geoff Keating <geoffk@cygnus.com>
3333
3334 * sysdeps/powerpc/pt-machine.h (MEMORY_BARRIER): Don't be
3335 __volatile__.
3336 (__compare_and_swap): Replace other 'sync' with MEMORY_BARRIER.
3337 Don't have the 'asm' __volatile__.
3338
3339 2000-04-11 Ulrich Drepper <drepper@redhat.com>
3340
3341 * internals.h: Define MEMORY_BARRIER as empty if not defined already.
3342 * spinlock.c (__pthread_lock): Add memory barriers.
3343 (__pthread_unlock): Likewise.
3344 * sysdeps/alpha/pt-machine.h (MEMORY_BARRIER): Define using mb
3345 instruction.
3346 (RELEASE): Not needed anymore.
3347 (__compare_and_swap): Mark asm as modifying memory.
3348 * sysdeps/powerpc/pt-machine.h (sync): Remove. Replace with definition
3349 of MEMORY_BARRIER.
3350 (__compare_and_swap): Use MEMORY_BARRIER instead of sync.
3351 * sysdeps/sparc/sparc32/pt-machine.h (RELEASE): Not needed anymore.
3352 (MEMORY_BARRIER): Define using stbar.
3353 * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Define using
3354 stbar.
3355 (__compare_and_swap): Use MEMORY_BARRIER to ensure ordering.
3356 Patch by Xavier Leroy <Xavier.Leroy@inria.fr> based on comments by
3357 Mike Burrows <m3b@pa.dec.com>.
3358
3359 2000-04-09 Ulrich Drepper <drepper@redhat.com>
3360
3361 * signals.c (sigaction): Fix return value for the case SIG is one
3362 of the signals the implementation uses.
3363 Patch by Xavier.Leroy@inria.fr.
3364
3365 2000-04-01 Andreas Jaeger <aj@suse.de>
3366
3367 * attr.c: Use shlib-compat macros.
3368 * oldsemaphore.c: Likewise.
3369 * pthread.c: Likewise.
3370 * weaks.c: Likewise.
3371
3372 2000-03-26 Ulrich Drepper <drepper@redhat.com>
3373
3374 * semaphore.c (sem_timedwait): New function.
3375 Patch by Carl Mailloux <carlm@oricom.ca>.
3376 * semaphore.h: Declare sem_timedwait.
3377 * Versions [libpthread] (GLIBC_2.2): Add sem_timedwait.
3378
3379 2000-03-26 Roland McGrath <roland@baalperazim.frob.com>
3380
3381 * sysdeps/pthread/Makefile: File removed.
3382
3383 2000-03-23 Ulrich Drepper <drepper@redhat.com>
3384
3385 * mutex.c (__pthread_reset_pthread_once): Reset once_masterlock.
3386 * internals.h (__pthread_reset_pthread_once): Add prototype.
3387 * ptfork.c (__fork): Call __pthread_reset_pthread_once.
3388
3389 * manager.c (pthread_handle_create): Store ID of new thread before
3390 clone call.
3391
3392 2000-03-21 Ulrich Drepper <drepper@redhat.com>
3393
3394 * attr.c: Use new macros from shlib-compat.h to define versions.
3395 * oldsemaphore.c: Likewise.
3396 * semaphore.c: Likewise.
3397 * weaks.c: Likewise.
3398
3399 * pthread.c: Update for new SHLIB_COMPAT definition.
3400
3401 * manager.c (__pthread_manager): Unmask debug signal.
3402
3403 * pthread.c (pthread_initialize): Test for address of __dso_handle
3404 being NULL, not value. Use __on_exit, not on_exit.
3405 Patch by Andreas Jaeger <aj@suse.de>.
3406
3407 * pthread.c: Use new macros from shlib-compat.h to define versions.
3408
3409 2000-03-19 Ulrich Drepper <drepper@redhat.com>
3410
3411 * pthread.c (pthread_initialize): Instead of on_exit use
3412 __cxa_atexit if __dso_label is available to allow unloading the
3413 libpthread shared library.
3414
3415 2000-03-16 Ulrich Drepper <drepper@redhat.com>
3416
3417 * condvar.c: Make tests for ownership of mutex less strict.
3418
3419 2000-03-14 Ulrich Drepper <drepper@redhat.com>
3420
3421 * condvar.c (pthread_cond_wait): Check whether mutex is owned by
3422 current thread and return error if not.
3423 (pthread_cond_timedwait_relative_old): Likewise.
3424 (pthread_cond_timedwait_relative_new): Likewise.
3425
3426 * mutex.c (__pthread_once): Handle cancelled init function correctly.
3427 (pthread_once_cancelhandler): New function.
3428 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
3429
3430 2000-03-14 Andreas Jaeger <aj@suse.de>
3431
3432 * pthread.c (pthread_handle_sigcancel_rt): GS has been renamed to
3433 REG_GS.
3434 (pthread_handle_sigrestart_rt): Likewise.
3435 * signals.c (pthread_sighandler_rt): Likewise.
3436
3437 2000-03-02 Andreas Jaeger <aj@suse.de>
3438
3439 * sysdeps/pthread/bits/libc-lock.h: Fix typo.
3440 Reported by Sean Chen <sean.chen@turbolinux.com>.
3441
3442 2000-02-28 Andreas Jaeger <aj@suse.de>
3443
3444 * rwlock.c: Fix typo.
3445
3446 2000-02-27 Ulrich Drepper <drepper@redhat.com>
3447
3448 * rwlock.c: Define __* variants of the functions and make old names
3449 aliases.
3450 * Versions [GLIBC_2.2]: Export the __pthread_rwlock_* functions.
3451 * sysdeps/pthread/bits/libc-lock.h: Define __libc_rwlock_* macros.
3452
3453 2000-02-25 Andreas Jaeger <aj@suse.de>
3454
3455 * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
3456 pwrite64, lseek64, open64, and __open64 with version 2.2.
3457
3458 2000-02-22 Ulrich Drepper <drepper@redhat.com>
3459
3460 * semaphore.h (SEM_FAILED): Use 0 not NULL.
3461
3462 2000-02-14 Ulrich Drepper <drepper@redhat.com>
3463
3464 * condvar.c (pthread_cond_timedwait_relative_old): Tight loop with
3465 nanosleep does not work either. Get absolute time inside the
3466 loop.
3467 (pthread_cond_timedwait_relative_new): Likewise.
3468 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
3469
3470 2000-02-13 Andreas Jaeger <aj@suse.de>
3471
3472 * condvar.c (pthread_cond_timedwait_relative_new): Fix last patch.
3473 (pthread_cond_timedwait_relative_old): Likewise.
3474
3475 2000-02-13 Ulrich Drepper <drepper@redhat.com>
3476
3477 * condvar.c (pthread_cond_timedwait_relative_old): Undo last patch
3478 but keep the code around. A bug in the kernel prevent us from
3479 using the code.
3480 (pthread_cond_timedwait_relative_new): Likewise.
3481 (PR libc/1597 and libc/1598).
3482
3483 2000-02-01 Kaz Kylheku <kaz@ashi.footprints.net>
3484
3485 * condvar.c (pthread_cond_timedwait_relative_old): Do tight
3486 loop around nanosleep calls instead of around most of the function
3487 (pthread_cond_timedwait_relative_new): Likewise.
3488 body. Got rid of backwards goto and one local.
3489
3490 2000-01-31 Ulrich Drepper <drepper@redhat.com>
3491
3492 * condvar.c (pthread_cond_timedwait_relative_old): Recompute time
3493 before every nanosleep call to account for time spent in the rest
3494 of the function.
3495 (pthread_cond_timedwait_relative_new): Likewise.
3496 Patch by khendricks@ivey.uwo.ca (PR libc/1564).
3497
3498 2000-01-29 Ulrich Drepper <drepper@redhat.com>
3499
3500 * condvar.c (pthread_cond_timedwait_relative_old): Get remaining time
3501 from nanosleep call so that in case we restart we only wait for the
3502 remaining time.
3503 (pthread_cond_timedwait_relative_new): Likewise.
3504 Patch by khendricks@ivey.uwo.ca (PR libc/1561).
3505
3506 2000-01-18 Ulrich Drepper <drepper@cygnus.com>
3507
3508 * manager.c (pthread_allocate_stack): Compute guard page address
3509 correctly. Patch by HJ Lu.
3510
3511 * sysdeps/pthread/pthread.h: Define
3512 PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP.
3513
3514 2000-01-16 Ulrich Drepper <drepper@cygnus.com>
3515
3516 * rwlock.c (pthread_rwlock_unlock): Correct one more problem with
3517 preference handling.
3518 (pthread_rwlockattr_setkind_np): Allow
3519 PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP.
3520 Patches by Kaz Kylheku <kaz@ashi.footprints.net>.
3521
3522 2000-01-12 Ulrich Drepper <drepper@cygnus.com>
3523
3524 * internals.h (pthread_readlock_info): New structure.
3525 (_pthread_descr_struct): Add p_readlock_list, p_readlock_free, and
3526 p_untracked_readlock_count.
3527 * pthread.c (__pthread_initial_thread, pthread_manager_thread):
3528 Add initializers for new fields.
3529 * manager.c (pthread_free): Free read/write lock lists.
3530 * queue.h (queue_is_empty): New function.
3531 * rwlock.c: Implement requirements about when readers should get
3532 locks assigned.
3533 * sysdeps/pthread/pthread.h
3534 (PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP): New definition.
3535 * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_rwlock_t):
3536 Define this name as well.
3537 Patches by Kaz Kylheku <kaz@ashi.footprints.net>.
3538
3539 2000-01-05 Ulrich Drepper <drepper@cygnus.com>
3540
3541 * pthread.c (__pthread_initial_thread, pthread_manager_thread):
3542 Adjust initializers for struct _pthread_descr_struct change.
3543 * internals.h (struct _pthread_descr_struct): Move new elements to
3544 the end.
3545
3546 2000-01-03 Kaz Kylheku <kaz@ashi.footprints.net>
3547
3548 Redesigned how cancellation unblocks a thread from internal
3549 cancellation points (sem_wait, pthread_join,
3550 pthread_cond_{wait,timedwait}).
3551 Cancellation won't eat a signal in any of these functions
3552 (*required* by POSIX and Single Unix Spec!).
3553 * condvar.c: Spontaneous wakeup on pthread_cond_timedwait won't eat a
3554 simultaneous condition variable signal (not required by POSIX
3555 or Single Unix Spec, but nice).
3556 * spinlock.c: __pthread_lock queues back any received restarts
3557 that don't belong to it instead of assuming ownership of lock
3558 upon any restart; fastlock can no longer be acquired by two threads
3559 simultaneously.
3560 * restart.h: Restarts queue even on kernels that don't have
3561 queued real time signals (2.0, early 2.1), thanks to atomic counter,
3562 avoiding a rare race condition in pthread_cond_timedwait.
3563
3564 1999-12-31 Andreas Jaeger <aj@suse.de>
3565
3566 * internals.h: Remove duplicate prototype declarations.
3567
3568 * weaks.c: Remove __THROW from prototypes since the file is not
3569 compiled by a C++ compiler.
3570 * internals.h: Likewise.
3571
3572 1999-12-30 Andreas Jaeger <aj@suse.de>
3573
3574 * sysdeps/pthread/pthread.h: Move internal functions to...
3575 * sysdeps/pthread/bits/libc-lock.h: ...here.
3576
3577 1999-12-29 Andreas Jaeger <aj@suse.de>
3578
3579 * sysdeps/pthread/pthread.h: Fix typos, reformat comments.
3580
3581 1999-12-28 Ulrich Drepper <drepper@cygnus.com>
3582
3583 * sysdeps/alpha/pt-machine.h: Move stack_pointer definition to the
3584 beginning.
3585
3586 * manager.c (__pthread_start): Add one more cast to prevent
3587 warning on 64bit machines.
3588
3589 1999-12-21 Ulrich Drepper <drepper@cygnus.com>
3590
3591 * manager.c (pthread_handle_create): Set p_pid of new thread
3592 before calling the callback function to report a new thread.
3593
3594 1999-12-20 Andreas Jaeger <aj@suse.de>
3595
3596 * pthread.c (pthread_initialize): Move getrlimit call after
3597 setting of errno.
3598
3599 1999-12-18 Ulrich Drepper <drepper@cygnus.com>
3600
3601 * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
3602 pwrite64, lseek64, open64, and __open64.
3603 * wrapsyscall.c: Define pread, __pread64, pread64, pwrite, __pwrite64,
3604 pwrite64, lseek64, open64, and __open64.
3605
3606 * manager.c (pthread_allocate_stack): Correct computation of
3607 new_thread_bottom. Correct handling of stack size and when the
3608 rlimit method to guard for stack growth is used.
3609 * pthread.c (pthread_initialize): Stack limit must be STACK_SIZE
3610 minus one pagesize (not two).
3611
3612 1999-12-03 Andreas Jaeger <aj@suse.de>
3613
3614 * Versions: Add __res_state with version GLIBC_2.2.
3615
3616 * errno.c (__res_state): New function to return thread specific
3617 resolver state.
3618
3619 * pthread.c (pthread_initialize): Initialize p_resp.
3620 (__pthread_reset_main_thread): Also set p_resp.
3621
3622 * manager.c (pthread_handle_create): Initialize p_resp.
3623
3624 * internals.h: Add thread specific resolver state.
3625 Based on patches by Adam D. Bradley <artdodge@cs.bu.edu>.
3626
3627 1999-12-01 Ulrich Drepper <drepper@cygnus.com>
3628
3629 * sysdeps/i386/pt-machine.h: Move stack_pointer definition to the
3630 beginning.
3631 * sysdeps/i386/i686/pt-machine.h: Likewise.
3632 Patches by Alan Modra <alan@SPRI.Levels.UniSA.Edu.Au>.
3633
3634 1999-11-23 Ulrich Drepper <drepper@cygnus.com>
3635
3636 * manager.c (pthread_start_thread_event): Initialize p_pid already
3637 here.
3638
3639 1999-11-22 Ulrich Drepper <drepper@cygnus.com>
3640
3641 * internals.h: Add prototype for __pthread_manager_event.
3642 * manager.c (__pthread_manager_event): New function.
3643 (pthread_start_thread_event): Correct computation of self.
3644 Use INIT_THREAD_SELF.
3645 * pthread.c (__pthread_manager_thread): Initialize p_lock.
3646 (__pthread_initialize_manager): Respect event flags also for creation
3647 of the manager thread.
3648
3649 1999-11-08 Ulrich Drepper <drepper@cygnus.com>
3650
3651 * pthread.c (__pthread_initialize_manager): Initialize
3652 __pthread_manager_thread.p_tid.
3653
3654 1999-11-02 Ulrich Drepper <drepper@cygnus.com>
3655
3656 * internals.h: Declare __pthread_last_event.
3657 * manager.c: Define __pthread_last_event.
3658 (pthread_handle_create): Set __pthread_last_event.
3659 (pthread_exited): Likewise.
3660 * join.c (pthread_exit): Likewise.
3661
3662 * Makefile (libpthread-routines): Add events.
3663 * events.c: New file.
3664 * internals.h: Protect against multiple inclusion.
3665 Include thread_dbP.h header.
3666 (struct _pthread_descr_struct): Add new fields p_report_events and
3667 p_eventbuf.
3668 Declare event reporting functions.
3669 * join.c (pthread_exit): Signal event if this is wanted.
3670 * manager.c (__pthread_threads_events): New variable.
3671 (pthread_handle_create): Take new parameters with event information.
3672 Signal TD_CREATE event if wanted.
3673 (__pthread_manager): Adjust pthread_handle_create call.
3674 (pthread_start_thread_event): New function. Block until manager is
3675 finished and then call pthread_start_thread.
3676 (pthread_exited): Signal TD_REAP event if wanted.
3677
3678 1999-10-26 Ulrich Drepper <drepper@cygnus.com>
3679
3680 * restart.h (suspend_with_cancellation): Rewrite as a macro.
3681
3682 * condvar.c (pthread_cond_timedwait_relative): Don't mark as inline.
3683
3684 1999-10-25 Andreas Jaeger <aj@suse.de>
3685
3686 * internals.h: Remove K&R compatibility.
3687 * no-tsd.c: Likewise.
3688 * semaphore.h: Likewise.
3689 * signals.c: Likewise.
3690 * sysdeps/pthread/bits/libc-tsd.h: Likewise.
3691 * sysdeps/unix/sysv/linux/bits/sigthread.h: Likewise.
3692 * weaks.c: Likewise.
3693
3694 1999-10-21 Xavier Leroy <Xavier.Leroy@inria.fr>
3695
3696 * pthread.c: For i386, wrap pthread_handle_sigrestart and
3697 pthread_handle_sigcancel with functions that restore %gs from the
3698 signal context. For each signal handling function, two wrappers
3699 are required, one for a non-RT signal and one for a RT signal.
3700 * signal.c: For i386, add code to restore %gs from the signal
3701 context in pthread_sighandler and pthread_sighandler_rt.
3702
3703 1999-10-17 Ulrich Drepper <drepper@cygnus.com>
3704
3705 * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add cast.
3706
3707 1999-10-14 Ulrich Drepper <drepper@cygnus.com>
3708
3709 * pthread.c (__pthread_initial_thread): Pass argument to
3710 PTHREAD_START_ARGS_INITIALIZER.
3711 (__pthread_manager_thread): Likewise.
3712
3713 * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add parameter to
3714 initialize function.
3715
3716 * manager.c (pthread_handle_create): Remove p_startfct initialization.
3717
3718 * internals.h (_pthread_descr_struct): We don't need p_startfct field.
3719
3720 1999-10-12 Ulrich Drepper <drepper@cygnus.com>
3721
3722 * internals.h: Correct return types for __libc_read and __libc_write.
3723
3724 1999-10-09 Andreas Jaeger <aj@suse.de>
3725
3726 * internals.h: Add __new_sem_post to get prototype in
3727 manager.c; include semaphore.h for needed types.
3728
3729 1999-10-08 Ulrich Drepper <drepper@cygnus.com>
3730
3731 * manager.c (__pthread_manager) [REQ_POST]: Use __new_sem_post
3732 directly instead of calling sem_post which should not be necessary
3733 but is faster and might help in some case to work around problems.
3734 Patch by khendricks@ivey.uwo.ca [libc/1382].
3735
3736 1999-10-08 Andreas Schwab <schwab@suse.de>
3737
3738 * sysdeps/pthread/Subdirs: New file.
3739 * Implies: Removed.
3740
3741 1999-10-07 Ulrich Drepper <drepper@cygnus.com>
3742
3743 * Implies: New file.
3744 * internals.h (struct _pthread_descr_struct): Add p_startfct.
3745 * manager.c (pthread_handle_create): Initialize p_startfct.
3746 * pthread.c: Define __linuxthread_pthread_sizeof_descr variable.
3747
3748 1999-09-25 Ulrich Drepper <drepper@cygnus.com>
3749
3750 * manager.c (__linuxthreads_pthread_threads_max): New variable.
3751 * specific.c (__linuxthreads_pthread_keys_max): New variable.
3752 (__linuxthreads_pthread_key_2ndlevel_size): New variable.
3753
3754 * condvar.c (pthread_cond_timedwait_relative): Never return with
3755 EINTR. Patch by Andreas Schwab.
3756
3757 1999-09-19 Ulrich Drepper <drepper@cygnus.com>
3758
3759 * signals.c (sigaction): Correct last patch. Don't select
3760 pthread_sighandler_rt based on the signal number but instead of
3761 the SA_SIGINFO flag.
3762
3763 1999-09-23 Ulrich Drepper <drepper@cygnus.com>
3764
3765 * specific.c: Move definitions of struct pthread_key_struct and
3766 destr_function to ...
3767 * internals.h: ...here.
3768
3769 1999-09-18 Ulrich Drepper <drepper@cygnus.com>
3770
3771 * pthread.c (pthread_handle_sigrestart_rt): New function. Use
3772 this instead of pthread_handle_sigrestart if the signal is an RT
3773 signal.
3774
3775 * signals.c: Handle passing through of sighandler arguments also
3776 for real-time signals.
3777
3778 1999-09-03 Andreas Schwab <schwab@suse.de>
3779
3780 * ptfork.c (__fork): Renamed from fork and use __libc_fork. Add
3781 fork as weak alias.
3782 (__vfork): New function, alias vfork.
3783 * Versions: Export __fork, vfork, and __vfork in libpthread.
3784
3785 1999-08-23 Andreas Schwab <schwab@suse.de>
3786
3787 * signals.c (pthread_sighandler): Add SIGCONTEXT_EXTRA_ARGS to
3788 call to signal handler.
3789
3790 1999-08-20 Ulrich Drepper <drepper@cygnus.com>
3791
3792 * pthread.c (__pthread_reset_main_thread): Undo last change.
3793 (__pthread_kill_other_threads_np): Reset signal handlers for the
3794 signals we used in the thread implementation here.
3795
3796 1999-08-19 Ulrich Drepper <drepper@cygnus.com>
3797
3798 * pthread.c (__pthread_reset_main_thread): Reset signal handlers
3799 for the signals we used in the thread implementation [PR libc/1234].
3800
3801 * Versions: Export __pthread_kill_other_threads_np from libpthread
3802 for GLIBC_2.1.2.
3803
3804 * signals.c: Pass sigcontext through wrapper to the user function.
3805
3806 1999-08-01 Ulrich Drepper <drepper@cygnus.com>
3807
3808 * Versions [ld.so] (GLIBC_2.0): Export __libc_internal_tsd_get and
3809 __libc_internal_tsd_set.
3810
3811 1999-07-29 Andreas Jaeger <aj@arthur.rhein-neckar.de>
3812
3813 * manager.c: Remove inclusion of <linux/tasks.h> since it's not
3814 needed anymore.
3815
3816 1999-07-16 Andreas Jaeger <aj@arthur.rhein-neckar.de>
3817
3818 * internals.h: Align _pthread_descr_struct to 32 bytes.
3819 Reported by Tim Hockin <thockin@cobaltnet.com>, close PR
3820 libc/1206.
3821
3822 1999-07-09 Ulrich Drepper <drepper@cygnus.com>
3823
3824 * oldsemaphore.c (sem_compare_and_swap): Fix use of compare and
3825 swap function.
3826
3827 1999-07-09 Cristian Gafton <gafton@redhat.com>
3828
3829 * Makefile (libpthread-routines): Add oldsemaphore routine.
3830 * Versions: Add sem_destroy, sem_getvalue, sem_init, sem_post,
3831 sem_trywait, and sem_wait to GLIBC_2.1.
3832 * oldsemaphore.c: New file.
3833 * semaphore.c: Add default_symbol_versions for the changed functions.
3834 (__new_sem_init): Rename from sem_init.
3835 (__new_sem_post): Rename from sem_post.
3836 (__new_sem_wait): Rename from sem_wait.
3837 (__new_sem_trywait): Rename from sem_trywait.
3838 (__new_sem_getvalue): Rename from sem_getvalue.
3839 (__new_sem_destroy): Rename from sem_destroy.
3840
3841 1999-06-23 Robey Pointer <robey@netscape.com>
3842
3843 * internals.h: Added p_nextlock entry to separate queueing for a
3844 lock from queueing for a CV (sometimes a thread queues on a lock
3845 to serialize removing itself from a CV queue).
3846 * pthread.c: Added p_nextlock to initializers.
3847 * spinlock.c: Changed to use p_nextlock instead of p_nextwaiting.
3848
3849 1999-07-09 Ulrich Drepper <drepper@cygnus.com>
3850
3851 * manager.c (pthread_handle_create): Free mmap region after stack
3852 if clone failed. Patch by Kaz Kylheku <kaz@ashi.FootPrints.net>.
3853
3854 1999-05-23 Andreas Jaeger <aj@arthur.rhein-neckar.de>
3855
3856 * man/pthread_cond_init.man: Correct example.
3857 Reported by Tomas Berndtsson <tomas@nocrew.org>.
3858
3859 * linuxthreads.texi (Condition Variables): Likewise.
3860
3861 1999-05-18 Jakub Jelinek <jj@ultra.linux.cz>
3862
3863 * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): Use
3864 casx not cas, also successful casx returns the old value in rd
3865 and not the new value.
3866
3867 1999-05-16 Xavier Leroy <Xavier.Leroy@inria.fr>
3868
3869 * manager.c: If pthread_create() is given a NULL attribute
3870 and the thread manager runs with a realtime policy, set the
3871 scheduling policy of the newly created thread back to SCHED_OTHER.
3872 * manager.c: If the PTHREAD_INHERIT_SCHED attribute is given,
3873 initialize the schedpolicy field of new_thread->p_start_args
3874 to that of the calling thread.
3875
3876 1999-04-29 Ulrich Drepper <drepper@cygnus.com>
3877
3878 * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): cas
3879 instruction does not allow memory element to use offset.
3880
3881 1999-04-28 Ulrich Drepper <drepper@cygnus.com>
3882
3883 * manager.c (pthread_allocate_stack): Optimize initialization of new
3884 thread descriptor.
3885
3886 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_define_initialized):
3887 Don't use initializer since it is all zeroes.
3888 (__libc_once_define): Likewise.
3889
3890 1999-04-16 Andreas Jaeger <aj@arthur.rhein-neckar.de>
3891
3892 * sysdeps/arm/Implies: Removed since cmpxchg/no-cmpxchg
3893 doesn't exist anymore.
3894 * sysdeps/i386/Implies: Likewise.
3895 * sysdeps/m68k/Implies: Likewise.
3896 * sysdeps/mips/Implies: Likewise.
3897 * sysdeps/powerpc/Implies: Likewise.
3898 * sysdeps/sparc/sparc32/Implies: Likewise.
3899 * sysdeps/sparc/sparc64/Implies: Likewise.
3900
3901 1999-04-15 Ulrich Drepper <drepper@cygnus.com>
3902
3903 * sysdeps/alpha/bits/semaphore.h: Removed.
3904 * sysdeps/powerpc/bits/semaphore.h: Removed.
3905 * sysdeps/pthread/cmpxchg/bits/semaphore.h: Removed.
3906 * sysdeps/pthread/no-cmpxchg/bits/semaphore.h: Removed.
3907 * Makefile (headers): Remove bits/semaphore.h.
3908
3909 * semaphore.h: Define _pthread_descr if necessary.
3910 Don't include limits.h. Define SEM_VALUE_MAX directly.
3911 Define SEM_FAILED.
3912 (sem_t): Protect element names with leading __.
3913 Add declarations for sem_close, sem_open, and sem_unlink.
3914 * semaphore.c: Adjust all functions for new element names.
3915 Define sem_close, sem_open, and sem_unlink.
3916 * Versions (libthread): Add sem_close, sem_open, and sem_unlink for
3917 GLIBC_2.1.1.
3918 * sysdeps/pthread/bits/pthreadtypes.h: Define _pthread_descr only if
3919 necessary.
3920
3921 1999-03-16 H.J. Lu <hjl@gnu.org>
3922
3923 * specific.c (pthread_key_delete): Check th->p_terminated to see
3924 if the thread is running.
3925
3926 * Versions (__libc_internal_tsd_get, __libc_internal_tsd_set):
3927 Added to GLIBC_2.0 for libc.so.
3928
3929 1999-02-12 H.J. Lu <hjl@gnu.org>
3930
3931 * Versions (__libc_current_sigrtmin, __libc_current_sigrtmax,
3932 __libc_allocate_rtsig): Added to GLIBC_2.1.
3933
3934 * internals.h (DEFAULT_SIG_RESTART): Removed.
3935 (DEFAULT_SIG_CANCEL): Removed.
3936
3937 * pthread.c (init_rtsigs, __libc_current_sigrtmin,
3938 __libc_current_sigrtmax, __libc_allocate_rtsig): New functions.
3939 (__pthread_sig_restart, __pthread_sig_cancel,
3940 __pthread_sig_debug): Initialized.
3941 (pthread_initialize): Call init_rtsigs () to initialize
3942 real-time signals.
3943
3944 1999-02-03 H.J. Lu <hjl@gnu.org>
3945
3946 * manager.c (__pthread_manager): Do block __pthread_sig_debug.
3947 Don't restart the thread which sent REQ_DEBUG.
3948 (pthread_start_thread): Check if __pthread_sig_debug > 0
3949 before debugging.
3950
3951 * pthread.c (__pthread_initialize_manager): Suspend ourself
3952 after sending __pthread_sig_debug to gdb instead of
3953 __pthread_sig_cancel.
3954
3955 1999-01-24 H.J. Lu <hjl@gnu.org>
3956
3957 * manager.c (__pthread_manager): Delete __pthread_sig_debug
3958 from mask if __pthread_sig_debug > 0.
3959 (pthread_handle_create): Increment __pthread_handles_num.
3960
3961 * manager.c (pthread_handle_create): Don't pass CLONE_PTRACE to clone.
3962 * pthread.c (__pthread_initialize_manager): Likewise.
3963
3964 * pthread.c (pthread_initialize): Use __libc_allocate_rtsig (1)
3965 instead of __libc_allocate_rtsig (2).
3966 (__pthread_initialize_manager): Send __pthread_sig_debug to gdb
3967 instead of __pthread_sig_cancel.
3968 (pthread_handle_sigdebug): Fix comments.
3969
3970 1999-01-21 Ulrich Drepper <drepper@cygnus.com>
3971
3972 * manager.c (pthread_allocate_stack): Set
3973 __pthread_nonstandard_stacks if user-specified stack is used.
3974
3975 1999-01-16 Ulrich Drepper <drepper@cygnus.com>
3976
3977 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _LFS_ASYNCHRONOUS_IO,
3978 _LFS_LARGEFILE, _LFS64_LARGEFILE, and _LFS64_STDIO from Unix98.
3979
3980 1999-01-07 Xavier Leroy <Xavier.Leroy@inria.fr>
3981
3982 * pthread.c: Use a third signal __pthread_sig_debug distinct
3983 from __pthread_sig_cancel to notify gdb when a thread is
3984 created
3985 * manager.c: Likewise.
3986 * internals.h: Likewise.
3987 * signals.c: The implementation of sigwait(s) assumed that
3988 all signals in s have signal handlers already attached.
3989 This is not required by the standard, so make it work
3990 also if some of the signals have no handlers.
3991
3992 1999-01-05 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
3993
3994 * linuxthreads.texi: Remove pointers from first @node. Move old
3995 @node spec inside comment.
3996
3997 1998-12-31 Ulrich Drepper <drepper@cygnus.com>
3998
3999 * sysdeps/pthread/bits/stdio-lock.h: Define _IO_lock_lock and
4000 _IO_lock_unlock.
4001
4002 1998-12-29 Ulrich Drepper <drepper@cygnus.com>
4003
4004 * semaphore.c (sem_trywait): Don't forget to unlock the semaphore
4005 lock. Patch by Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>.
4006
4007 1998-12-21 Ulrich Drepper <drepper@cygnus.com>
4008
4009 * manager.c: Threads now send __pthread_sig_cancel on termination.
4010 Change clone call and signal masks.
4011 * thread.c (pthread_handle_sigrestart): Remove special code for
4012 manager.
4013 (pthread_handle_sigcancel): In manager thread call
4014 __pthread_manager_sighandler.
4015 * sysdeps/i386/pt-machine.h (__compare_and_swap): Add memory clobber.
4016 * sysdeps/i386/i686/pt-machine.h: Likewise.
4017 Patches by Xavier Leroy.
4018
4019 1998-12-14 Ulrich Drepper <drepper@cygnus.com>
4020
4021 * spinlock.c (__pthread_unlock): Don't crash if called for an
4022 untaken mutex. Reported by Ruslan V. Brushkoff <rus@Snif.Te.Net.UA>.
4023
4024 * Examples/ex6.c: Unbuffer stdout and reduce sleep time to reduce
4025 overall runtime.
4026
4027 1998-12-13 Ulrich Drepper <drepper@cygnus.com>
4028
4029 * Examples/ex3.c: Wait until all threads are started before
4030 searching for the number to avoid race condition on very fast
4031 systems.
4032
4033 1998-12-08 Andreas Jaeger <aj@arthur.rhein-neckar.de>
4034
4035 * sysdeps/pthread/pthread.h: Remove __pthread_setcanceltype
4036 declaration since it's not needed.
4037
4038 * sysdeps/pthread/pthread.h: Move internal functions to ...
4039 * internals.h: ...here.
4040
4041 1998-12-02 H.J. Lu <hjl@gnu.org>
4042
4043 * pthread.c (__pthread_sig_restart): Initiliaze to 0 if
4044 SIGRTMIN is defined.
4045 (__pthread_sig_cancel): Likewise.
4046
4047 1998-12-01 Andreas Jaeger <aj@arthur.rhein-neckar.de>
4048
4049 * wrapsyscall.c: Include <sys/mman.h> for msync,
4050 <stdlib.h> for system and <termios.h> for tcdrain prototype.
4051 Correct msync declaration.
4052
4053 1998-11-29 Roland McGrath <roland@baalperazim.frob.com>
4054
4055 * sysdeps/pthread/bits/libc-tsd.h (__libc_tsd_define, __libc_tsd_get,
4056 __libc_tsd_set): New macros for new interface.
4057 * no-tsd.c: New file, provide uninitialized defns of
4058 __libc_internal_tsd_get and __libc_internal_tsd_set.
4059 * Makefile (routines): Add no-tsd.
4060
4061 1998-10-12 Roland McGrath <roland@baalperazim.frob.com>
4062
4063 * internals.h: Include <bits/libc-tsd.h>, not <bits/libc-lock.h>.
4064 * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
4065 __libc_internal_tsd_set): Move decls to ...
4066 * sysdeps/pthread/bits/libc-tsd.h: New file for __libc_internal_tsd_*
4067 declarations.
4068
4069 * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
4070 __libc_internal_tsd_set): Make these pointers to functions, not
4071 functions; remove #pragma weak decls for them.
4072 * specific.c (__libc_internal_tsd_get, __libc_internal_tsd_set):
4073 Define static functions and initialized pointers to them.
4074
4075 1998-11-18 Ulrich Drepper <drepper@cygnus.com>
4076
4077 * Makefile (CFLAGS-mutex.c): Define as -D__NO_WEAK_PTHREAD_ALIASES.
4078 (CFLAGS-specific.c): Likewise.
4079 (CFLAGS-pthread.c): Likewise.
4080 (CFLAGS-ptfork.c): Likewise.
4081 (CFLAGS-cancel.c): Likewise.
4082 * sysdeps/pthread/bits/libc-lock.h: Don't mark __pthread_* functions
4083 as weak references if __NO_WEAK_PTHREAD_ALIASES is defined.
4084
4085 * mutex.c (pthread_mutex_init): Define as strong symbol.
4086 (pthread_mutex_destroy): Likewise.
4087 (pthread_mutex_trylock): Likewise.
4088 (pthread_mutex_lock): Likewise.
4089 (pthread_mutex_unlock): Likewise.
4090 (pthread_mutexattr_init): Likewise.
4091 (pthread_mutexattr_destroy): Likewise.
4092 (pthread_once): Likewise.
4093 * ptfork.c (pthread_atfork): Likewise.
4094 * specific.c (pthread_key_create): Likewise.
4095 (pthread_setspecific): Likewise.
4096 (pthread_getspecific): Likewise.
4097
4098 1998-11-15 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
4099
4100 * linuxthreads.texi: Fix punctuation after xref.
4101
4102 1998-11-10 H.J. Lu <hjl@gnu.org>
4103
4104 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine NR_OPEN
4105 if it is defined in <linux/limits.h>.
4106
4107 1998-10-29 14:28 Ulrich Drepper <drepper@cygnus.com>
4108
4109 * spinlock.h (__pthread_trylock): Define inline.
4110 (__pthread_lock): Add extra parameter to declaration. Declare
4111 using internal_function.
4112 (__pthread_unlock): Declare using internal_function.
4113 * spinlock.c (__pthread_lock): Add new parameter. Use it instead
4114 of local variable self. Avoid recomputing self. Define using
4115 internal_function.
4116 (__pthread_trylock): Remove.
4117 (__pthread_unlock): Define using internal_function.
4118 * cancel.c: Adjust for __pthread_lock interface change. Use already
4119 computed self value is possible.
4120 * condvar.c: Likewise.
4121 * join.c: Likewise.
4122 * manager.c: Likewise.
4123 * mutex.c: Likewise.
4124 * pthread.c: Likewise.
4125 * rwlock.c: Likewise.
4126 * semaphore.c: Likewise.
4127 * signals.c: Likewise.
4128
4129 1998-10-27 13:46 Ulrich Drepper <drepper@cygnus.com>
4130
4131 * sysdeps/pthread/pthread.h (struct _pthread_cleanup_buffer): Prepend
4132 __ to field names of the struct.
4133 * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_fastlock):
4134 Likewise.
4135 (pthread_attr_t): Likewise.
4136 (pthread_cond_t): Likewise.
4137 (pthread_condattr_t): Likewise.
4138 (pthread_mutex_t): Likewise.
4139 (pthread_mutexattr_t): Likewise.
4140 (pthread_rwlock_t): Likewise.
4141 (pthread_rwlockattr_t): Likewise.
4142 * attr.c: Adjust for pthread.h and pthreadtypes.h change.
4143 * cancel.c: Likewise.
4144 * condvar.c: Likewise.
4145 * manager.c: Likewise.
4146 * mutex.c: Likewise.
4147 * pthread.c: Likewise.
4148 * ptlongjmp.c: Likewise.
4149 * rwlock.c: Likewise.
4150 * spinlock.c: Likewise.
4151
4152 1998-10-09 Ulrich Drepper <drepper@cygnus.com>
4153
4154 * sysdeps/i386/pt-machine.h (get_eflags, set_eflags): Mark these
4155 also with PT_EI.
4156
4157 * sysdeps/i386/i686/pt-machine.h: Remove unused inline
4158 definitions.
4159
4160 * Makefile (libpthread-routines): Add pt-machine.
4161 * pt-machine.c: New file.
4162 * sysdeps/alpha/pt-machine.h: Define PT_EI as extern inline is not
4163 yet defined. Use PT_EI in extern inline definitions.
4164 * sysdeps/arm/pt-machine.h: Likewise.
4165 * sysdeps/i386/pt-machine.h: Likewise.
4166 * sysdeps/i386/i686/pt-machine.h: Likewise.
4167 * sysdeps/m68k/pt-machine.h: Likewise.
4168 * sysdeps/mips/pt-machine.h: Likewise.
4169 * sysdeps/powerpc/pt-machine.h: Likewise.
4170 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
4171 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
4172
4173 1998-10-02 Andreas Jaeger <aj@arthur.rhein-neckar.de>
4174
4175 * semaphore.h: Include <sys/types.h> so that _pthread_descr
4176 is declared.
4177
4178 1998-09-15 David S. Miller <davem@pierdol.cobaltmicro.com>
4179
4180 * sysdeps/sparc/sparc32/pt-machine.h (INIT_THREAD_SELF): Add nr
4181 argument.
4182 * sysdeps/sparc/sparc64/pt-machine.h (INIT_THREAD_SELF): Likewise.
4183
4184 1998-09-12 14:24 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu>
4185
4186 * sysdeps/unix/sysv/linux/bits/sigthread.h: Add multiple inclusion
4187 guard.
4188
4189 1998-09-02 11:08 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
4190
4191 * signals.c (sigaction): Check that sig is less than NSIG to avoid
4192 array index overflow.
4193
4194 1998-09-06 10:56 Ulrich Drepper <drepper@cygnus.com>
4195
4196 * sysdeps/pthread/semaphore.h: New file.
4197
4198 1998-09-06 09:08 Ulrich Drepper <drepper@cygnus.com>
4199
4200 * sysdeps/pthread/bits/libc-lock.h (enum __libc_tsd_key_t): Add
4201 _LIBC_TSD_KEY_DL_ERROR.
4202
4203 1998-08-31 Ulrich Drepper <drepper@cygnus.com>
4204
4205 * sysdeps/i386/i686/pt-machine.h (testandset): Add memory clobber.
4206 * sysdeps/i386/pt-machine.h: Likewise.
4207 Suggested by Roland McGrath.
4208
4209 1998-08-28 13:58 Ulrich Drepper <drepper@cygnus.com>
4210
4211 * internals.h: Also define THREAD_GETMEM_NC and THREAD_SETMEM_NC to
4212 access thread data with non-constant offsets.
4213 * specific.c: Use THREAD_GETMEM_NC and THREAD_SETMEM_NC where
4214 necessary.
4215
4216 * sysdeps/i386/useldt.h: Fix typo. Add THREAD_GETMEM_NC and
4217 THREAD_SETMEM_NC definitions.
4218
4219 * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM_NC and
4220 THREAD_SETMEM_NC.
4221 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
4222
4223 1998-08-26 15:46 Ulrich Drepper <drepper@cygnus.com>
4224
4225 * internals.h: Define THREAD_GETMEM and THREAD_SETMEM to default if
4226 not already defined.
4227 (struct _pthread_descr_struct): Add p_self and p_nr field.
4228 * manager.c (__pthread_handles): Define second element to point
4229 to manager thread.
4230 (__pthread_handles_num): Initialize to 2.
4231 (__pthread_manager): Use INIT_THREAD_SELF with two arguments.
4232 (pthread_start_thread): Likewise.
4233 (pthread_handle_create): Start search for free slot at entry 2.
4234 Initialize new fields p_self and p_nr.
4235 Call __clone with CLONE_PTRACE if available.
4236 (pthread_free): Call FREE_THREAD_SELF if available.
4237 * pthread.c (__pthread_initial_thread): Initialize new fields.
4238 (__pthread_manager_thread): Likewise.
4239 (__pthread_initialize_manager): Call __clone with CLONE_PTRACE.
4240
4241 * cancel.c: Use THREAD_GETMEM and THREAD_SETMEM to access the
4242 elements of the thread descriptor.
4243 * condvar.c: Likewise.
4244 * errno.c: Likewise.
4245 * join.c: Likewise.
4246 * manager.c: Likewise.
4247 * pthread.c: Likewise.
4248 * ptlongjmp.c: Likewise.
4249 * semaphore.c: Likewise.
4250 * signals.c: Likewise.
4251 * specific.c: Likewise.
4252 * spinlock.c: Likewise.
4253
4254 * sysdeps/alpha/pt-machine.h (INIT_THREAD_SELF): Add extra parameter.
4255
4256 * sysdeps/i386/useldt.h: New file.
4257 * sysdeps/i386/i686/pt-machine.h: Show how to use this file.
4258
4259 * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM and
4260 THREAD_SETMEM using __thread_self.
4261 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
4262
4263 1998-08-24 Geoff Keating <geoffk@ozemail.com.au>
4264
4265 * spinlock.c (__pthread_lock): Reset p_nextwaiting to NULL if it
4266 turned out that we didn't need to queue after all.
4267
4268 1998-08-22 Geoff Keating <geoffk@ozemail.com.au>
4269
4270 * sysdeps/powerpc/pt-machine.h: Remove testandset, it's not used
4271 and wastes space; correct types.
4272
4273 1998-08-08 11:18 H.J. Lu <hjl@gnu.org>
4274
4275 * signals.c (sigaction): Handle NULL argument.
4276
4277 1998-08-04 Ulrich Drepper <drepper@cygnus.com>
4278
4279 * sysdeps/unix/sysv/linux/bits/sigthread.h: Use __sigset_t instead
4280 of sigset_t.
4281
4282 1998-08-02 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
4283
4284 * Makefile (linuxthreads-version): Extract correct number from
4285 Banner.
4286
4287 1998-07-29 Xavier Leroy <Xavier.Leroy@inria.fr>
4288
4289 * Banner: Bump version number to 0.8
4290 * FAQ.html: Many updates, in particular w.r.t. debugging.
4291 * manager.c: Support for non-default stacksize for
4292 LinuxThreads-allocated stacks;
4293 don't use guard pages for stacks with default size, rely on
4294 rlimit(RLIMIT_STACK) instead (it's cheaper).
4295 * attr.c: Likewise.
4296 * cancel.c: Use __pthread_sig_cancel and __pthread_sig_restart
4297 everywhere instead of PTHREAD_SIG_CANCEL and PTHREAD_SIG_RESTART.
4298 * condvar.c: Likewise.
4299 * internals.h: Likewise.
4300 * restart.h: Likewise.
4301 * signals.c: Likewise.
4302 * pthread.c: Likewise; set rlimit(RLIMIT_STACK) as we need it.
4303
4304 1998-07-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
4305
4306 * weaks.c: Define pthread_mutexattr_[sg]ettype instead of
4307 __pthread_mutexattr_[sg]ettype. Add more weak aliases.
4308 * Versions: Put __pthread_mutexattr_settype under version
4309 GLIBC_2.0. Don't export __pthread_mutexattr_setkind_np and
4310 __pthread_mutexattr_gettype.
4311
4312 1998-07-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
4313
4314 * sysdeps/pthread/bits/libc-lock.h: Make
4315 __pthread_mutexattr_settype weak. Don't make
4316 __pthread_mutexattr_setkind_np weak.
4317
4318 1998-07-16 10:52 Ulrich Drepper <drepper@cygnus.com>
4319
4320 * manager.c (pthread_handle_create): Check whether sched_setscheduler
4321 call can succeed here.
4322
4323 * mutex.c: Define __pthread_mutexattr_settype and make
4324 __pthread_mutexattr_setkind_np an alias.
4325 Likewise for __pthread_mutexattr_gettype.
4326
4327 1998-07-15 11:00 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu>
4328
4329 * attr.c (pthread_attr_setschedpolicy): Don't check whether caller
4330 is root.
4331
4332 1998-07-14 19:38 Ulrich Drepper <drepper@cygnus.com>
4333
4334 * sysdeps/pthread/bits/libc-lock.h: Define __libc_cleanup_end.
4335
4336 1998-07-11 Andreas Jaeger <aj@arthur.rhein-neckar.de>
4337
4338 * Examples/ex6.c: Include <unistd.h> for usleep.
4339
4340 1998-06-13 11:04 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
4341
4342 * Examples/ex4.c (main): Use exit, not pthread_exit.
4343
4344 1998-07-09 13:39 Ulrich Drepper <drepper@cygnus.com>
4345
4346 * Versions: Add __pthread_mutexattr_gettype and
4347 __pthread_mutexattr_settype.
4348 * lockfile.c: Use __pthread_mutexattr_settype instead of
4349 __pthread_mutexattr_setkind_np.
4350 * mutex.c: Define __pthread_mutexattr_gettype and
4351 __pthread_mutexattr_settype.
4352 * weak.c: Likewise.
4353 * sysdeps/pthread/pthread.h: Declare __pthread_mutexattr_gettype and
4354 __pthread_mutexattr_settype.
4355 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_init_recursive):
4356 Use __pthread_mutexattr_settype.
4357
4358 1998-07-08 22:26 Ulrich Drepper <drepper@cygnus.com>
4359
4360 * Versions: Add pthread_mutexattr_gettype, pthread_mutexattr_settype.
4361 * mutex.c: Define weak alias pthread_mutexattr_gettype and
4362 pthread_mutexattr_settype.
4363 * sysdeps/pthread/pthread.h: Declare these functions.
4364 Move pthread_sigmask and pthread_kill declaration in separate header.
4365 * sysdeps/unix/sysv/linux/bits/sigthread.h: New file.
4366
4367 1998-07-07 15:20 Ulrich Drepper <drepper@cygnus.com>
4368
4369 * Makefile: Add rules to compile and run tests.
4370 * Examples/ex1.c: Little changes to fix warnings.
4371 * Examples/ex2.c: Likewise.
4372 * Examples/ex3.c: Likewise.
4373 * Examples/ex4.c: Likewise.
4374 * Examples/ex5.c: Likewise.
4375 * Examples/ex6.c: New file.
4376
4377 1998-07-05 11:54 Ulrich Drepper <drepper@cygnus.com>
4378
4379 * Versions: Add pthread_attr_init to GLIBC_2.1 version in libc.
4380
4381 1998-07-01 Andreas Jaeger <aj@arthur.rhein-neckar.de>
4382
4383 * attr.c: Include <string.h>.
4384
4385 1998-06-30 11:47 Ulrich Drepper <drepper@cygnus.com>
4386
4387 * attr.c: Include errno.h. Use memcpy to copy sched_param.
4388 * internals.h: Include limits.h.
4389 * manager.c: Use memcpy to copy sched_param.
4390 * ptfork.c: Include errno.h.
4391 * pthread.c: Likewise.
4392 * semaphore.c: Likewise.
4393 * specific.c: Likewise.
4394 * spinlock.h: Likewise.
4395 * sysdeps/pthread/pthread.h: Include only allowed headers. Move
4396 type definition to ...
4397 * sysdeps/pthread/bits/pthreadtypes.h: ...here. New file.
4398
4399 1998-06-29 12:34 Ulrich Drepper <drepper@cygnus.com>
4400
4401 * sysdeps/pthread/pthread.h: Use __PMT not __P for function pointers.
4402
4403 * sysdeps/pthread/pthread.h: Define various PTHREAD_* symbols also
4404 as macros as demanded in POSIX.1, Annex C.
4405
4406 1998-06-29 12:29 Ulrich Drepper <drepper@cygnus.com>
4407
4408 * internals.h (struct pthread_request): For free use pthread_t
4409 instead of pthread_descr.
4410 * join.c (pthread_join): Pass thread_id, not th to manager.
4411 (pthread_detach): Likewise.
4412 * manager.c (__pthread_manager): Except thread ID in FREE_REQ case.
4413 (pthread_exited): Remove detached queue code.
4414 (pthread_handle_free): Expect thread ID parameter and use it to
4415 validate the thread decsriptor. Don't use detached queue.
4416 Patches by Xavier Leroy.
4417
4418 1998-06-27 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
4419
4420 * libpthread.map: Export accept, longjmp, sigaction, siglongjmp,
4421 _IO_flockfile, _IO_ftrylockfile, _IO_funlockfile,
4422 __pthread_atfork, __pthread_key_create, __pthread_once.
4423 * internals.h: Doc fix.
4424 * pthread.c (__pthread_initialize): Define again.
4425
4426 1998-06-26 Ulrich Drepper <drepper@cygnus.com>
4427
4428 * manager.c (pthread_exited): If thread is not detached put it on
4429 special list.
4430 (pthread_handle_free): If thread is not on list with living threads
4431 search on list with detached threads.
4432
4433 * sysdeps/pthread/pthread.h (PTHREAD_RWLOCK_INITIALIZER): Correct
4434 for new definition of pthread_rwlock_t.
4435
4436 * spinlock.c: Correct test whether to compile
4437 __pthread_compare_and_swap or not.
4438
4439 1998-06-25 19:27 Ulrich Drepper <drepper@cygnus.com>
4440
4441 * attr.c: Finish user stack support. Change locking code to be safe
4442 in situations with different priorities.
4443 * cancel.c: Likewise.
4444 * condvar.c: Likewise.
4445 * internals.h: Likewise.
4446 * join.c: Likewise.
4447 * manager.c: Likewise.
4448 * mutex.c: Likewise.
4449 * pthread.c: Likewise.
4450 * ptlongjmp.c: Likewise.
4451 * queue.h: Likewise.
4452 * rwlock.c: Likewise.
4453 * semaphore.c: Likewise.
4454 * semaphore.h: Likewise.
4455 * signals.c: Likewise.
4456 * spinlock.c: Likewise.
4457 * spinlock.h: Likewise.
4458 * sysdeps/pthread/pthread.h: Likewise.
4459 Patches by Xavier Leroy.
4460
4461 * sysdeps/i386/i686/pt-machine.h: New file.
4462
4463 1998-06-25 Ulrich Drepper <drepper@cygnus.com>
4464
4465 * sysdeps/pthread/pthread.h: Make [sg]et_stacksize and
4466 [sg]et_stackaddr prototypes always available.
4467
4468 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
4469 _POSIX_THREAD_ATTR_STACKSIZE and _POSIX_THREAD_ATTR_STACKADDR.
4470
4471 1998-06-24 Ulrich Drepper <drepper@cygnus.com>
4472
4473 * manager.c (pthread_free): Undo patch from 980430.
4474 Reported by David Wragg <dpw@doc.ic.ac.uk>.
4475
4476 1998-06-09 15:07 Ulrich Drepper <drepper@cygnus.com>
4477
4478 * manager.c: Define __pthread_manager_adjust_prio and use it to
4479 increase priority when needed.
4480 * internals.h: Add prototype for __pthread_manager_adjust_prio.
4481 * mutex.c: Optimize mutexes to wake up only one thread.
4482 * pthread.c: Move PID of manager for global variable in structure
4483 element.
4484 Patches by Xavier Leroy.
4485
4486 1998-06-07 13:47 Ulrich Drepper <drepper@cygnus.com>
4487
4488 * sysdeps/pthread/bits/libc-lock.h: Optimize cleanup handlers a bit.
4489
4490 1998-06-03 Andreas Jaeger <aj@arthur.rhein-neckar.de>
4491
4492 * attr.c: Correct typo.
4493
4494 1998-05-01 Ulrich Drepper <drepper@cygnus.com>
4495
4496 * manager.c (pthread_free): Unmap guard before the stack.
4497 Patch by Matthias Urlichs.
4498
4499 1998-04-30 Ulrich Drepper <drepper@cygnus.com>
4500
4501 * manager.c (pthread_free): Detect already free child.
4502 Patch by Xavier Leroy, reported by Matthias Urlichs.
4503
4504 1998-04-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
4505
4506 * Makefile (linuxthreads-version): Renamed back from
4507 libpthread-version.
4508
4509 1998-04-21 Ulrich Drepper <drepper@cygnus.com>
4510
4511 * ptlongjmp.c: Add prototypes for __libc_siglongjmp and
4512 __libc_longjmp.
4513
4514 1998-04-20 14:55 Ulrich Drepper <drepper@cygnus.com>
4515
4516 * Makefile (libpthread-routines): Add ptlongjmp and spinlock.
4517 * internals.h: Add definitions for new spinlock implementation.
4518 * ptlongjmp.c: New file.
4519 * spinlock.c: New file.
4520 * spinlock.h (acquire): Don't reschedule using __sched_yield, use
4521 new function __pthread_acquire to prevent deadlocks with thread
4522 with different priorities.
4523 Patches by Xavier Leroy <Xavier.Leroy@inria.fr>.
4524
4525 1998-03-16 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
4526
4527 * manager.c (__pthread_manager): Reduce first argument to select
4528 to include just the needed file descriptor.
4529
4530 1998-03-17 00:06 Ulrich Drepper <drepper@cygnus.com>
4531
4532 * manager.c: Fix last patch which caused core dumps.
4533
4534 * pthread.c: Correctly handle missing SIGRTMIN.
4535
4536 1998-03-15 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
4537
4538 * libpthread.map: Add __libc_internal_tsd_get and
4539 __libc_internal_tsd_set. Add missing cancelable functions. Export
4540 libc internal versions of the cancelable functions.
4541
4542 1998-03-13 16:51 Ulrich Drepper <drepper@cygnus.com>
4543
4544 * weaks.c: Define pthread_attr_init as GLIBC_2.0 and GLIBC_2.1.
4545
4546 1998-03-13 00:46 Ulrich Drepper <drepper@cygnus.com>
4547
4548 * attr.c: Implement pthread_attr_[gs]etguardsize,
4549 pthread_attr_[gs]setstackaddr, pthread_attr_[gs]etstacksize.
4550 Change pthread_attr_init to have two interfaces.
4551 * internals.h (struct _pthread_descr_struct): Add new fields for
4552 above functions.
4553 * libpthread.map: Add names in GLIBC_2.1 section.
4554 * manager.c (pthread_handle_create): Implement guardsize and
4555 user stack.
4556 (pthread_free): Likewise.
4557 * pthread.c (pthread_create): Add new interface for changed
4558 pthread_attr_t.
4559 * sysdeps/pthread/pthread.h: Add prototypes for new functions.
4560 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add definition of
4561 PTHREAD_STACK_MIN.
4562
4563 1998-03-11 00:42 Wolfram Gloger <wmglo@dent.med.uni-muenchen.de>
4564
4565 * manager.c: Enable resetting of the thread scheduling policy
4566 to SCHED_OTHER when the parent thread has a different one.
4567
4568 1998-02-01 13:51 Ulrich Drepper <drepper@cygnus.com>
4569
4570 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
4571 _POSIX_ASYNCHRONOUS_IO.
4572
4573 * sysdeps/pthread/pthread.h: Define bits for Unix98 variants of
4574 mutexes.
4575 * mutex.c: Implement new mutex types.
4576
4577 * internals.h: Include <signal.h>.
4578
4579 * libpthread.map: Add __erno_location and __h_errno_location.
4580
4581 * errno.c: Return pointer to variable actually in use. This might
4582 not be the one in the thread structure.
4583 * internals.h (struct _pthread_descr_struct): Add new fields p_errnop
4584 and p_h_errnop.
4585 * manager.c (__pthread_manager): Set p_errnop and p_h_errnop member
4586 of manager thread structure.
4587 (pthread_handle_create): Set p_errnop and p_h_errnop members for new
4588 thread.
4589 * pthread.c: Adapt initializer for thread structures.
4590 (__pthread_initial_thread): Set p_errnop and p_h_errnop member.
4591 (__pthread_reset_main_thread): Reset p_errnop and p_h_errnop of
4592 current thread to global variables.
4593
4594 1998-01-31 17:27 Ulrich Drepper <drepper@cygnus.com>
4595
4596 * rwlock.c: New file.
4597 * Makefile (libpthread-routines): Add rwlock.
4598 * sysdeps/pthread/pthread.h: Define data structures and declare
4599 functions.
4600 * libpthread.map: Add new functions.
4601
4602 1997-12-18 13:50 Philip Blundell <pb@nexus.co.uk>
4603
4604 * sysdeps/arm/pt-machine.h: New file; add ARM support.
4605 * sysdeps/arm/Implies: likewise.
4606 * README: Document it.
4607
4608 1997-12-13 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
4609
4610 * signals.c: Remove unneeded initializer for sigwaited, saving a
4611 warning.
4612
4613 1997-04-11 01:18 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
4614
4615 * semaphore.c (sem_init): Set sem_spinlock only if available.
4616
4617 1997-12-04 01:48 Ulrich Drepper <drepper@cygnus.com>
4618
4619 * mutex.c: Implement PTHREAD_MUTEX_CHECKERROR.
4620 * sysdeps/pthread/pthread.h: Define PTHREAD_MUTEX_CHECKERROR.
4621
4622 * Makefile: Update from LinuxThreads 0.7.
4623 * internals.h. Likewise.
4624 * manager.c: Likewise.
4625 * mutex.c: Likewise.
4626 * pthread.c: Likewise.
4627 * signals.c: Likewise.
4628 * specific.c: Likewise.
4629 * Examples/ex3.c: Likewise.
4630
4631 1997-11-20 18:13 Ulrich Drepper <drepper@cygnus.com>
4632
4633 * pthread.c (__pthread_reset_main_thread): Close pipe only if still
4634 open.
4635
4636 1997-10-29 05:38 Ulrich Drepper <drepper@cygnus.com>
4637
4638 * wrapsyscall.c: Add socket functions which are also cancelation
4639 points.
4640
4641 1997-10-19 21:40 Wolfram Gloger <wg@wolfram.dent.med.uni-muenchen.de>
4642
4643 * specific.c (__libc_internal_tsd_set, __libc_internal_tsd_get):
4644 New functions for fast thread specific data within libc.
4645
4646 * internals.h: Add new array p_libc_specific to struct
4647 _pthread_descr_struct.
4648
4649 * sysdeps/pthread/bits/libc-lock.h: Declare new functions.
4650
4651 1997-10-13 05:39 Ulrich Drepper <drepper@cygnus.com>
4652
4653 * semaphore.h: Add __BEGIN_DECLS/__END_DECLS.
4654 Reported by Ralf Corsepius <corsepiu@faw.uni-ulm.de>.
4655
4656 1997-08-29 03:05 Ulrich Drepper <drepper@cygnus.com>
4657
4658 * internals.h (struct _pthread_descr_struct): Add definitions for
4659 two-level specific key handling.
4660 * manager.c (pthread_handle_create): Initialize specific memory array.
4661 * specific.c: Implement two-level key handling.
4662 * weaks.c: Don't provide dummy key handling.
4663 * sysdeps/pthread/bits/libc-lock.h: Typedef __libc_lock_t (no #define).
4664 Add definition of __libc_key_t.
4665 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define PTHREAD_KEYS_MAX
4666 as 1024.
4667 Add definition of _POSIX_THREAD_DESTRUCTOR_ITERATIONS and
4668 PTHREAD_DESTRUCTOR_ITERATIONS.
4669
4670 * manager.c (pthread_handle_create): Compare mmap result with
4671 MAP_FAILED.
4672
4673 * ptfork.c: Rename to __pthread_atfork and make old name a weak alias.
4674 * sysdeps/pthread/bits/pthread.h: Add prototype for __pthread_atfork.
4675
4676 1997-08-22 19:04 Richard Henderson <rth@cygnus.com>
4677
4678 sysdeps/sparc -> sysdeps/sparc/sparc32
4679 sysdeps/sparc64 -> sysdeps/sparc/sparc64
4680
4681 * internals.h: Change definition of THREAD_SELF to be an expression,
4682 not a statement that did a return.
4683 * sysdeps/alpha/pt-machine.h (THREAD_SELF): Update accordingly.
4684 * sysdeps/sparc/sparc32/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF):
4685 Follow Solaris and use a "system reserved" register (%g6) to hold
4686 the thread descriptor.
4687 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
4688
4689 1997-08-03 00:09 Ulrich Drepper <drepper@cygnus.com>
4690
4691 * mutex.c: Correct pthread_once. Patch by Xavier Leroy.
4692 * sysdeps/pthread/pthread.h: Add prototype for __pthread_once.
4693 * sysdeps/pthread/bits/pthread.h: Add macros for __libc_once.
4694
4695 * semaphore.c: Include spinlock.h only when needed.
4696
4697 * specific.c (__pthread_setsepcific, __pthread_getspecific): Reject
4698 keys for entries not in use.
4699
4700 * weaks.c: Implement key handling functions for real.
4701
4702 1997-06-29 01:04 Richard Henderson <richard@gnu.ai.mit.edu>
4703
4704 Initial sparc64-linux support:
4705 * sysdeps/sparc64/Implies: New file.
4706 * sysdeps/sparc64/pt-machine.h: Likewise.
4707
4708 1997-06-29 00:48 Ulrich Drepper <drepper@cygnus.com>
4709
4710 * semaphore.c: Include spinlock.h at correct place.
4711 Patch by HJ Lu.
4712
4713 1997-06-13 10:06 Richard Henderson <rth@tamu.edu>
4714
4715 The Great Bit File Move:
4716 * sysdeps/alpha/semaphorebits.h: -> .../bits/semaphore.h.
4717 * sysdeps/powerpc/semaphorebits.h: Likewise.
4718 * sysdeps/pthread/cmpxchg/semaphorebits.h: Likewise.
4719 * sysdeps/pthread/no-cmpxchg/semaphorebits.h: Likewise.
4720 * sysdeps/pthread/libc-lock.h: -> bits/
4721 * sysdeps/pthread/stdio-lock.h: Likewise.
4722 * sysdeps/unix/sysv/linux/local_lim.h: Likewise.
4723 * sysdeps/unix/sysv/linux/posix_opt.h: Likewise.
4724 * semaphore.h: Likewise.
4725 * sysdeps/pthread/pthread.h: Likewise.
4726
4727 * lockfile.c: <foo.h> -> <bits/foo.h>.
4728 * semaphore.h: Likewise.
4729
4730 * Makefile: (headers): foo.h -> bits/foo.h.
4731 * sysdeps/pthread/Makefile: Likewise.
4732
4733 1997-04-11 01:18 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
4734
4735 * semaphore.c (sem_init): Set sem_spinlock only if available.
4736
4737 * sysdeps/m68k/pt-machine.h (testandset, __compare_and_swap): Fix
4738 asm constraints.
4739
4740 1997-04-09 03:00 Ulrich Drepper <drepper@cygnus.com>
4741
4742 Update from LinuxThreads 0.6.
4743
4744 * attr.c (pthread_attr_getdetachstate): Use __sched_get_priority_max
4745 and __sched_get_priority_min instead of names without `__'.
4746
4747 * manager.c: Rewrite large parts to implement opaque pthread_t.
4748
4749 * cancel.c: Adapt for opaque pthread_t type.
4750 * condvar.c: Likewise.
4751 * errno.c: Likewise.
4752 * join.c: Likewise.
4753 * mutex.c: Likewise.
4754 * pthread.c: Likewise.
4755 * signals.c: Likewise.
4756 * specific.c: Likewise.
4757 * restart.h: Likewise.
4758 * queue.h: Likewise.
4759 * Examples/ex3.c: Likewise.
4760 * Examples/ex4.c: Likewise.
4761 * sysdeps/pthread/pthread.h: Likewise.
4762
4763 * pthread.c: Accumulate time for all threads in thread manager.
4764
4765 * semaphore.c: Implement fallback implementation for architectures
4766 sometimes missing compare-exchange operations.
4767
4768 * cancel.c (pthread_cancel): Validate handle argument.
4769 * join.c (pthread_join): Likewise.
4770 (pthread_detach): Likewise.
4771 * signals.c (pthread_kill): Likewise.
4772
4773 * spinlock.h (acquire): Use __sched_yield not sched_yield.
4774
4775 * queue.h (enqueue): Enqueue thread according to priority.
4776
4777 * internals.c (struct pthread_start_args): New struct for passing
4778 args to cloning function.
4779 (struct _pthread): Rename to _pthread_descr_struct and adapt for
4780 opaque pthread_t.
4781
4782 * Examples/Makefile (clean): Pass -f option to rm.
4783
4784 * sysdeps/i386/pt-machine.h: Add check for compare-exchange instruction
4785 and define TEST_FOR_COMPARE_AND_SWAP.
4786 * sysdeps/i386/i486/pt-machine.h: Removed.
4787
4788 * sysdeps/unix/sysv/linux/local_lim.h (PTHREAD_THREADS_MAX): Increase
4789 to 1024.
4790
4791 1997-04-04 16:38 Ulrich Drepper <drepper@cygnus.com>
4792
4793 * restart.h (suspend): Clear p_signal before suspending.
4794 (suspend_with_cancellation): Likewise.
4795 Patch by Xavier Leroy <Xavier.Leroy@inria.fr>.
4796
4797 * weaks.c: Make __pthread_key_create return 1.
4798 * sysdeps/pthread/libc-lock.h: Define __libc_key_create,
4799 __libc_getspecific, __libc_setspecific, and __libc_key_t.
4800 * sysdeps/pthread/stdio-lock.h: Don't care for implementation not
4801 using libio.
4802
4803 1997-03-19 15:13 Miguel de Icaza <miguel@nuclecu.unam.mx>
4804
4805 * sysdeps/sparc/pt-machine (RELEASE): Fix.
4806
4807 1997-03-01 07:55 Geoff Keating <geoffk@ozemail.com.au>
4808
4809 * sysdeps/powerpc/Implies: Added.
4810 * sysdeps/powerpc/pt-machine.h: Added.
4811 * sysdeps/powerpc/semaphorebits.h: Added.
4812
4813 1997-01-22 01:22 Ulrich Drepper <drepper@cygnus.com>
4814
4815 * pthread.c (__pthread_initial_thread): Correct
4816 initializer.
4817 (__pthread_manager_thread): Likewise.
4818 Reported by Andreas Jaeger.
4819
4820 1997-01-18 22:15 Richard Henderson <rth@tamu.edu>
4821
4822 Since sigset_t no longer fits in a register, we can't pass in the
4823 thread's initial mask so easily. Take this opportunity to simplify
4824 the clone implementation by only accepting a single void* argument.
4825
4826 * manager.c (__pthread_manager): Put thread vitals in the thread
4827 struct instead of as arguments through clone.
4828 (pthread_start_thread): Look for them there.
4829 * internals.h (struct _pthread): Add p_initial_fn,
4830 p_initial_fn_arg, p_initial_mask. Fix __pthread_manager proto.
4831 * pthread.c (pthread_initialize_manager): Revise clone invocation.