fifo: revert broken fix
This commit is contained in:
parent
4a531db1f2
commit
2a081b42a9
@ -615,8 +615,6 @@ Inode::NotifyEndClosed(bool writer)
|
||||
request->Notify();
|
||||
|
||||
if (fReadSelectSyncPool)
|
||||
notify_select_event_pool(fReadSelectSyncPool, B_SELECT_DISCONNECTED);
|
||||
notify_select_event_pool(fReadSelectSyncPool, B_SELECT_ERROR);
|
||||
notify_select_event_pool(fReadSelectSyncPool, B_SELECT_READ);
|
||||
}
|
||||
} else {
|
||||
@ -624,9 +622,8 @@ Inode::NotifyEndClosed(bool writer)
|
||||
fWriteCondition.NotifyAll();
|
||||
|
||||
if (fWriteSelectSyncPool) {
|
||||
notify_select_event_pool(fWriteSelectSyncPool, B_SELECT_DISCONNECTED);
|
||||
notify_select_event_pool(fWriteSelectSyncPool, B_SELECT_ERROR);
|
||||
notify_select_event_pool(fWriteSelectSyncPool, B_SELECT_WRITE);
|
||||
notify_select_event_pool(fWriteSelectSyncPool, B_SELECT_ERROR);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -713,20 +710,15 @@ Inode::Select(uint8 event, selectsync* sync, int openMode)
|
||||
|
||||
// signal right away, if the condition holds already
|
||||
if (writer) {
|
||||
if (event == B_SELECT_WRITE && fBuffer.Writable() > 0)
|
||||
if ((event == B_SELECT_WRITE
|
||||
&& (fBuffer.Writable() > 0 || fReaderCount == 0))
|
||||
|| (event == B_SELECT_ERROR && fReaderCount == 0)) {
|
||||
return notify_select_event(sync, event);
|
||||
if (fReaderCount == 0) {
|
||||
if (event == B_SELECT_ERROR)
|
||||
return notify_select_event(sync, event);
|
||||
return notify_select_event(sync, B_SELECT_DISCONNECTED);
|
||||
}
|
||||
} else {
|
||||
if (event == B_SELECT_READ && fBuffer.Readable() > 0)
|
||||
if (event == B_SELECT_READ
|
||||
&& (fBuffer.Readable() > 0 || fWriterCount == 0)) {
|
||||
return notify_select_event(sync, event);
|
||||
if (fWriterCount == 0) {
|
||||
if (event == B_SELECT_ERROR)
|
||||
return notify_select_event(sync, event);
|
||||
return notify_select_event(sync, B_SELECT_DISCONNECTED);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user