genode/repos/base-foc/src/base/env/spin_lock.cc
Norman Feske ca971bbfd8 Move repositories to 'repos/' subdirectory
This patch changes the top-level directory layout as a preparatory
step for improving the tools for managing 3rd-party source codes.
The rationale is described in the issue referenced below.

Issue #1082
2014-05-14 16:08:00 +02:00

30 lines
710 B
C++

/*
* \brief Spin-lock implementation for environment's capability -allocator.
* \author Stefan Kalkowski
* \date 2012-02-29
*
* This is a Fiasco.OC-specific addition to the process enviroment.
*/
/*
* Copyright (C) 2012-2013 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU General Public License version 2.
*/
/* Genode includes */
#include <base/cap_map.h>
/* Lock implementation local include */
#include <spin_lock.h>
Genode::Spin_lock::Spin_lock() : _spinlock(SPINLOCK_UNLOCKED) {}
void Genode::Spin_lock::lock() { spinlock_lock(&_spinlock); }
void Genode::Spin_lock::unlock() { spinlock_unlock(&_spinlock); }