mirror of
https://github.com/genodelabs/genode.git
synced 2025-05-05 02:03:07 +00:00
- Cosmetic adjustments according to https://genode.org/documentation/developer-resources/coding_style - Replace manual inclusion of kernel headers by one new compound header foc/syscall.h - Rename namespace Fiasco to Foc
30 lines
707 B
C++
30 lines
707 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-2017 Genode Labs GmbH
|
|
*
|
|
* This file is part of the Genode OS framework, which is distributed
|
|
* under the terms of the GNU Affero General Public License version 3.
|
|
*/
|
|
|
|
/* base-internal includes */
|
|
#include <base/internal/cap_map.h>
|
|
#include <base/internal/spin_lock.h>
|
|
|
|
using namespace Genode;
|
|
|
|
|
|
Spin_lock::Spin_lock() : _spinlock(SPINLOCK_UNLOCKED) {}
|
|
|
|
|
|
void Spin_lock::lock() { spinlock_lock(&_spinlock); }
|
|
|
|
|
|
void Spin_lock::unlock() { spinlock_unlock(&_spinlock); }
|