From 3a106c6ee4c8b2e7c2a7748fb6ce5f40dac96dbf Mon Sep 17 00:00:00 2001 From: brain Date: Tue, 3 May 2005 04:01:31 +0000 Subject: A few cpu usage tweaks git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1285 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/inspircd.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') 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 */ -- cgit v1.2.3