setpriority() and PRIO_PROCESS under Cygwin

Ehud Karni ehud@unix.mvs.co.il
Sun Oct 12 22:12:00 GMT 2003


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Sun, 12 Oct 2003 15:21:41 +0200, Hannu E K Nevalainen <garbage_collector@telia.com> 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
-----BEGIN PGP SIGNATURE-----
Comment: use http://www.keyserver.net/ to get my key (and others)

iD8DBQE/ib6uLFvTvpjqOY0RAtdqAJ9HKOprp8ZnzJdrADlQ3eQxYYOfTACeJ9UZ
GPrUJElEq3ByYMSLLamRal4=
=Cmx0
-----END PGP SIGNATURE-----

--
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/



More information about the Cygwin mailing list