| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
| |
Discussed with deraadt@
|
|
|
|
|
|
|
|
| |
argument, we need to make sure this buffer has 64-bit alignment, even
on 32-bit architectures. Fixes the alignment trap triggered by
vnconfig(8) on sparc for kernels compiled with gcc4.
ok miod@
|
| |
|
|
|
|
|
|
|
|
|
| |
so that the process-level stuff is to/from struct process and not
struct proc. This fixes a bunch of problem cases in rthreads.
Based on earlier work by blambert and myself, but mostly written
at c2k10.
Tested by many: deraadt, sthen, krw, ray, and in snapshots
|
|
|
|
|
|
|
| |
enodev to poll, because this returns an errno of 19 in revents. Oops.
Use seltrue where needed, and use a new selfalse function for those which
don't know if the next op will be non-blocking
Mostly discussed with guenther and miod
|
|
|
|
|
|
|
|
| |
properly aligned. Otherwise we lose on strict alignment architectures if
the compiler happens to give it a smaller alignment. Fixes another gcc4
problem on sparc64.
ok miod@
|
|
|
|
|
|
|
|
|
|
| |
supported it doesn't do any harm), so put the KNOTE() in selwakeup() itself and
remove it from any occurences where both are used, except one for kqueue itself
and one in sys_pipe.c (where the selwakeup is under a PIPE_SEL flag).
Based on a diff from tedu.
ok deraadt
|
|
|
|
|
| |
and it is pretty critical so commiting it now. Any more fallout from
the code 'simplication'?
|
|
|
|
|
|
| |
Special thanks to ckuethe's ntpd for noticing the problem.
ok deraadt@
|
|
|
|
|
|
| |
deadlock for ckuethe@
"if you have to revert, you have to revert" deraadt@
|
|
|
|
|
|
| |
does not cause us to call free if we never malloced.
crash found by & OK marco@
|
| |
|
|
|
|
|
|
|
| |
dofile{read,write}v, so remove the former and rework it so that everything
uses the latter
"nice" deraadt@ "reads ok" oga@ spastic 'OMG Ponies!!!!' weingart@
|
|
|
|
|
|
|
| |
allows threaded programs to concurrently update the events field while
a thread is blocked in poll(2).
okay deraadt@ millert@
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
that takes an additional argument "type" that indicates whether the
signal is for the process, just a particular thread, or propagated
to a thread because it's not caught or blocked. psignal() becomes
a wrapper that does the first of those.
So that sys_kill() can tell apart signals for the process and signals
for the process's original thread, the tid of the original thread
is defined as its pid + THREAD_PID_OFFSET.
ok tedu@ art@ andreas@ kurt@ "better early than late" deraadt@
|
|
|
|
| |
eyeballed and ok dlg@
|
|
|
|
|
|
|
| |
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.
|
| |
|