#include "arch.h"
#include "target-arch-os.h"
#include "os.h"
+#include "pthread-lutex.h"
+#include "gencgc.h"
#include "genesis/lutex.h"
-typedef unsigned long tagged_lutex_t;
-
#if 1
# define lutex_assert(ex) \
do { \
struct lutex *lutex = (struct lutex*) native_pointer(tagged_lutex);
ret = thread_mutex_lock(lutex->mutex);
- /* The mutex is locked by the same thread. */
+ /* The mutex is locked by the same thread.
+ *
+ * FIXME: Usually when POSIX says that "an error value is returned"
+ * it actually refers to errno...
+ */
if (ret == EDEADLK)
return ret;
lutex_assert(ret == 0);