public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* nice() function
@ 1999-06-26  7:59 Jason Moxham
  1999-06-28 11:14 ` Geoffrey Noer
  1999-06-30 22:10 ` Jason Moxham
  0 siblings, 2 replies; 4+ messages in thread
From: Jason Moxham @ 1999-06-26  7:59 UTC (permalink / raw)
  To: cygwin

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 ?


Thanks
Jason Moxham
jlm@maths.soton.ac.uk


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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: nice() function
  1999-06-26  7:59 nice() function Jason Moxham
@ 1999-06-28 11:14 ` Geoffrey Noer
  1999-06-30 22:10   ` Geoffrey Noer
  1999-06-30 22:10 ` Jason Moxham
  1 sibling, 1 reply; 4+ messages in thread
From: Geoffrey Noer @ 1999-06-28 11:14 UTC (permalink / raw)
  To: Jason Moxham; +Cc: cygwin

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* nice() function
  1999-06-26  7:59 nice() function Jason Moxham
  1999-06-28 11:14 ` Geoffrey Noer
@ 1999-06-30 22:10 ` Jason Moxham
  1 sibling, 0 replies; 4+ messages in thread
From: Jason Moxham @ 1999-06-30 22:10 UTC (permalink / raw)
  To: cygwin

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 ?


Thanks
Jason Moxham
jlm@maths.soton.ac.uk


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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: nice() function
  1999-06-28 11:14 ` Geoffrey Noer
@ 1999-06-30 22:10   ` Geoffrey Noer
  0 siblings, 0 replies; 4+ messages in thread
From: Geoffrey Noer @ 1999-06-30 22:10 UTC (permalink / raw)
  To: Jason Moxham; +Cc: cygwin

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~1999-06-30 22:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-06-26  7:59 nice() function Jason Moxham
1999-06-28 11:14 ` Geoffrey Noer
1999-06-30 22:10   ` Geoffrey Noer
1999-06-30 22:10 ` Jason Moxham

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).