#include <stdlib.h>
#include <limits>
+#include "os.hpp"
#include "trace_fast_callset.hpp"
using namespace trace;
}
bool
-FastCallRange::contains(CallNo call_no)
+FastCallRange::contains(CallNo call_no) const
{
return (first <= call_no && last >= call_no);
}
+bool
+FastCallSet::empty(void) const
+{
+ return max_level == 0;
+}
+
FastCallSet::FastCallSet(): head(0, 0, MAX_LEVEL)
{
head.first = std::numeric_limits<CallNo>::max();
random_level (void)
{
/* tricky bit -- each bit is '1' 75% of the time */
- long int bits = random() | random();
+ long int bits = os::random() | os::random();
int level = 1;
while (level < MAX_LEVEL)
}
bool
-FastCallSet::contains(CallNo call_no)
+FastCallSet::contains(CallNo call_no) const
{
- FastCallRange *node;
+ const FastCallRange *node;
int i;
node = &head;