diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-05-03 04:01:31 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-05-03 04:01:31 +0000 |
commit | 3a106c6ee4c8b2e7c2a7748fb6ce5f40dac96dbf (patch) | |
tree | 56e71dd49fac512b01572b41cb39abd921f73269 | |
parent | 536f6cc94078b8d4bf5cd6f98859ad58ecfbd4c4 (diff) |
A few cpu usage tweaks
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1285 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r-- | src/inspircd.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/inspircd.cpp b/src/inspircd.cpp index c3ae91241..ff1a9e9da 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -4125,6 +4125,9 @@ int InspIRCd(void) if ((curr) && (curr->fd != 0)) { +#ifdef _POSIX_PRIORITY_SCHEDULING + sched_yield(); +#endif // assemble up to 64 sockets into an fd_set // to implement a pooling mechanism. // @@ -4214,7 +4217,6 @@ int InspIRCd(void) } else result = result2; log(DEBUG,"Read result: %d",result); - if (result) { statsRecv += result; @@ -4407,6 +4409,7 @@ int InspIRCd(void) if (0) {}; #ifdef _POSIX_PRIORITY_SCHEDULING sched_yield(); + sched_yield(); #endif } /* not reached */ |