Subject: Re: nice() function
From: Geoffrey Noer <[email-masked]>
To: Jason Moxham <[email-masked]>
Cc: [email-masked]
Date: Mon, 28 Jun 1999 11:14:20 -0700

On Sat, Jun 26, 1999, Jason Moxham wrote:
> 
> I have a C program which calls nice(19) on linux to put the process at
> the lowest priority , what value should be used under cygwin ?
> and is the value the same for NT,95,98 ?

Cygwin processes can be set to:

	IDLE_PRIORITY_CLASS
	NORMAL_PRIORITY_CLASS
	HIGH_PRIORITY_CLASS
	REALTIME_PRIORITY_CLASS

using the nice() call.  NORMAL_PRIORITY_CLASS is the default.

If you pass a positive number to nice(), then the priority level will
decrease by one (within the above priority list).  A negative number
would make it increase by one.  It is not possible to change it by
more than one at a time without making repeated calls.  An increment
above REALTIME_PRIORITY_CLASS results in the process staying at that
priority.  Likewise, a decrement to IDLE_PRIORITY_CLASS has it stay at
that priority.

Note that in the Win32 API, there are 32 priorities.  So we only give
access to four of these through nice() currently.

-- 
Geoffrey Noer		Email: [email-masked]
Cygnus Solutions

--
Want to unsubscribe from this list?
Send a message to [email-masked]