internal static extern int setpriority(PriorityWhich which, int who, int prio);
internal static extern int SetPriority(PriorityWhich which, int who, int nice);
/// <summary> /// Wrapper around getpriority since getpriority can return from -20 to 20; therefore, /// we cannot rely on the return value for success and failure. This wrapper makes the /// getpriority call to act more naturally where the return value is the actual error /// value (or 0 if success) instead of forcing the caller to retrieve the last error. /// </summary> /// <returns>Returns 0 on success; otherwise, returns the errno value</returns> internal static int GetPriority(PriorityWhich which, int who, out int priority) { priority = GetPriority(which, who); return Marshal.GetLastWin32Error(); }
/// <summary> /// Wrapper around getpriority since getpriority can return from -20 to 20; therefore, /// we cannot rely on the return value for success and failure. This wrapper makes the /// getpriority call to act more naturally where the return value is the actual error /// value (or 0 if success) instead of forcing the caller to retrieve the last error. /// </summary> /// <returns>Returns 0 on success; otherwise, returns the errno value</returns> internal static int GetPriority(PriorityWhich which, int who, out int priority) { priority = GetPriority(which, who); return(Marshal.GetLastWin32Error()); }
private static extern int GetPriority(PriorityWhich which, int who);
internal static partial int SetPriority(PriorityWhich which, int who, int nice);
private static partial int GetPriority(PriorityWhich which, int who);