summaryrefslogtreecommitdiff
path: root/src/inspircd.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-05-03 04:01:31 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-05-03 04:01:31 +0000
commit3a106c6ee4c8b2e7c2a7748fb6ce5f40dac96dbf (patch)
tree56e71dd49fac512b01572b41cb39abd921f73269 /src/inspircd.cpp
parent536f6cc94078b8d4bf5cd6f98859ad58ecfbd4c4 (diff)
A few cpu usage tweaks
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1285 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/inspircd.cpp')
-rw-r--r--src/inspircd.cpp5
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 */