[*] Fix linux build warning and not quite complete linux ipc fix a4f6db7ec9
This commit is contained in:
parent
ff0e32ce02
commit
a96788623f
@ -63,7 +63,7 @@ namespace Aurora::IO::IPC
|
||||
#if defined(FIONREAD)
|
||||
|
||||
int available {};
|
||||
if (::ioctl(fds[1], FIONREAD, &available) < 0)
|
||||
if (::ioctl(this->secondary[0], FIONREAD, &available) < 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@ -199,10 +199,16 @@ namespace Aurora::IO::IPC
|
||||
|
||||
bool IPCPipeImpl::ReadEx(const Memory::MemoryViewStreamWrite &write, bool nonblock, bool bSide)
|
||||
{
|
||||
auto handle = bSide ? fds[0] : fds[1];
|
||||
auto handle = bSide ? this->fds[0] : this->secondary[0];
|
||||
|
||||
auto control = ::fcntl(handle, F_GETFL);
|
||||
auto ref = control;
|
||||
|
||||
if (control < 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (nonblock)
|
||||
{
|
||||
control |= O_NONBLOCK;
|
||||
@ -221,7 +227,7 @@ namespace Aurora::IO::IPC
|
||||
{
|
||||
#if defined(FIONREAD)
|
||||
int available {};
|
||||
if (::ioctl(fds[0], FIONREAD, &available) < 0)
|
||||
if (::ioctl(handle, FIONREAD, &available) < 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
@ -20,7 +20,7 @@ namespace Aurora::Threading::Primitives
|
||||
void SlowLock() override;
|
||||
bool LockMS(AuUInt64 timeout) override;
|
||||
bool LockNS(AuUInt64 timeout) override;
|
||||
bool LockAbsNS(AuUInt64 uTimeout);
|
||||
bool LockAbsNS(AuUInt64 uTimeout) override;
|
||||
void Unlock() override;
|
||||
|
||||
auline bool TryLockNoSpin();
|
||||
|
Loading…
Reference in New Issue
Block a user