RTEMS 5.2
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
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
27
28#if defined(RTEMS_SMP)
29#include <rtems/score/percpu.h>
31#endif
32
33#ifdef __cplusplus
34extern "C" {
35#endif
36
37typedef 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;
45
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 */
#define RTEMS_INLINE_ROUTINE
Definition: basedefs.h:66
uint32_t ISR_Level
Definition: isrlevel.h:41
ISR Level Type.
POSIX Threads Private Support.
SMP Lock API.
Definition: spinlockimpl.h:37