- Jun 11, 2013
-
-
Avi Kivity authored
cv_timedwait() has a relative timeout expressed in ticks (microseconds), while condvar_wait() has an absolute timeout expressed in nanoseconds. Replace the 1:1 macro with a function that does the correct translation.
-
- Jun 10, 2013
-
-
Christoph Hellwig authored
-
Christoph Hellwig authored
-
Christoph Hellwig authored
-
Christoph Hellwig authored
-
- Jun 09, 2013
-
-
Guy Zana authored
given the scheduler state, wake() sometimes rescheduled the dispatcher thread immidiately, and then it blocked on the mutex that is still held by the caller of _callout_stop_safe_locked(). this patch does wake() outside of the lock to eliminated these spurious context switches.
-
Guy Zana authored
-
Nadav Har'El authored
The existing shutdown() code only worked with AF_INET sockets, and returned ENOTSOCK for AT_LOCAL sockets, because we implemented the latter sockets in completely different code (in af_local.cc). So in uipc_syscalls_wrap.c, the same place we call a the special af-local socketpair(), we also need to call the special af-local shutdown(). The way we do it is a bit ugly, but effective: shutdown() first calls shutdown_af_local(), and if that returns ENOTSOCK (so it's not an af_local socket), we continue trying the regular socket shutdown code. A better way would have been to add shutdown() to the fileops table - either the generic one (why not?), or invent a new mechanism whereby certain file types (in this case, "sockets" of all types) can have additional ops tables including in this case a shutdown() operation. Linux has something of this sort for implementing shutdown().
-
- May 31, 2013
-
-
Christoph Hellwig authored
We need to ifdef out more unused code to not make gcc complain.
-
- May 30, 2013
-
-
Christoph Hellwig authored
-
Christoph Hellwig authored
-
Christoph Hellwig authored
-
Christoph Hellwig authored
We don't have temporary snapshots yet, and we probably never will have processes that could exit.
-
Christoph Hellwig authored
-
Christoph Hellwig authored
-
Christoph Hellwig authored
-
Christoph Hellwig authored
-
Christoph Hellwig authored
-
Christoph Hellwig authored
-
Christoph Hellwig authored
-
Christoph Hellwig authored
-
Christoph Hellwig authored
It clashes with a macro of the same name in OSv.
-
Christoph Hellwig authored
-
Christoph Hellwig authored
-
Christoph Hellwig authored
-
Christoph Hellwig authored
-
Christoph Hellwig authored
OSv isn't ready for this yet.
-
Christoph Hellwig authored
-
Christoph Hellwig authored
-
Christoph Hellwig authored
-
Nadav Har'El authored
Previously, we re-implemented "unsupported" file operations (e.g., chmod for a pipe on which fchmod makes no sense) several times - there was an implementation only for chmod in kern_descrip.c, used in sys_socket.c, and af_local.cc had its own. As we add more file descriptor type (e.g., create_epoll()) we'll have even more copies of these silly functions, so let's do it once in fs/unsupported.c - with the fs/unsupported.h header file. This also gives us a central place to document (and argue) whether an unimplemented ioctl() should return ENOTTY or EBADF (I think the former).
-
- May 28, 2013
-
-
Nadav Har'El authored
getsockname() used to fail because by the time the call chain reached kern_getsockname() it got addrlen=0. The problem is getsockname1() which gives it an initialized local variable instead of the given addrlen. Most of these layers and copies are redundant, and are only left because of previous incarnations of the code which had copies from user space - but we need to at least get the unnecessary copies right ;-)
-
- May 27, 2013
-
-
Christoph Hellwig authored
This allows to remove various #if 0'ed code using vnode_t or znode_t to be compiled, both in the current headers and future ported code.
-
Christoph Hellwig authored
-
Christoph Hellwig authored
-
Christoph Hellwig authored
-
Christoph Hellwig authored
-
Christoph Hellwig authored
-
Christoph Hellwig authored
-
Christoph Hellwig authored
BSD and Solaris code likes to pass this identifier for the "kernel" process to various thread creation routines. Make our life simpler by providing it and ignoring it.
-