Commit Graph

369 Commits

Author SHA1 Message Date
wiz 7dd0ed6e01 We do not want empty lines in mdoc. 2003-07-01 10:23:52 +00:00
wiz 5231f1f288 Remove trailing whitespace. 2003-06-26 10:01:18 +00:00
nathanw 9639eeaf54 Adapt to pt_trapuc: change STACK_SWITCH to check for a value in pt_trapuc
and use it preferentially to a value in pt_uc, clearing it once on the new
stack. Move stores into pt_uc back to before the stack switch; storing
after the stack switch opened a one-instruction race condition where an upcall
that had just started a chain could be preempted again, and would bomb when
restarted due to its pt_uc not yet having been updated. Now that pt_trapuc
is what the upcall code writes to, it is safe to store to pt_uc before
switching stacks.

Remove obsolete pt_sleepuc code.
2003-06-26 01:45:31 +00:00
nathanw 487eb7e193 Initialize pt_trapuc in pthread__initthread(). 2003-06-26 01:30:39 +00:00
nathanw 1414a095ac Remove PT_SLEEPUC and add PT_TRAPUC. 2003-06-26 01:29:28 +00:00
nathanw 81a27fd0b2 Adapt to pt_trapuc: Store context obtained from upcalls there, clear it
in switchto targets and vitims, and print it in debug messages (including
indication of whether a context is trap or user context).

Remove obsolete pt_sleepuc handling.
2003-06-26 01:28:14 +00:00
nathanw 1af6125572 Clear pt_trapuc when idling threads. 2003-06-26 01:26:39 +00:00
nathanw 2534cd2bea Introduce a new pointer, pt_trapuc, that stores thread context captured
by the kernel. Separating this from pt_uc makes it possible to avoid a race
condition in pt_uc management near the STACK_SWITCH part of pthread__switch()
and pthread__locked_switch().

Remove pt_sleepuc pointer, which was made obsolete by the previous round of
UC juggling but still present in the assembler files.
2003-06-26 01:26:11 +00:00
nathanw 3ca7487c30 More printf format size tweaks. 2003-06-25 23:26:00 +00:00
nathanw 4a9ac109f0 Complain clearly if SA syscalls aren't avaliable. 2003-06-25 23:23:27 +00:00
nathanw 39f9ecfa06 Oops, reordering the PT_STATE/PT_SWITCHTOUC/PT_SWITCHTO assembly
killed a live value too soon. Fix by using a different register for
the PT_STATE immediate.
2003-06-24 18:54:56 +00:00
nathanw 96458e8892 Update the switch_return point name in the static case. 2003-06-23 22:50:23 +00:00
uwe b92f152573 First bits of SH3 support. Only _context_u.S is implemented (passess
cu[1-6] tests), the pthread_switch.S is stubbed out for now.

Code posted by Christian Groessler (cpg at aladdin dot de) to port-sh3.
2003-06-23 19:34:43 +00:00
martin f546abe798 Catch up with Nathan's changes to other archs. 2003-06-17 23:18:48 +00:00
nathanw 876d7e7eec Dodge a potential race condition in pthread__debuglog_printf(). It's
still possible for multiple threads to write into the same space, but
they shouldn't be able to corrupt the write pointer in the process.

Also, check for pointer-lapping a bit more carefully in the wrap
vs. non-wrap case.
2003-06-16 21:24:48 +00:00
martin aba86b525b Catch up with changes Nathan did to other archs. 2003-06-15 17:11:36 +00:00
scw 7d221cb560 Apply Nathan's switch-away fix and previous save-PT_UC from new stack fix. 2003-06-13 08:07:03 +00:00
scw 04f197eae9 Apply Nathan's switch-away fix and previous save-PT_UC from new stack fix.
Compile-tested only.
2003-06-13 07:45:17 +00:00
nathanw 4bd45b7b3b Oops, that's switch_return_point, not locked_return_point. The perils
of cut-and-paste.
2003-06-12 23:19:27 +00:00
nathanw aa6f5de228 STACKSPACE of 16 is too small, given the use of CALLFRAME_SIZ;
increase to match.
2003-06-12 23:01:17 +00:00
nathanw eb6ba6fbef Apply switch-away fix and previous save-PT_UC from new stack fix. 2003-06-12 23:00:28 +00:00
fvdl 1a31b8db4d Apply Nathan's switch-away fix. 2003-06-12 22:03:18 +00:00
nathanw b43f1c7405 In pthread__resolve_locks(), change the conditions for removing a normal
thread from the continuation chain: Not only must it have released all
spinlocks, but it must have signaled completion by finishing pthread__switch
or by having stored into pt_switchto.

Together with the previous pthread_switch.S changes, this fixes a couple of
crasehes caused by race conditions in the examination and use of pt_next,
and by switching to empty pt_switchtouc's.
2003-06-12 21:49:42 +00:00
nathanw f866ba061d Two fixes:
* In switch-away cases, write PT_SWITCHTO last (after PT_SWITCHTOUC), so
   that pthread__resolve_locks() doesn't see an empty SWITCHTOUC value. This
   also permits pthread__resolve_locks() to use the presence of PT_SWITCHTO
   as a sign that the thread has done all of its necessary chain work.

 * Make the return-point of pthread__switch global and visible, so that its
   address can be compared to the PC of a thread, again as a sign that its
   chain-work is done.

(other architectures in progress, after they get the *previous* asm fix...)
2003-06-12 21:46:03 +00:00
nathanw edc79413b1 Don't need to set the MSR field here; _INITCONTEXT_U_MD() takes care
of that where necessary.
2003-06-12 19:09:45 +00:00
thorpej e714d726a6 $NetBSD$, not $Header$. 2003-06-08 06:44:28 +00:00
nathanw 877f89857f Tiny bit of infrastructure for ABI-supported thread-ID storage. 2003-06-06 21:06:07 +00:00
nathanw 1809ee5c2c Fix typo in comment. 2003-06-06 19:35:03 +00:00
nathanw 33314cffa1 Make infrastructure for man pages. 2003-06-03 21:34:00 +00:00
nathanw 5581819638 Man pages for libpthread, adapted from FreeBSD by Stephen Degler. 2003-06-03 21:33:06 +00:00
nathanw 380bb3a8b0 Man pages for libpthread, written by Stephen Degler. 2003-06-03 21:31:36 +00:00
christos dc1665b80b Add pthread_attr_getstack{,size,addr} needed by jdk 2003-06-02 16:59:26 +00:00
christos 143f5a277a pass lint:
1. add new pthread__abort() and change pthread_assert(0) to it.
2. put constcond in the right place (in the macro).
3. no space after pthread__assert macro.
2003-05-27 15:24:24 +00:00
christos 4e29fa8276 add missing notreached lint comment. 2003-05-27 15:22:56 +00:00
nathanw 5faa7f5bef * Recycle upcall stacks as soon as possible rather than waiting to
accumulate half of the total number. There are too many ways for
  the SA subsystem to deadlock waiting for stacks that userland has no
  reason to recycle.

* Consolidate switchto handling in pthread_resolve_locks().

* Add code to re-chain the preempting parents of switchtos.

* Tweak debuglog output in a couple of cases.
2003-05-26 19:41:03 +00:00
scw 5bd6b99940 Both pthread__lock_ras_start and pthread__lock_ras_end need to be
explicitly declared global in the asm() statements for the benefit of
SH5 binutils. Otherwise, the assembler/linker (I haven't figured out
which) botches the SHmedia bit when generating GOT references for
these symbols in the shared version of the library.

Ok'd by Nathan.
2003-05-16 23:37:47 +00:00
scw 644aebe258 Duh. s/PIC_PROLOGUE/PIC_EPILOGUE/ 2003-05-16 22:40:56 +00:00
nathanw baa073280b Separately report unlocking an unlocked mutex and unlocking a mutex
owned by another thread.
2003-05-16 21:28:26 +00:00
wiz 76907a433e Fix typo in comment. 2003-05-15 19:16:37 +00:00
nathanw a06836c083 Remove an unnecessary test in pthread_getspecific(). 2003-05-15 19:13:24 +00:00
petrov cf5b7785eb Add missing include and copyright. 2003-05-07 01:21:13 +00:00
nathanw ff14fbf244 Move call to pthread__alarm_init() from pthread_init() (called at load
time) to pthread__start() (called on the first call of
pthread_create()), so that there's no opportunity for a fork() to
clear the per-process timer.

Problem pointed out by a test program from Mihai CHELARU on
current-users.
2003-04-28 17:46:30 +00:00
nathanw 3f6de8d84a Use pthread__error() instead of pthread__abort(). 2003-04-23 19:36:12 +00:00
nathanw df2772713e Introduce a pthread__error() macro, for detected application errors as
opposed to internal errors. The setting of the PTHREAD_ERRORMODE
environment variable determines the runtime behavior. Valid settings
are "ignore", "abort", and "print". The default is currently "abort".
2003-04-23 19:35:47 +00:00
nathanw b7ac97b866 More agressive assertions. Change a number of detected conditions, which
officially have undefined behavior, from returning an error code to raising
an assertion failure.
Also, don't bother to explicitly test for (illegal) null pointers and return
an error; they'll bomb out soon enough.
2003-04-18 21:36:38 +00:00
nathanw 66fc73c7eb Use a __predict_true() in the definition of pthread__assert(). 2003-04-18 21:32:32 +00:00
fvdl b32287cc19 Catch up with changed struct reg (same as gregs in mcontext now). 2003-04-17 10:13:51 +00:00
nathanw a74799949a pthread_mutex_trylock(): It's not an error to call trylock() on a
mutex already locked by the calling thread, even for non-recursive
mutexes.
2003-04-16 18:59:12 +00:00
nathanw 008033bb65 When a thread sleeps on a mutex or cv, have it put itself on the
front of the sleep queue rather than the back. This is more
cache-friendly behavior and within the (lack of) constraints on wakeup
ordering imposed on equal-priority threads.
2003-04-16 18:30:43 +00:00
nathanw 8114703654 Fix a fencepost error in writing to the debug buffer. 2003-04-16 17:37:47 +00:00
nathanw 2a4cef11ba When threads are started, register an atfork callback to clear
pthread__started in the child process. This lets sleep() work in the
child, as required by POSIX.
2003-04-07 21:29:48 +00:00
nathanw 45c9543071 Consistently use pthread__assert() rather than err() to assert that
timer_settime() worked, and don't bother calling err() after a
pthread__assert() call.
2003-04-07 19:41:22 +00:00
bjh21 55cecd0f26 NetBSD/acorn26 has used APCS-32 for years, so unifdef -U__APCS_26__. 2003-04-05 23:15:10 +00:00
nathanw 4777259ff2 Don't call pthread__locked_switch() to switch to ourself. Bad stack
mangling results.

Fixes regression in test yield2, dating to 2003/1/2 when
pthread__locked_switch() was changed to not store the saved-context
pointer until after switching stacks.

Note to self: regression tests exist to be run.
2003-04-04 01:08:25 +00:00
scw 52569eab7f Add PIC support. 2003-03-26 22:33:56 +00:00
nathanw a0628261fe Use pthread__assert() instead of plain assert(), as the latter has
locking issues.
2003-03-20 01:03:52 +00:00
nathanw a25b9285d9 Add a wrapper for the execve() system call that arranges for the current
thread sigal mask to be propagated into the new process image.
2003-03-14 22:27:34 +00:00
thorpej 04d0b802f7 Include <sys/types> before <sys/lock.h>, shuffle <ucontext.h>. 2003-03-13 19:51:33 +00:00
nathanw 64324a8175 Remove debugging code accidentally committed. 2003-03-11 16:27:38 +00:00
nathanw 16612d0814 * Use a <= comparison rather than a < comparison when searching for
alarms to process.

* Remove a redundant assignment.

* Make a debug message more consistent with the others.
2003-03-11 00:18:36 +00:00
nathanw 37c11910ec Re-enable nanosleep(); kernel bug is squished (kern_time.c:1.67). 2003-03-10 22:16:36 +00:00
lukem f043c0fb57 add __RCSID() 2003-03-08 08:03:34 +00:00
scw 65e4a59445 Don't use FP instructions when building for m68010. Fixes broken sun2 build.
G/C some unused code.
2003-03-01 11:51:59 +00:00
nathanw a4314c450c Disable userlevel nanosleep() until I find the timer/alarm bug that it
is tickling.
2003-02-28 18:37:44 +00:00
lha c2d825cbda If pthreads hasn't started yet when calling sigsuspend, use the systemcall 2003-02-28 17:30:07 +00:00
nathanw 508a50ac15 In pthread_create(), rearrange name-setting code so that name is set
to NULL when the attribute structure does not have a private field
allocated.
2003-02-26 23:41:01 +00:00
thorpej b33971b9c3 Add support for naming a thread, using an API compatible with Tru64 Unix:
* pthread_attr_getname_np()
* pthread_attr_setname_np()
* pthread_getname_np()
* pthread_setname_np()

In addition to being query'able by the application (for log messages, etc.),
it is intended that these names can show up in the debugger.

Reviewed by nathanw.
2003-02-26 22:02:48 +00:00
nathanw 66fcc1ce38 In pthread_exit(), clear pt_canceled in addition to setting
PT_FLAG_CS_DISABLED in pt_flags.

Prevents cancellation cleanup handlers from thinking that they've been
canceled and exiting mid-handler. Problem spotted by Matt Thomas.
2003-02-22 00:53:29 +00:00
nathanw 6aab0806c8 Implement nanosleep() at userlevel. Threaded applications seem to like
to sleep a lot, and there's no need for each such thread to consume kernel
resources.

(accidentally checked the pthread.c part of this in yesterday; no reason
 not to finish the job)
2003-02-15 22:15:50 +00:00
jdolecek e6781abf3f interposition sigtimedwait() with a thread-aware version, which uses
single proxy thread to do the actual syscall, and blocks other threads
in userland
2003-02-15 21:18:59 +00:00
nathanw ca0eaa6f66 Remove unused #include <assert.h> 2003-02-15 04:39:16 +00:00
nathanw 6adb81d685 Move debug toggle to pthread_debug.h. 2003-02-15 04:38:58 +00:00
nathanw de9d8cde2a Remove debug toggle and add debug counter for signals and broadcasts
that actually wake another thread up.
2003-02-15 04:38:33 +00:00
nathanw 53827081be Adapt to pthread__assert() and remove local debug toggle. 2003-02-15 04:37:04 +00:00
nathanw 8bcff70bb0 Define a pthread-specific assert function, pthread__assert(), that
bails out without trying to flush stdio buffers.
2003-02-15 04:34:40 +00:00
nathanw e0ae1bd1b7 Move module-specific debugging definitions here. 2003-02-15 04:33:45 +00:00
nathanw 515d60d00c Remove unnecessary inclusion of <assert.h>. 2003-02-15 00:52:18 +00:00
nathanw 4fb740b8de Implement pthread_atfork() (in libc, because the required threadlib
stub behavior is exactly the same as the usual behavior).
2003-02-13 02:50:48 +00:00
fvdl 59f9830997 Continue at the plain switch return point in pthread__switch, not the
locked one, in the !PIC case. From Tor Egge via Havard Eidnes.
2003-02-10 11:09:33 +00:00
jdolecek ef9eed1dac pthread_kill() was implemented, remove from list
pthread_cond_timedwait() now works even before SA initialization, but some
other routines do not; update the paragraph for this
2003-02-06 09:55:47 +00:00
jdolecek 9cac4b3f36 minor whitespace changes 2003-02-04 20:14:10 +00:00
nathanw 947e41dfa9 Arrange to pause for a while if pthread_cond_wait() or
pthread_cond_timedwait() is called before any threads have been
created and the SA infrastructure is up and running.

Addresses PR lib/20139.

XXX probably need to do this for all of the pthread_*_timedlock()
functions, too.
2003-02-01 00:57:31 +00:00
tron 8cf036775b Add a missing bracket to make this compile. 2003-01-31 12:27:19 +00:00
pk 453f6b99a3 Include <sys/types.h>
Remove v9 register defs.
2003-01-31 12:06:27 +00:00
nathanw 96b5a26db2 Use pthread__sched_sleepers() instead of iterating over sleep queues
ourself.
2003-01-31 04:59:40 +00:00
nathanw 029982e17b Add a new internal function, pthread__sched_sleepers(), which iterates
over a sleep queue and puts everything on the run queue. This permits
the iteration to be inside the acquisition of the run queue spinlock,
avoiding repetitive acquire/release cycles.
2003-01-31 04:58:57 +00:00
nathanw 69367db47f Do a similar tuneup on pthread_cond_signal() and
pthread_cond_broadcast(): use double-checked locking to avoid
pthread__self() and pthread_spinlock() when signaling or broadcasting
on a condition variable with no waiters.
2003-01-31 04:26:50 +00:00
nathanw 6cca91fc86 Mutex tuneup.
* Use a double-checked locking technique to avoid taking
   the interlock in pthread_mutex_unlock().

 * In pthread_mutex_lock() and pthread_mutex_trylock(), only store the
   stack pointer, not the thread ID, in ptm_owner. Do the translation
   to a thread ID in the slow-lock, errorcheck, and recursive mutex
   cases rather than in the common path.

 * Juggle where pthread__self() is called, to move it out of the fast path.

Overall, this means that neither pthread_self() nor
pthread_spin[un]lock() are used in the course of locking and unlocking
an uncontested mutex. Speeds up the fast path by 40-50%, and
eliminates about 98% of spinlocks used by a couple of large threaded
applications.

(Still a GET_MUTEX_PRIVATE() in the fast path... perhaps the type
should be in the main body of the mutex).
2003-01-31 02:55:00 +00:00
fvdl 1627b9c342 libpthread support for x86_64. 2003-01-30 02:10:31 +00:00
nathanw f66d2f37f7 More rototilling:
* Implement pthread_kill().

  * Return the old thread mask, not the old process mask, in our
    interpositioned sigaction call.

  * Refer to _NSIG, not NSIG.

  * Gut pthread_sigmask(). It was handling a lot of corner cases that
    weren't legal anyway. Handle unblocked signals with a new
    pthread__kill_self() routine (also used by pthread_kill()).

  * Be more consistent with locking around pt_sigacts[].
2003-01-30 01:12:42 +00:00
nathanw a8773f45f8 Simplify pthread__upcall() a bit by moving lock resolution before the big
switch statement, and moving upcall-type-specific code into that switch.
Beneficial side effect: don't manipulate a statelock before lock resolution
occurs.
2003-01-30 01:04:50 +00:00
nathanw 7d8ac1f6c2 Set a thread's state to RUNNABLE when yielding. 2003-01-30 01:00:58 +00:00
drochner e81f9f1784 cosmetics 2003-01-29 14:03:08 +00:00
jdolecek 5e8bddc2e7 __sigaction14(): sanity check 'sig' before use, same way as sigaction1()
in kernel
2003-01-28 21:04:37 +00:00
nathanw 6505a5330c Add debug counters for mutex and condvar operations. 2003-01-27 21:01:00 +00:00
nathanw 05a755440a Add cancellation stubs for accept() and connect(). 2003-01-27 20:57:41 +00:00
nathanw ee45767b84 printf format fixes. 2003-01-27 20:54:26 +00:00
nathanw 9ff1e2d385 Make pthread_barrier_wait() handle spurious wakeups from pthread__block()
by adding a generation number to the barrier structure and incrementing it
when the barrier fires.

XXX this is an ABI change for anything using barriers, but the library is
new enough and nothing in the tree uses barriers so I'm going to let it
slide. Using the private data pointer for a field that will always be present
would be excessive.
2003-01-25 00:47:05 +00:00
nathanw fe8e8dad4a More signal rearranging:
- Signal handlers now simply continue executing the current thread,
   rather than trying to put themselves back on the queue that they came
   from, which was rather fragile. As a result, all callers of
   pthread__block() must be prepared to handle spurious wakeups.

 - When a signal arrives for a thread that is blocked in the kernel,
   note this in another field in pthread_st and set a flag. Process the
   signal and set up the trampoline for the handler *after* the thread
   unblocks, so that both the trampoline and the returned state from
   the kernel are preserved.

 - Factor out some code into a pthread__deliver_signal() routine;
   the signal-taking code in pthread_sigmask() should be able to use this
   soon.

This is still gross, and there are still some terrible MP issues lurking here,
but progress crawls along.
2003-01-25 00:43:38 +00:00
nathanw 564fe117cc Make pthread_join() accomodate spurious wakeups from pthread__block(). 2003-01-25 00:37:01 +00:00
jdolecek 254ff213ae unlock pt_statelock _after_ changing pt_state, not before
problem found and fix suggested by Nick Hudson
2003-01-24 17:43:45 +00:00
thorpej c04d6591c0 Correct omission in notice. 2003-01-24 01:54:02 +00:00
thorpej c184191ce3 p1003.1b semaphore manual pages have been moved to librt. 2003-01-24 01:53:27 +00:00
thorpej 1b4d724c8e sem_init(): oops, only destroy the ksem on error if it is a ksem. 2003-01-22 23:18:06 +00:00
thorpej c151b13c1f Rewrite to use our internal scheduling primitives. 2003-01-22 22:51:42 +00:00
scw b5ca8aee09 Yay! Working pthreads for sh5. 2003-01-22 13:52:48 +00:00
scw 04c6e0b141 pthread__lock_ras_start and pthread__lock_ras_end need to be declared
as function pointers, not character arrays, for the benefit of
platforms (e.g. SH5) where the two types are quite distinct.
2003-01-22 13:52:03 +00:00
scw 5f7bdeae84 Need to include <string.h> for memcmp() prototype. 2003-01-22 13:49:14 +00:00
nathanw dc651e62df Don't bother acquiring the tsd_lock and reading the destructor function
if the corresponding TSD entry is empty.

Cuts down lock/unlock pairs for this operation from 256 to the number
of active TSD entries; sicne this is done when every thread exits, it saves
many total lock/unlock pairs.
2003-01-21 23:29:22 +00:00
wiz ab206b65a6 New sentence, new line. 2003-01-21 11:48:03 +00:00
wiz 2caa76989f Replace -1 with \-1. 2003-01-21 11:47:32 +00:00
scw ff288f9424 Make these compile. 2003-01-21 11:31:38 +00:00
scw 980dea552e Add _UC_USER_BIT. 2003-01-21 11:30:52 +00:00
jdolecek 69371cb504 .Rv needs a function name as parameter 2003-01-21 03:33:30 +00:00
christos 3bcbc56f02 add manual pages. 2003-01-21 02:24:41 +00:00
scw 9566978c66 First cut of MD pthread glue for sh5. 2003-01-21 00:34:56 +00:00
christos 4e5f58dd38 more sem to _sem_st 2003-01-20 20:52:24 +00:00
christos 90135cf7e8 add support for p1003.1b semaphores. From FreeBSD 2003-01-20 20:10:19 +00:00
scw b896a7171e _{get,set,swap}context_u() for SH5. 2003-01-20 17:03:58 +00:00
matt 3afb199f73 Define FPREG macros even though we don't have any. 2003-01-20 01:49:36 +00:00
matt d36a12c9ca Add myself to the authors list. 2003-01-20 01:08:03 +00:00
matt fb891b41f5 Add _REG_foo to ppc mcontext and use them instead of constants. 2003-01-20 00:53:55 +00:00
matt aa6dda7b98 Need to define STACKSIZE (even though we don't need any). 2003-01-19 23:22:29 +00:00
matt 9eecca32ca Add of pthread support for VAX. 2003-01-19 23:20:14 +00:00
thorpej 7dc01dbfab Add some threadlib stubs that are used by X:
* thr_create() (stub in libc aborts)
* thr_exit() (stub in libc calls exit())
* thr_yield() (stub in libc does nothing)

Also make the libc thr_self() stub not abort.

XXX Should we add thrattr_*() stubs for setting the detach-state?
2003-01-19 21:58:21 +00:00
thorpej 096005bf70 Fix typo. 2003-01-19 21:42:09 +00:00
matt 561334ea93 Set _UC_USER in ucontext. Call setcontext if _UC_USER is not in
_setcontext_u
2003-01-19 21:31:42 +00:00
matt 696d424be5 VAX versions of _getcontext_u/_setcontext_u/_swapcontext_u 2003-01-19 21:01:55 +00:00
thorpej 9b29af3e07 Remove the dummy stack attr routines -- best to catch broken applications
and fix them to use the proper feature test instead (as has already been
done with the openldap package).
2003-01-19 20:58:00 +00:00
thorpej 592409d356 Add mutexattr_init(), mutexattr_destroy(), and mutexattr_settype() (recursive
mutexes are used by the X libraries).
2003-01-19 20:46:11 +00:00
thorpej 439830cb08 Always allow includes to be installed. This makes it easier for
people to get straggling ports bootstrapped (pthread.h is required
in order to build libc).
2003-01-19 19:55:13 +00:00
skrll 023fed95bf Move _POSIX_THREADS to the right place and define a few other symbolic
constants for the features we gained with the merge of the nathanw_sa
branch.

Ok'd by thorpej.

Closes my PR 19930.
2003-01-19 19:41:44 +00:00
wiz d44e858cbb Remove another variable name. 2003-01-19 19:21:49 +00:00
christos 1b36c15f8d - constify the get functions
- remove argument variable names since they pollute the namespace
- add mock implementation of the missing stack functions
XXX: we need to do this right [i.e. actually get and set sizes and addresses]
but the current stack setup makes this a bit complicated.
2003-01-19 16:03:50 +00:00
jdolecek 0b3f936d86 'destructor' is a bit too generic; use 'destruct' instead for
pthread_key_create() prototype
this fixes compilation of Python 2.2 with thread support
XXX perhaps should drop all variable names from prototypes?
2003-01-19 11:17:02 +00:00
christos 54ba9fedfe delint 2003-01-18 19:11:07 +00:00
christos 9631ace572 de-lint 2003-01-18 18:40:52 +00:00
christos 3823415af9 add missing backslash 2003-01-18 18:40:08 +00:00
thorpej c62a74e6d5 Merge the nathanw_sa branch. 2003-01-18 10:32:11 +00:00
scottr 35d33206a7 This incarnation of the pthreads library is ancient and not useful, and
should have been mothballed some time ago...
1997-10-08 17:17:10 +00:00
scottr a1d96607f3 This incarnation of the pthreads library is ancient and not useful, and
should have been mothballed some time ago...
1997-10-08 17:14:35 +00:00
christos d94d1f6795 Wow, call the function, don't just mention its name! 1997-10-08 04:14:40 +00:00
christos c36405f069 Don't cast things to u_quad_t, but to u_long. 1997-10-08 04:14:00 +00:00
christos 060951ae78 Cast functions to the proper signatures and avoid const clash. 1997-10-08 04:13:27 +00:00
christos 93bfa94d10 How did this ever work? Fix to pass fileno(fp), instead of fp to lseek.
Pass off_t instead of fpos_t as the second argument.
1997-10-08 04:12:34 +00:00
christos 8212c7a241 Avoid volatile warnings. 1997-10-08 04:11:16 +00:00
christos 5d7f9cdc6b Fix prototypes for flockfile and funlockfile to take a const FILE,
since they don't modify it.
1997-10-08 04:10:50 +00:00
christos ec75ec1f8c Make function declarations conform to the prototypes. 1997-10-08 00:52:47 +00:00
christos e57ffbac55 Fix declaration of sys_errlist, add prototypes for flockfile and funlockfile 1997-10-08 00:35:50 +00:00
christos eaa7838299 Add real prototypes 1997-10-08 00:33:40 +00:00
thorpej 7f9ea0f2ed Use ${INSTALL}. 1996-10-18 05:45:01 +00:00
cgd ae9172d6cd specify man pages the new way. 1994-12-22 09:57:51 +00:00
proven b1fc22f93a Add one complete thread safe stdio. 1994-02-07 22:05:21 +00:00
proven 1c3caff3ff RCS ids added.
pthread_once() moved to separate file.
pthread_detach(), and pthread_join() routines added,
and sleep now sleeps only the running thread not the process.
1994-02-07 22:04:13 +00:00
proven 0ddc616639 RCS ids added.
pthread_once() defines moved to separate header file.
1994-02-07 22:02:26 +00:00
proven 21f4b3b04c More wrapper functions, and some hacks for machine independent sleep
mechanisms.
1994-02-07 22:00:44 +00:00
proven 772f07b4a8 The latest pthread library. 1994-02-07 21:59:27 +00:00
mycroft c48a79fee8 Stylistic change. 1994-01-27 06:50:06 +00:00
mycroft abeb62670e Delete special rules for syscall.S; they are not needed, and one of them
is wrong anyway.
1994-01-07 16:36:45 +00:00
proven 881ae40055 Copyrights added to each file. 1993-12-20 19:31:06 +00:00
mycroft add5cd71dc Clean up deleted files. 1993-12-20 19:30:59 +00:00
proven abe1bf3801 Copyrights added to each file. 1993-12-20 19:30:07 +00:00
proven bafb721fb3 Fix for older shells that can't handle then; 1993-11-22 19:37:48 +00:00
proven c88ef05a9a Added NOPIC flag. 1993-11-16 03:21:44 +00:00
cgd 93e4e1b5ae correct my bad advice 1993-11-15 11:11:00 +00:00
proven b410643359 Fixed mysteriouly disappearing SCCS ID. 1993-11-15 10:06:09 +00:00
proven e123d2840c OK one more try at getting it right ... 1993-11-15 10:02:18 +00:00
proven 2000519508 Makefile needed a preall to make a few links before compiling sources.
CVS doesn't check in symlinks.
1993-11-15 06:49:08 +00:00
proven 89fc7bac08 Initial release of the POSIX 1003.4a Draft 7 thread implementation. 1993-11-14 22:06:22 +00:00