LeaveCritical(); \
}
#ifdef MAC_OSX
// boost::interprocess::interprocess_semaphore seems to spinlock on OSX; prefer polling instead
class CSemaphore
{
private:
val++;
};
#else
typedef boost::interprocess::interprocess_semaphore CSemaphore;
#endif
inline std::string i64tostr(int64 n)