ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/include/cfperl.h
(Generate patch)

Comparing deliantra/server/include/cfperl.h (file contents):
Revision 1.45 by root, Sun Dec 31 17:17:23 2006 UTC vs.
Revision 1.46 by root, Mon Jan 1 00:41:03 2007 UTC

384struct coroapi { 384struct coroapi {
385 static struct CoroAPI *GCoroAPI; 385 static struct CoroAPI *GCoroAPI;
386 386
387 static int nready () { return CORO_NREADY; } 387 static int nready () { return CORO_NREADY; }
388 static int cede () { return CORO_CEDE ; } 388 static int cede () { return CORO_CEDE ; }
389
390 static int cede_counter;
391
392 static void cede_every (int count)
393 {
394 if (++cede_counter >= count)
395 {
396 cede_counter = 0;
397
398 if (coroapi::nready ())
399 coroapi::cede ();
400 }
401 }
389}; 402};
390 403
391struct watcher_base 404struct watcher_base
392{ 405{
393 static struct EventAPI *GEventAPI; 406 static struct EventAPI *GEventAPI;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines