#include "config.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#include "vmcore/system.h"
+#include "threads/mutex.hpp"
+
#if defined(ENABLE_THREADS)
# include "threads/posix/thread-posix.h"
#else
a blocking system call is interrupted. The mutex ensures that it will
see the correct value for the interrupted flag. */
- mutex_lock(&t->waitmutex);
+ Mutex_lock(t->waitmutex);
interrupted = t->interrupted;
- mutex_unlock(&t->waitmutex);
+ Mutex_unlock(t->waitmutex);
return interrupted;
}
inline static void thread_set_interrupted(threadobject *t, bool interrupted)
{
- mutex_lock(&t->waitmutex);
+ Mutex_lock(t->waitmutex);
/* Set interrupted flag. */
t->interrupted = interrupted;
- mutex_unlock(&t->waitmutex);
+ Mutex_unlock(t->waitmutex);
}
#endif /* ENABLE_THREADS */
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _THREAD_H */