| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
|
|
|
|
| |
Pointed out by: Amancio
|
|
|
|
| |
on a child process.
|
|
|
|
|
| |
and modify that if the writev() syscall does not completely write
all bytes in a single call.
|
|
|
|
|
| |
instead of explicitly ignoring some errors. This allows for the case
where a device is naturally non-blocking.
|
|
|
|
|
|
|
| |
written without returning to the caller. This only occurs on pipes
where either the number of bytes written is greater than the pipe
buffer or if there is insufficient space in the pipe buffer because the
reader is reading slower than the writer is writing.
|
| |
|
|
|
|
| |
Submitted by: Tor Egge <Tor.Egge@idi.ntnu.no>
|
|
|
|
| |
PR: bin/6467 Marino Ladavac <lada@pc8811.gud.siemens.at>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
for the process, not a separate set for each thread). By default, the
process now only has signal handlers installed for SIGVTALRM, SIGINFO
and SIGCHLD. The thread kernel signal handler is installed for other
signals on demand. This means that SIG_IGN and SIG_DFL processing is now
left to the kernel, not the thread kernel.
Change the signal dispatch to no longer use a signal thread, and
call the signal handler using the stack of the thread that has the
signal pending.
Change the atomic lock method to use test-and-set asm code with
a yield if blocked. This introduces separate locks for each type
of object instead of blocking signals to prevent a context
switch. It was this blocking of signals that caused the performance
degradation the people have noted.
This is a *big* change!
|
| |
|
| |
|
|
|
|
| |
PS_SIGWAIT state.
|
|
|
|
| |
to EINTR.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
it was. Add a FILE_WAIT state and queue threads waiting for a FILE
lock. Start using the sys/queue.h macros instead of the way that MIT
pthreads did it.
Add a thread name to the private thread structure and a non-POSIX
function to set this. This helps (me at least) when sending a SIGINFO
to a threaded process to get a /tmp/uthread.dump to see what the
<expletive deleted> threads are doing this time. It is nice to be
able to recognise (yes, I spell that with an 's' too) which threads
are which.
|
| |
|
|
|
|
| |
POSIX specified names can be declared in pthread.h.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
threads from invalid ones. The pthread structure is opaque to the user
so this change does not cause any incompatibilities.
Hopefully this change will help code that was written for draft 4
fail gracefully if the programmer ignores the compiler warning about
the change in the level of indirection for the argument passed to
pthread_detach(). I got burnt, so I fixed then (expletive deleted)
thing.
These functions comply with the revised standard. That should shut
Terry up!
|
|
|
|
|
|
|
| |
signals to be unblocked even if they were already blocked when entering
the function.
Pointed out by: bde
|
|
|
|
|
| |
other threads never see the light of day and if they leave things
locked, blame POSIX.
|
|
|
|
| |
Change a bunch of __alpha references to __alpha__.
|
|
|
|
|
| |
from draft 4. Move some of the schedule definitions to sched.h which
is a POSIX header.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
specifically:
uthread_accept.c: Fix for inherited socket not getting correct entry in
pthread flags.
uthread_create.c: Fix to allow pthread_t pointer return to be null if
caller doesn't care about return.
uthread_fd.c: Fix for return codes to be placed into correct errno.
uthread_init.c: Changes to make gcc-2.8 thread aware for exception stack
frames (WARNING: This is #ifdef'ed out by default and is
different from the Cygnus egcs fix).
uthread_ioctl.c: Fix for blocking/non-blocking ioctl.
uthread_kern.c: Signal handling fixes (only one case left to fix,
that of an externally sent SIGSEGV and friends -
a fairly unusual case).
uthread_write.c: Fix for lock of fd - ask for write lock, not read/write.
uthread_writev.c: Fix for lock of fd - ask for write lock, not read/write.
Pthreads now works well enough to run the LDAP and ACAPD(with the gcc 2.8 fix)
sample implementations.
|
|
|
|
| |
Same fix already applied to other types of fds. This one was apparently missed.
|
|
|
|
|
|
|
|
|
| |
provided is of type pthread_t instead of pthread_t *.
PR: 4320
Return EINVAL instead of ESRCH if attempting to detach an already
detached thread.
|
|
|
|
|
|
| |
functions would return -1 and set errno to indicate the specific error.
POSIX requires that the functions return the error code as the return
value of the function instead.
|
|
|
|
| |
Submitted by: Daniel M. Eischen <deischen@iworks.InterWorks.org>
|
|
|
|
|
|
| |
occurs (was EAGAIN, is now ETIMEDOUT).
Submitted by: Daniel M. Eischen <deischen@iworks.InterWorks.org>
|
|
|
|
|
|
|
|
|
|
| |
The addition of the nanosleep syscall was correctly added to
libc/sys/Makefile so that it is renamed as _thread_sys_nanosleep().
This syscall is one of those that libc_r has to re-implement because
the only behaviour is to block the process. So libc_r just ignores the
fact that a nanosleep syscall exists and goes its own way - as it has
done all along .... and now it does again. And now a simple program
can sleep again. Phew.
|
|
|
|
|
| |
PR: 3494
Submitted by: Steve Bauer <sbauer@rock.sdsmt.edu>
|
| |
|
| |
|
|
|
|
|
| |
Don't merge this into -2.2 unless you understand the dependencies on
c++rt0, bsd.lib.mk, and gcc -shared. I.e., let me do it.
|
|
|
|
| |
Added Id strings too. It's useful to know who last made a change.
|
|
|
|
|
|
|
| |
calling thread from being rescheduled based on an unspecified wakeup
time.
Bug/fix pointed out by Alexandre Fenyo <fenyo@email.enst.fr>.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
which don't provide a non-blocking interface.
This is a short term "fix" which changes a half-lose to a half-win.
The thread that accesses a device that does not provide a non-blocking
interface will block for its time slice.
A medium term solution would be to use rfork. A long-term solution
would be some sort of kernel thread/SMP implementation.
|
| |
|
| |
|
|
|
|
| |
uthreads update from the author.
|
|
|
|
|
|
|
|
| |
This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.
Boy, I'm glad we're not using sup anymore. This update would have been
insane otherwise.
|
|
|
|
| |
Submitted by: John Birrell <jb@cimlogic.com.au>
|
| |
|
|
|
|
| |
uthread_mattr_kind_np.c, uthread_multi_np.c, and uthread_single_np.c.
|
|
|
|
| |
Add pthread_mutexattr_default definition.
|
|
|
|
| |
specification: return parameter passing changed.
|
|
|
|
|
|
| |
structure now has the correct member names.
Pointed out by: Peter Wemm
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Here are the diffs for libc_r to get it one step closer to P1003.1c
These make most of the thread/mutex/condvar structures opaque to the
user. There are three functions which have been renamed with _np
suffixes because they are extensions to P1003.1c (I did them for JAVA,
which needs to suspend/resume threads and also start threads suspended).
I've created a new header (pthread_np.h) for the non-POSIX stuff.
The egrep tags stuff in /usr/src/lib/libc_r/Makefile that I uncommented
doesn't work. I think its best to delete it. I don't think libc_r needs
tags anyway, 'cause most of the source is in libc which does have tags.
also:
Here's the first batch of man pages for the thread functions.
The diff to /usr/src/lib/libc_r/Makefile removes some stuff that was
inherited from /usr/src/lib/libc/Makefile that should only be done with
libc.
also:
I should have sent this diff with the pthread(3) man page.
It allows people to type
make -DWANT_LIBC_R world
to get libc_r built with the rest of the world. I put this in the
pthread(3) man page. The default is still not to build libc_r.
also:
The diff attached adds a pthread(3) man page to /usr/src/share/man/man3.
The idea is that without libc_r installed, this man page will give people
enough info to know that they have to build libc_r.
|