Re: [Nagios-devel] Patch for 2.12 utilize sched_yield instead of

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Guest

Re: [Nagios-devel] Patch for 2.12 utilize sched_yield instead of

Post by Guest »

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

On 28/04/09 04:37 PM, eponymous alias wrote:
> It seems unlikely that you would want to
> #include
> unconditionally and then only conditionally
> invoke sched_yield().
>
> If you are going to conditionally invoke
> sched_yield(), then it ought to be done for
> the __sun__ platform as well. And for that
> matter, the appropriate preprocessor symbols
> for non-GCC compilers ought to be checked
> as well. Probably better overall is to
> depend instead on some global flag of your
> own which is not platform-specific, much like
> the ./configure --enable-event-broker option
> generates the USE_EVENT_BROKER flag.
>

Hi,

I'm not sure if you guys seen my post in the other related thread; why
not use _POSIX_PRIORITY_SCHEDULING?

Regarding the include of , if you believe it could be missing
it could be detected by autoconf with the AC_CHECK_HEADER macro (the
sched_yield block would therefore be conditional of both
_POSIX_PRIORITY_SCHEDULING and HAVE_SCHED_H).


- From my original post:
>
> I looked at the sched_yield() man page and found the following
> statement:
>
> POSIX systems on which sched_yield() is available define
> _POSIX_PRIORITY_SCHEDULING in .
>
> That would make is work on more systems. My Solaris 10 server has it.
>

- --
Thomas
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFJ9/Be6dZ+Kt5BchYRAvRnAJ9AmjQUL/DR2EIm1ed379yagz+mlQCgu/iU
sAOieOxUbJq+GhPqPHWZZL4=
=+yEC
-----END PGP SIGNATURE-----





This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]
Locked