RTEMS
cpukit
include
rtems
posix
spinlockimpl.h
Go to the documentation of this file.
1
10
/*
11
* COPYRIGHT (c) 1989-2011.
12
* On-Line Applications Research Corporation (OAR).
13
*
14
* Copyright (c) 2016 embedded brains GmbH
15
*
16
* The license and distribution terms for this file may be
17
* found in the file LICENSE in this distribution or at
18
* http://www.rtems.org/license/LICENSE.
19
*/
20
21
#ifndef _RTEMS_POSIX_SPINLOCKIMPL_H
22
#define _RTEMS_POSIX_SPINLOCKIMPL_H
23
24
#include <pthread.h>
25
26
#include <
rtems/score/isrlevel.h
>
27
28
#if defined(RTEMS_SMP)
29
#include <
rtems/score/percpu.h
>
30
#include <
rtems/score/smplockticket.h
>
31
#endif
32
33
#ifdef __cplusplus
34
extern
"C"
{
35
#endif
36
37
typedef
struct
{
38
#if defined(RTEMS_SMP)
39
SMP_ticket_lock_Control
Lock;
40
#else
41
unsigned
int
reserved[ 2 ];
42
#endif
43
ISR_Level
interrupt_state;
44
}
POSIX_Spinlock_Control
;
45
46
RTEMS_INLINE_ROUTINE
POSIX_Spinlock_Control
*_POSIX_Spinlock_Get(
47
pthread_spinlock_t *lock
48
)
49
{
50
return
(
POSIX_Spinlock_Control
*) lock;
51
}
52
53
#ifdef __cplusplus
54
}
55
#endif
56
57
#endif
58
/* end of include file */
isrlevel.h
ISR Level Type.
POSIX_Spinlock_Control
Definition:
spinlockimpl.h:37
smplockticket.h
SMP Lock API.
ISR_Level
uint32_t ISR_Level
Definition:
isrlevel.h:41
percpu.h
SMP_ticket_lock_Control
SMP ticket lock control.
Definition:
smplockticket.h:40
RTEMS_INLINE_ROUTINE
#define RTEMS_INLINE_ROUTINE
Gives a hint to the compiler in a function declaration to inline this function.
Definition:
basedefs.h:683
Generated by
1.8.14