/* * Copyright (c) 2018-2020, Andreas Kling * * SPDX-License-Identifier: BSD-2-Clause */ #include #include #include #include #include namespace Kernel { using BlockFlags = Thread::FileBlocker::BlockFlags; KResultOr Process::sys$select(Userspace user_params) { VERIFY_PROCESS_BIG_LOCK_ACQUIRED(this) REQUIRE_PROMISE(stdio); auto params = TRY(copy_typed_from_user(user_params)); if (params.nfds < 0) return EINVAL; Thread::BlockTimeout timeout; if (params.timeout) { Optional