Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm Sender: cygwin-owner AT sourceware DOT cygnus DOT com Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com Date: Mon, 28 Jun 1999 11:14:20 -0700 From: Geoffrey Noer To: Jason Moxham Cc: cygwin AT sourceware DOT cygnus DOT com Subject: Re: nice() function Message-ID: <19990628111420.B2400@cygnus.com> References: <199906261443 DOT PAA11090 AT malone DOT maths DOT soton DOT ac DOT uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95.1i In-Reply-To: <199906261443.PAA11090@malone.maths.soton.ac.uk>; from Jason Moxham on Sat, Jun 26, 1999 at 03:43:19PM +0100 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 AT cygnus DOT com Cygnus Solutions -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com