mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-04 14:08:37 +00:00
[orbis-kernel] Make evf IPC-safe
This commit is contained in:
parent
72185f0086
commit
1bf88f6fe8
4 changed files with 29 additions and 39 deletions
|
|
@ -32,9 +32,6 @@ struct EventFlag final {
|
|||
|
||||
struct WaitingThread {
|
||||
Thread *thread;
|
||||
utils::shared_cv *cv;
|
||||
std::uint64_t *patternSet;
|
||||
bool *isCanceled;
|
||||
std::uint64_t bitPattern;
|
||||
std::uint8_t waitMode;
|
||||
|
||||
|
|
@ -70,10 +67,9 @@ struct EventFlag final {
|
|||
: attrs(attrs), value(initPattern) {}
|
||||
|
||||
ErrorCode wait(Thread *thread, std::uint8_t waitMode,
|
||||
std::uint64_t bitPattern, std::uint64_t *patternSet,
|
||||
std::uint32_t *timeout);
|
||||
std::uint64_t bitPattern, std::uint32_t *timeout);
|
||||
ErrorCode tryWait(Thread *thread, std::uint8_t waitMode,
|
||||
std::uint64_t bitPattern, std::uint64_t *patternSet);
|
||||
std::uint64_t bitPattern);
|
||||
std::size_t notify(NotifyType type, std::uint64_t bits);
|
||||
|
||||
std::size_t destroy() { return notify(NotifyType::Destroy, {}); }
|
||||
|
|
|
|||
|
|
@ -4,13 +4,15 @@
|
|||
#include "orbis-config.hpp"
|
||||
#include "types.hpp"
|
||||
|
||||
#include "../utils/SharedCV.hpp"
|
||||
#include "../utils/SharedMutex.hpp"
|
||||
#include <thread>
|
||||
|
||||
namespace orbis {
|
||||
struct Process;
|
||||
struct Thread {
|
||||
shared_mutex mtx;
|
||||
utils::shared_mutex mtx;
|
||||
utils::shared_cv sync_cv;
|
||||
Process *tproc = nullptr;
|
||||
uint64_t retval[2]{};
|
||||
void *context{};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue