#include "lock.h"

namespace common {
  Lock::Lock() {
    lock_ = OS_SPINLOCK_INIT;
  }

  Lock::~Lock() {
  }

  void Lock::enter() {
    OSSpinLockLock(&lock_);
  }

  void Lock::leave() {
    OSSpinLockUnlock(&lock_);
  }
}
