pike.git / src / interpret.h

version» Context lines:

pike.git/src/interpret.h:1:   /*   || This file is part of Pike. For copyright information see COPYRIGHT.   || Pike is distributed under GPL, LGPL and MPL. See the file COPYING   || for more information. - || $Id: interpret.h,v 1.176 2008/11/18 19:06:23 mast Exp $ + || $Id: interpret.h,v 1.177 2008/11/19 21:25:43 mast Exp $   */      #ifndef INTERPRET_H   #define INTERPRET_H      #include "global.h"   #include "program.h"   #include "pike_error.h"   #include "object.h"   #include "pike_rusage.h"
pike.git/src/interpret.h:697:    fast_check_threads_counter = 0; \    check_threads_etc(); \    } \    } while(0)      /* Used before any sort of pike level function call. This covers most    * code paths. An interval with magnitude 6 on a 2 GHz AMD 64 averages    * on 1000-3000 check_threads_etc calls per second in mixed code, but    * it can vary greatly - from 0 to 30000+ calls/sec. In a test case    * with about 22000 calls/sec, it took 0.042% of the cpu. */ - #define FAST_CHECK_THREADS_ON_CALL() fast_check_threads_etc (6) + #define FAST_CHECK_THREADS_ON_CALL() do { \ +  if (++fast_check_threads_counter >= (1 << 6)) { \ +  fast_check_threads_counter = 0; \ +  check_threads_etc(); \ +  } \ +  else if (objects_to_destruct) \ +  /* De facto pike semantics requires that freed objects are */ \ +  /* destructed before function calls. Otherwise done through */ \ +  /* evaluator_callbacks. */ \ +  destruct_objects_to_destruct_cb(); \ +  } while (0)      /* Used before any sort of backward branch. This is only a safeguard    * for some corner cases with loops without calls - not relevant in    * ordinary code. */   #define FAST_CHECK_THREADS_ON_BRANCH() fast_check_threads_etc (8)      #include "block_alloc_h.h"   /* Prototypes begin here */   void push_sp_mark(void);   ptrdiff_t pop_sp_mark(void);