/* * Copyright (c) 2018-2020, Andreas Kling * * SPDX-License-Identifier: BSD-2-Clause */ #include #include namespace Kernel { KResultOr Process::sys$beep() { VERIFY_PROCESS_BIG_LOCK_ACQUIRED(this); PCSpeaker::tone_on(440); auto result = Thread::current()->sleep(Time::from_nanoseconds(200'000'000)); PCSpeaker::tone_off(); if (result.was_interrupted()) return EINTR; return 0; } }