Kernel: Add API to block on semaphore until unblock or EINTR
This commit is contained in:
@@ -47,6 +47,9 @@ namespace Kernel
|
||||
void handle_signal(int signal = 0);
|
||||
bool add_signal(int signal);
|
||||
|
||||
// blocks semaphore and returns either on unblock, eintr or spuriously
|
||||
[[nodiscard]] bool block_or_eintr(Semaphore&);
|
||||
|
||||
void set_return_rsp(uintptr_t& rsp) { m_return_rsp = &rsp; }
|
||||
void set_return_rip(uintptr_t& rip) { m_return_rip = &rip; }
|
||||
uintptr_t return_rsp() { ASSERT(m_return_rsp); return *m_return_rsp; }
|
||||
|
||||
Reference in New Issue
Block a user