+static void
+futex_init()
+{
+ int x = 0;
+ sys_futex(&x, FUTEX_WAIT, 1, 0);
+ if (errno == ENOSYS)
+ lose("This version of SBCL is compiled with threading support, but your kernel\n"
+ "is too old to support this. Please use a more recent kernel or\n"
+ "a version of SBCL without threading support.\n");
+ sys_futex(&x, FUTEX_WAIT_PRIVATE, 1, 0);
+ if (errno == EWOULDBLOCK) {
+ futex_private_supported_p = 1;
+ } else {
+ futex_private_supported_p = 0;
+ SHOW("No futex private suppport\n");
+ }
+}
+