| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
| |
bug in the code, but as soon as I try to fix it, it seems to trigger
some other bugs. Instead of trying to figure out what's going on
while everyone suffers, it's better to back out and figure out
the bugs outside the tree.
|
|
|
|
|
|
|
|
| |
Instead, keep the proc pointer in it and put the selinfo on a list
in struct proc in selrecord. Then clean up the list when leaving
sys_select and sys_poll.
miod@ ok, testing by many, including Bobs spamd boxes.
|
|
|
|
|
|
|
|
|
|
|
|
| |
it's a good idea to use atomic.h operations on it. This mechanic
change updates all bit operations on p_flag to atomic_{set,clear}bits_int.
Only exception is that P_OWEUPC is set by MI code before calling
need_proftick and it's automatically cleared by ADDUPC. There's
no reason for MD handling of that flag since everyone handles it the
same way.
kettenis@ ok
|
| |
|
| |
|
|
|
|
|
| |
bitmask and makes poll() behave like documented in the man page.
OK deraadt@
|
| |
|
|
|
|
|
|
|
| |
size of an fd_set (ie. 256 bits), to avoid the malloc. that is a lot
of local storage. change the cross-over point to 32-bits, which is more
fair. if you select with large widths, you pay the price. tested by
dlg, read by millert and pascoe, run on all machines
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
encapsulating all such access into wall-defined functions
that makes sure locking is done as needed.
It also cleans up some uses of wall time vs. uptime some
places, but there is sure to be more of these needed as
well, particularily in MD code. Also, many current calls
to microtime() should probably be changed to getmicrotime(),
or to the {,get}microuptime() versions.
ok art@ deraadt@ aaron@ matthieu@ beck@ sturm@ millert@ others
"Oh, that is not your problem!" from miod@
|
| |
|
| |
|
|
|
|
|
|
|
| |
now call the poll backend. With this change we implement greater
poll(2) functionality instead of emulating it via the select backend.
Adapted from NetBSD and including some changes from FreeBSD.
Tested by many, deraadt@ OK
|
|
|
|
|
| |
from Patrick Latifi <patrick.l@hermes.usherb.ca>
ok jason@ tedu@
|
|
|
|
| |
takes a void *. convert uiomove to take a void * as well. ok deraadt@
|
| |
|
|
|
|
| |
rescinded 22 July 1999. Proofed by myself and Theo.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Instead of using a homegrown set of variables in this case, rely on uvmexp
fields once uvm has been initialized.
This requires a few #include <uvm/uvm_extern.h> here and there in the kernel
as well.
Idea from art@, changes by me.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
the same semantics as NetBSD anyway, so it's good to avoid name collissions.
- Always fdremove before freeing the file, not the other way around.
- falloc FREFs the file.
- have FILE_SET_MATURE FRELE the file (It feels like a good ortogonality to
falloc FREFing the file).
- Use closef as much as possible instead of ffree in error paths of
falloc:ing functions. closef is much more careful with the fd and can
deal with the fd being forcibly closed by dup2. Also try to avoid
manually calling *fo_close when closef can do that for us (this makes
some error paths mroe complicated (sys_socketpair and sys_pipe), but
others become simpler (sys_open)).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
from fd tables and other long-lived objects). This is to avoid races between
using a file descriptor and having another process (with shared fd table)
close it. We use a separate refence count so that error values from close(2)
will be correctly returned to the caller of close(2).
The macros for those reference counts are FILE_USE(fp) and FILE_UNUSE(fp).
Make sure that the cases where closef can be called "incorrectly" (most notably
dup2(2)) are handled.
Right now only callers of closef (and {,p}read) use FILE_{,UN}USE correctly,
more fixes incoming soon.
|
| |
|
| |
|
|
|
|
|
|
|
| |
any anyone. Every caller of falloc matures the fd when it's usable.
- Since every lookup in the fd table must now check this flag and all of
them do the same thing, move all the necessary checks into a function -
fd_getfile.
|
| |
|
|
|
|
| |
traced proc. The vnode is in the proc and all functions need the proc.
|
| |
|
|
|
|
| |
poll had the same timeout problem as select.
|
|
|
|
| |
the timeout.
|
| |
|
|
|
|
|
|
|
| |
and out.
Make pread/pwrite in netbsd & linux thread safe - which is the whole point
anyway.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
Make the check more readable by comparing against SSIZE_MAX instead
of checking for wraparound. This is safe because SSIZE_MAX * 2 <=
SIZE_T_MAX. Fixes recno problems in the db routines exposed by a
perl test.
|
| |
|
|
|
|
| |
value is ssize_t allowing size > SSIZE_MAX is bad since people who (incorrectly mind you) check the return value for < 0 instead of == -1 will have bad things happen to them.
|
|
|
|
| |
as its 9th argument so change that and clean up uses of vn_rdwr(). Fixes 549 + more
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
and euid as well, then deliver them using new csignal() interface
which ensures that pgid setting process is permitted to signal the
pgid process(es). Thanks to newsham@aloha.net for extensive help and
discussion.
|