blob: 1398aff3eb1e3a35b393ed7f85d8ce43d8506a4c (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
/**
* @file
*
* @ingroup bsp_interrupt
*
* @brief BSP interrupt support lock implementation.
*/
/*
* Based on concepts of Pavel Pisa, Till Straumann and Eric Valette.
*
* Copyright (c) 2008, 2018 embedded brains GmbH.
*
* embedded brains GmbH
* Dornierstr. 4
* 82178 Puchheim
* Germany
* <rtems@embedded-brains.de>
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rtems.org/license/LICENSE.
*/
#include <bsp/irq-generic.h>
#include <rtems/score/apimutex.h>
#include <rtems/score/sysstate.h>
void bsp_interrupt_lock(void)
{
if (_System_state_Is_up(_System_state_Get())) {
_RTEMS_Lock_allocator();
}
}
void bsp_interrupt_unlock(void)
{
if (_System_state_Is_up(_System_state_Get())) {
_RTEMS_Unlock_allocator();
}
}
|