Commit 58880c55 authored by L. E. Segovia's avatar L. E. Segovia

Fix last remaining deprecations on macOS

This elevates SeExpr2 requirements to Sierra (10.12).
parent e8a57e77
......@@ -52,6 +52,7 @@
#ifdef __APPLE__
#include <Availability.h>
#include <libgen.h>
#include <os/lock.h>
#endif
// platform-specific includes
......@@ -323,13 +324,13 @@ class _Mutex {
#ifdef __APPLE__
class _SpinLock {
public:
_SpinLock() { _spinlock = 0; }
_SpinLock() { _spinlock = OS_UNFAIR_LOCK_INIT; }
~_SpinLock() {}
void lock() { OSSpinLockLock(&_spinlock); }
void unlock() { OSSpinLockUnlock(&_spinlock); }
void lock() { os_unfair_lock_lock(&_spinlock); }
void unlock() { os_unfair_lock_unlock(&_spinlock); }
private:
OSSpinLock _spinlock;
os_unfair_lock _spinlock;
};
#else
class _SpinLock {
......
......@@ -9,7 +9,7 @@ struct Expr : public SeExpr2::Expression {
struct SimpleVar : public SeExpr2::ExprVarRef {
SimpleVar() : ExprVarRef(SeExpr2::ExprType().FP(3).Varying()) { v[0] = v[1] = v[2] = 0; }
double v[3];
void eval(const char**) {}
void eval(const char**) override {}
void eval(double* result) override {
for (int k = 0; k < 3; k++) result[k] = v[k];
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment