This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: nice() function


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: noer@cygnus.com
Cygnus Solutions

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]