mirror of
https://github.com/RPCSX/rpcsx.git
synced 2024-11-23 03:19:47 +00:00
orbis-kernel: allow umtx_cv_wait with abs time
workaround for wrong blockpool protection
This commit is contained in:
parent
6f80249291
commit
00273aa75b
@ -320,15 +320,13 @@ orbis::ErrorCode orbis::umtx_cv_wait(Thread *thread, ptr<ucond> cv,
|
||||
ORBIS_LOG_FATAL("umtx_cv_wait: UNKNOWN wflags", wflags);
|
||||
return ErrorCode::INVAL;
|
||||
}
|
||||
if ((wflags & kCvWaitClockId) != 0 && ut + 1 && cv->clockid != 0) {
|
||||
if ((wflags & kCvWaitClockId) != 0 && ut + 1) {
|
||||
ORBIS_LOG_WARNING("umtx_cv_wait: CLOCK_ID", wflags, cv->clockid);
|
||||
// std::abort();
|
||||
return ErrorCode::NOSYS;
|
||||
}
|
||||
if ((wflags & kCvWaitAbsTime) != 0 && ut + 1) {
|
||||
ORBIS_LOG_WARNING("umtx_cv_wait: ABSTIME unimplemented", wflags);
|
||||
ORBIS_LOG_WARNING("umtx_cv_wait: ABSTIME", wflags);
|
||||
auto now = std::chrono::time_point_cast<std::chrono::microseconds>(
|
||||
std::chrono::high_resolution_clock::now())
|
||||
std::chrono::steady_clock::now())
|
||||
.time_since_epoch()
|
||||
.count();
|
||||
|
||||
@ -337,9 +335,6 @@ orbis::ErrorCode orbis::umtx_cv_wait(Thread *thread, ptr<ucond> cv,
|
||||
} else {
|
||||
ut = ut - now;
|
||||
}
|
||||
|
||||
std::abort();
|
||||
return ErrorCode::NOSYS;
|
||||
}
|
||||
|
||||
auto [chain, key, lock] = g_context.getUmtxChain0(thread, cv->flags, cv);
|
||||
|
@ -113,6 +113,11 @@ orbis::ErrorCode BlockPoolDevice::map(void **address, std::uint64_t len,
|
||||
std::int32_t prot, std::int32_t flags,
|
||||
orbis::Thread *thread) {
|
||||
ORBIS_LOG_FATAL("blockpool device map", *address, len);
|
||||
if (prot == 0) {
|
||||
// FIXME: investigate it
|
||||
prot = 0x33;
|
||||
}
|
||||
|
||||
auto result = vm::map(*address, len, prot, flags);
|
||||
|
||||
if (result == (void *)-1) {
|
||||
|
Loading…
Reference in New Issue
Block a user