mirror of
https://github.com/SysRay/psOff_public.git
synced 2024-11-23 14:29:39 +00:00
eventflag fix create flag handling
This commit is contained in:
parent
bf4100dfdc
commit
27e2c04ec2
@ -147,7 +147,7 @@ int KernelEventFlag::wait(uint64_t bits, WaitMode wait_mode, ClearMode clear_mod
|
||||
if (m_status == Status::Canceled) {
|
||||
return getErr(ErrCode::_ECANCELED);
|
||||
} else if (m_status == Status::Deleted) {
|
||||
return getErr(ErrCode::_EACCES);
|
||||
return getErr(ErrCode::_EINTR);
|
||||
}
|
||||
// -
|
||||
|
||||
@ -169,6 +169,7 @@ int deleteEventFlag(IKernelEventFlag_t ef) {
|
||||
if (ef == nullptr) {
|
||||
return getErr(ErrCode::_ESRCH);
|
||||
}
|
||||
|
||||
LOG_INFO(L"Deleted ptr:0x%08llx", (uint64_t)ef);
|
||||
delete ef;
|
||||
return Ok;
|
||||
|
@ -16,26 +16,8 @@ EXPORT SYSV_ABI int sceKernelCreateEventFlag(IKernelEventFlag_t* ef, const char*
|
||||
return getErr(ErrCode::_EINVAL);
|
||||
}
|
||||
|
||||
bool single = true;
|
||||
bool fifo = true;
|
||||
|
||||
switch (attr) {
|
||||
case 0x10:
|
||||
case 0x11:
|
||||
single = true;
|
||||
fifo = true;
|
||||
break;
|
||||
case 0x20:
|
||||
case 0x21:
|
||||
single = false;
|
||||
fifo = true;
|
||||
break;
|
||||
case 0x22:
|
||||
single = false;
|
||||
fifo = false;
|
||||
break;
|
||||
default: LOG_CRIT(L"unknown attr: %u", attr);
|
||||
}
|
||||
bool const single = (attr & 0x30) == 0x10;
|
||||
bool fifo = (attr & 0x03) == 0x1;
|
||||
|
||||
std::string _name;
|
||||
if (name != nullptr) _name = std::string(name);
|
||||
|
Loading…
Reference in New Issue
Block a user