[orbis-kernel] Implement umtx_wake_umutex

This commit is contained in:
Ivan Chikish 2023-07-10 19:48:37 +03:00
parent 51150f4b07
commit 9a3054a5d1
4 changed files with 32 additions and 15 deletions

View file

@ -38,6 +38,8 @@ struct UmtxChain {
std::pair<const UmtxKey, UmtxCond> *enqueue(UmtxKey &key, Thread *thr);
void erase(std::pair<const UmtxKey, UmtxCond> *obj);
void notify_one(const UmtxKey &key);
void notify_all(const UmtxKey &key);
};
class alignas(__STDCPP_DEFAULT_NEW_ALIGNMENT__) KernelContext final {

View file

@ -86,8 +86,7 @@ ErrorCode umtx_wait_uint_private(Thread *thread, ptr<void> addr, ulong id,
std::uint64_t ut);
ErrorCode umtx_wake_private(Thread *thread, ptr<void> uaddr, sint n_wake);
ErrorCode umtx_wait_umutex(Thread *thread, ptr<umutex> m, std::uint64_t ut);
ErrorCode umtx_wake_umutex(Thread *thread, ptr<void> obj, std::int64_t val,
ptr<void> uaddr1, ptr<void> uaddr2);
ErrorCode umtx_wake_umutex(Thread *thread, ptr<umutex> m);
ErrorCode umtx_sem_wait(Thread *thread, ptr<void> obj, std::int64_t val,
ptr<void> uaddr1, ptr<void> uaddr2);
ErrorCode umtx_sem_wake(Thread *thread, ptr<void> obj, std::int64_t val,