X-Git-Url: https://scm.lunaixsky.com/lunaix-os.git/blobdiff_plain/b60166b327a9108b07e3069fa6568a451529ffd9..c043fa535514a76091be87a45ad472a505f9dd33:/lunaix-os/kernel/device/poll.c diff --git a/lunaix-os/kernel/device/poll.c b/lunaix-os/kernel/device/poll.c index 58d3621..159c2bb 100644 --- a/lunaix-os/kernel/device/poll.c +++ b/lunaix-os/kernel/device/poll.c @@ -7,6 +7,7 @@ #include #include #include +#include #define MAX_POLLER_COUNT 16 @@ -153,7 +154,7 @@ static void __wait_until_event() { block_current_thread(); - sched_pass(); + yield_current(); } void @@ -244,9 +245,13 @@ iopoll_install(struct thread* thread, struct v_fd* fd) return pld; } -__DEFINE_LXSYSCALL2(int, pollctl, int, action, va_list, va) +__DEFINE_LXSYSCALL2(int, pollctl, int, action, sc_va_list, _ap) { int retcode = 0; + va_list va; + + convert_valist(&va, _ap); + switch (action) { case _SPOLL_ADD: { int* ds = va_arg(va, int*);