Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

60 lines
737 B

  1. /*++
  2. Copyright (c) 1996 Microsoft Corporation
  3. Module Name:
  4. setprior.c
  5. Abstract:
  6. Set a threads priority.
  7. Author:
  8. Rod Gamache (rodga) 3-Oct-1996
  9. Revision History:
  10. --*/
  11. #include "nt.h"
  12. #include "ntdef.h"
  13. #include "ntrtl.h"
  14. #include "nturtl.h"
  15. #include "windows.h"
  16. DWORD
  17. MmSetThreadPriority(
  18. VOID
  19. )
  20. /*++
  21. Routine Description:
  22. Set the thread's priority.
  23. Arguments:
  24. None.
  25. Return Value:
  26. Status of the request.
  27. --*/
  28. {
  29. DWORD priority = 15;
  30. if ( !SetThreadPriority( GetCurrentThread(),
  31. priority ) ) {
  32. return(GetLastError());
  33. }
  34. return(ERROR_SUCCESS);
  35. } // MmSetThreadPriority