Permalink
Browse files

Fix compilation of spin_lock_pthreads.hpp. It was broken by a Boost u…

…pgrade.
  • Loading branch information...
1 parent e4b12cb commit 5b516409d1272cd1a8e822f449232b67500ce3d8 @FooBarWidget FooBarWidget committed Mar 31, 2013
Showing with 4 additions and 4 deletions.
  1. +4 −4 ext/oxt/detail/spin_lock_pthreads.hpp
@@ -61,7 +61,7 @@ class spin_lock {
ret = pthread_spin_init(&spin, PTHREAD_PROCESS_PRIVATE);
} while (ret == EINTR);
if (ret != 0) {
- throw boost::thread_resource_error("Cannot initialize a spin lock", ret);
+ throw boost::thread_resource_error(ret, "Cannot initialize a spin lock");
}
}
@@ -78,7 +78,7 @@ class spin_lock {
ret = pthread_spin_lock(&spin);
} while (OXT_UNLIKELY(ret == EINTR));
if (OXT_UNLIKELY(ret != 0)) {
- throw boost::thread_resource_error("Cannot lock spin lock", ret);
+ throw boost::thread_resource_error(ret, "Cannot lock spin lock");
}
}
@@ -88,7 +88,7 @@ class spin_lock {
ret = pthread_spin_unlock(&spin);
} while (OXT_UNLIKELY(ret == EINTR));
if (OXT_UNLIKELY(ret != 0)) {
- throw boost::thread_resource_error("Cannot unlock spin lock", ret);
+ throw boost::thread_resource_error(ret, "Cannot unlock spin lock");
}
}
@@ -102,7 +102,7 @@ class spin_lock {
} else if (ret == EBUSY) {
return false;
} else {
- throw boost::thread_resource_error("Cannot lock spin lock", ret);
+ throw boost::thread_resource_error(ret, "Cannot lock spin lock");
}
}
};

0 comments on commit 5b51640

Please sign in to comment.