Implemented CancelIo() and SetThreadIdealProcessor().

svn path=/trunk/; revision=4111
This commit is contained in:
Eric Kohl 2003-02-03 14:20:24 +00:00
parent 5bd96088c4
commit a9b14e9d16
3 changed files with 47 additions and 26 deletions

View file

@ -1,4 +1,4 @@
/* $Id: iocompl.c,v 1.7 2003/01/15 21:24:33 chorns Exp $
/* $Id: iocompl.c,v 1.8 2003/02/03 14:19:30 ekohl Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
@ -136,4 +136,21 @@ FileIOCompletionRoutine(
}
BOOL STDCALL
CancelIo(HANDLE hFile)
{
IO_STATUS_BLOCK IoStatusBlock;
NTSTATUS Status;
Status = NtCancelIoFile(hFile,
&IoStatusBlock);
if (!NT_SUCCESS(Status))
{
SetLastErrorByStatus(Status);
return(FALSE);
}
return(TRUE);
}
/* EOF */

View file

@ -1,4 +1,4 @@
/* $Id: stubs.c,v 1.45 2003/02/02 16:57:30 ekohl Exp $
/* $Id: stubs.c,v 1.46 2003/02/03 14:20:03 ekohl Exp $
*
* KERNEL32.DLL stubs (unimplemented functions)
* Remove from this file, if you implement them.
@ -25,14 +25,6 @@ BaseAttachCompleteThunk (VOID)
}
BOOL STDCALL
CancelIo(HANDLE hFile)
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE;
}
BOOL
STDCALL
CmdBatNotification (
@ -575,7 +567,7 @@ GetSystemDefaultLangID (VOID)
#endif
DWORD
WINBOOL
STDCALL
GetSystemPowerStatus (
DWORD Unknown0
@ -871,11 +863,10 @@ SetThreadLocale (
#endif
WINBOOL
STDCALL
WINBOOL STDCALL
SetSystemPowerState (
DWORD Unknown0,
DWORD Unknown1
IN WINBOOL fSuspend,
IN WINBOOL fForce
)
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
@ -883,16 +874,6 @@ SetSystemPowerState (
}
WINBOOL
STDCALL
SetThreadIdealProcessor(HANDLE hThread,
DWORD dwIdealProcessor)
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0;
}
WINBOOL
STDCALL
SetVDMCurrentDirectories (

View file

@ -1,4 +1,4 @@
/* $Id: thread.c,v 1.34 2003/01/22 02:24:36 ekohl Exp $
/* $Id: thread.c,v 1.35 2003/02/03 14:20:24 ekohl Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
@ -587,4 +587,27 @@ GetThreadSelectorEntry(IN HANDLE hThread,
return(FALSE);
}
WINBOOL STDCALL
SetThreadIdealProcessor(HANDLE hThread,
DWORD dwIdealProcessor)
{
ULONG IdealProcessor;
NTSTATUS Status;
IdealProcessor = (ULONG)dwIdealProcessor;
Status = NtSetInformationThread(hThread,
ThreadIdealProcessor,
&IdealProcessor,
sizeof(ULONG));
if (!NT_SUCCESS(Status))
{
SetLastErrorByStatus(Status);
return(FALSE);
}
return(TRUE);
}
/* EOF */