tThread *thisthread = Proc_GetCurThread();
int ret;
- ENTER("iMaxHandle pReadHandles pWriteHandles pErrHandles pTimeout bIsKernel",
- MaxHandle, ReadHandles, WriteHandles, ErrHandles, Timeout, IsKernel);
+ ENTER("iMaxHandle pReadHandles pWriteHandles pErrHandles pTimeout xExtraEvents bIsKernel",
+ MaxHandle, ReadHandles, WriteHandles, ErrHandles, Timeout, ExtraEvents, IsKernel);
// Notes: The idea is to make sure we only enter wait (Threads_WaitEvents)
// if we are going to be woken up (either by an event at a later time,
// or the semaphore is incremeneted (or both, but never none)
// Register with nodes
+ if( ReadHandles )
+ LOG(" - ReadHandles[0] = %x", ReadHandles->flags[0]);
ret = VFS_int_Select_Register(thisthread, MaxHandle, ReadHandles, 0, IsKernel);
ret += VFS_int_Select_Register(thisthread, MaxHandle, WriteHandles, 1, IsKernel);
ret += VFS_int_Select_Register(thisthread, MaxHandle, ErrHandles, 2, IsKernel);
// If there were events waiting, de-register and return
if( ret > 0 )
{
+ LOG(" - ReadHandles[0] = %x", ReadHandles->flags[0]);
ret = VFS_int_Select_Deregister(thisthread, MaxHandle, ReadHandles, 0, IsKernel);
ret += VFS_int_Select_Deregister(thisthread, MaxHandle, WriteHandles, 1, IsKernel);
ret += VFS_int_Select_Deregister(thisthread, MaxHandle, ErrHandles, 2, IsKernel);
+ LOG(" - ReadHandles[0] = %x", ReadHandles->flags[0]);
LEAVE('i', ret);
return ret;
}
}
// Check for the flag
- if( !!*flag == !!wantedFlagValue )
+ if( !!*flag == !!wantedFlagValue ) {
+ LOG(" %i == want %i", !!*flag, !!wantedFlagValue);
numFlagged ++;
+ }
}
LEAVE('i', numFlagged);
continue;
}
- // Get the type of the listen
-
// Get the type of the listen
if( VFS_int_Select_GetType(Type, handle->Node, &list, &flag, &wantedFlagValue, NULL) ) {
LEAVE('i', 0);
// Check for the flag
if( !!*flag == !!wantedFlagValue ) {
numFlagged ++;
+ LOG(" %i == want %i", !!*flag, !!wantedFlagValue);
+ FD_SET(i, Handles);
}
else {
FD_CLR(i, Handles);