mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-10-27 20:58:22 +00:00
poll: init changes
This commit is contained in:
@@ -52,7 +52,6 @@ static mmuflags_t flagstommuflags(int flags) {
|
||||
}
|
||||
|
||||
static int load(vnode_t *vnode, elfph64_t *ph) {
|
||||
// TODO verify that the load address doesn't intersect the kernel
|
||||
int error = 0;
|
||||
uintmax_t foffset = ph->offset;
|
||||
uintptr_t mempos = ph->memaddr;
|
||||
|
||||
@@ -30,14 +30,13 @@ syscallret_t syscall_poll(context_t *, pollfd_t *fds, size_t nfds, int timeoutms
|
||||
|
||||
memcpy(fdsbuff, fds, fdsbuffsize);
|
||||
|
||||
polldesc_t desc = {0};
|
||||
polldesc_t desc;
|
||||
// when nfds is 0, poll is used as a sleep.
|
||||
// therefore, initialize the desc size to one descriptor in that case.
|
||||
ret.errno = poll_initdesc(&desc, nfds == 0 ? 1 : nfds);
|
||||
if (ret.errno) {
|
||||
goto cleanup;
|
||||
}
|
||||
__assert(spinlock_try(&desc.lock));
|
||||
|
||||
size_t eventcount = 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user