38#if (((__RTEMS_MAJOR__ << 16) | (__RTEMS_MINOR__ << 8) | __RTEMS_REVISION__) >= 0x040b63)
43#define SPIN_DECLARE(lock) RTEMS_INTERRUPT_LOCK_MEMBER(lock)
44#define SPIN_INIT(lock, name) rtems_interrupt_lock_initialize(lock, name)
45#define SPIN_LOCK(lock, level) rtems_interrupt_lock_acquire_isr(lock, &level)
46#define SPIN_LOCK_IRQ(lock, level) rtems_interrupt_lock_acquire(lock, &level)
47#define SPIN_UNLOCK(lock, level) rtems_interrupt_lock_release_isr(lock, &level)
48#define SPIN_UNLOCK_IRQ(lock, level) rtems_interrupt_lock_release(lock, &level)
49#define SPIN_IRQFLAGS(k) rtems_interrupt_lock_context k
50#define SPIN_ISR_IRQFLAGS(k) SPIN_IRQFLAGS(k)
51#define SPIN_FREE(lock) rtems_interrupt_lock_destroy(lock)
54#define IRQ_LOCAL_DECLARE(_level) rtems_interrupt_level _level
55#define IRQ_LOCAL_DISABLE(_level) rtems_interrupt_local_disable(_level)
56#define IRQ_LOCAL_ENABLE(_level) rtems_interrupt_local_enable(_level)
61#error SMP mode not compatible with these interrupt lock primitives
65#define SPIN_DECLARE(name)
66#define SPIN_INIT(lock, name)
67#define SPIN_LOCK(lock, level)
68#define SPIN_LOCK_IRQ(lock, level) rtems_interrupt_disable(level)
69#define SPIN_UNLOCK(lock, level)
70#define SPIN_UNLOCK_IRQ(lock, level) rtems_interrupt_enable(level)
71#define SPIN_IRQFLAGS(k) rtems_interrupt_level k
72#define SPIN_ISR_IRQFLAGS(k)
73#define SPIN_FREE(lock)
76#define IRQ_LOCAL_DECLARE(_level) rtems_interrupt_level _level
77#define IRQ_LOCAL_DISABLE(_level) rtems_interrupt_disable(_level)
78#define IRQ_LOCAL_ENABLE(_level) rtems_interrupt_enable(_level)
86#if (((__RTEMS_MAJOR__ << 16) | (__RTEMS_MINOR__ << 8) | __RTEMS_REVISION__) >= 0x050000)
88static inline void *grlib_malloc(
size_t size)
93static inline void *grlib_calloc(
size_t nelem,
size_t elsize)
100static inline void *grlib_malloc(
size_t size)
105static inline void *grlib_calloc(
size_t nelem,
size_t elsize)
107 return calloc(nelem, elsize);
114static inline unsigned char grlib_read_uncached8(
unsigned int address)
117 __asm__ (
" lduba [%1]1, %0 "
124static inline unsigned short grlib_read_uncached16(
unsigned int addr) {
126 __asm__ (
" lduha [%1]1, %0 "
134static inline unsigned int grlib_read_uncached32(
unsigned int address)
137 __asm__ (
" lda [%1]1, %0 "
144static inline uint64_t grlib_read_uncached64(uint64_t *address)
147 __asm__ (
" ldda [%1]1, %0 "
154#define GRLIB_DMA_IS_CACHE_COHERENT CPU_SPARC_HAS_SNOOPING
158static unsigned char __inline__ grlib_read_uncached8(
unsigned int address)
160 unsigned char tmp = (*(
volatile unsigned char *)(address));
164static __inline__
unsigned short grlib_read_uncached16(
unsigned int address) {
165 unsigned short tmp = (*(
volatile unsigned short *)(address));
169static inline unsigned int grlib_read_uncached32(
unsigned int address)
171 unsigned int tmp = (*(
volatile unsigned int *)(address));
175#define GRLIB_DMA_IS_CACHE_COHERENT 1
This header file provides basic definitions used by the API and the implementation.
void * rtems_malloc(size_t size) RTEMS_MALLOCLIKE RTEMS_ALLOC_SIZE(1) RTEMS_WARN_UNUSED_RESULT
Allocates a memory area of the specified size from the heap.
void * rtems_calloc(size_t nelem, size_t elsize) RTEMS_MALLOCLIKE RTEMS_ALLOC_SIZE_2(1
Allocates a memory area for the specified count of elements from the heap.
This header file provides the interfaces of the ISR Locks.
This header file defines interfaces to support and use dynamic memory allocation.