Subject: Re: setpriority() and PRIO_PROCESS under Cygwin
From: "Ehud Karni" <[email-masked]>
To: [email-masked]
Cc: [email-masked]
Date: Sun, 12 Oct 2003 22:50:55 +0200

On Sun, 12 Oct 2003 15:21:41 +0200, Hannu E K Nevalainen <[email-masked]> wrote:
>
> >+> setpriority/getpriority are not implemented in Cygwin.
>
> This means; use __CYGWIN__ or some such to create conditional (i.e.
> exclusion of) compiling of those parts of the source.

I did it once like this (code from a program I no longer use):

#ifdef __CYGWIN__
#include <windows.h>                   /* for some specific Windoz calls */
#endif /* __CYGWIN__ */

#ifdef __CYGWIN__
   {
   HANDLE WinId ;

       WinId = GetCurrentProcess ( ) ;             /* get my Windows HANDLE */
       SetPriorityClass ( WinId , REALTIME_PRIORITY_CLASS ) ;  /* set priority to REAL TIME CLASS */
   }
#endif /* __CYGWIN__ */

Ehud.

- --
 Ehud Karni           Tel: +972-3-7966-561  /"\
 Mivtach - Simon      Fax: +972-3-7966-667  \ /  ASCII Ribbon Campaign
 Insurance agencies   (USA) voice mail and   X   Against   HTML   Mail
 http://www.mvs.co.il  FAX:  1-815-5509341  / \
 GnuPG: 98EA398D <http://www.keyserver.net/>    Better Safe Than Sorry

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/