summaryrefslogtreecommitdiffstats
path: root/bsps/include/grlib/grlib_impl.h
diff options
context:
space:
mode:
Diffstat (limited to 'bsps/include/grlib/grlib_impl.h')
-rw-r--r--bsps/include/grlib/grlib_impl.h43
1 files changed, 31 insertions, 12 deletions
diff --git a/bsps/include/grlib/grlib_impl.h b/bsps/include/grlib/grlib_impl.h
index 919f6d69ab..1f6c60c05b 100644
--- a/bsps/include/grlib/grlib_impl.h
+++ b/bsps/include/grlib/grlib_impl.h
@@ -1,9 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* Copyright (C) 2017 Cobham Gaisler AB
*
- * 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.
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef GRLIB_IMPL_H
@@ -66,24 +85,24 @@ extern "C" {
#if (((__RTEMS_MAJOR__ << 16) | (__RTEMS_MINOR__ << 8) | __RTEMS_REVISION__) >= 0x050000)
-RTEMS_INLINE_ROUTINE void *grlib_malloc(size_t size)
+static inline void *grlib_malloc(size_t size)
{
return rtems_malloc(size);
}
-RTEMS_INLINE_ROUTINE void *grlib_calloc(size_t nelem, size_t elsize)
+static inline void *grlib_calloc(size_t nelem, size_t elsize)
{
return rtems_calloc(nelem, elsize);
}
#else
-RTEMS_INLINE_ROUTINE void *grlib_malloc(size_t size)
+static inline void *grlib_malloc(size_t size)
{
return malloc(size);
}
-RTEMS_INLINE_ROUTINE void *grlib_calloc(size_t nelem, size_t elsize)
+static inline void *grlib_calloc(size_t nelem, size_t elsize)
{
return calloc(nelem, elsize);
}
@@ -92,7 +111,7 @@ RTEMS_INLINE_ROUTINE void *grlib_calloc(size_t nelem, size_t elsize)
#ifdef __sparc__
-RTEMS_INLINE_ROUTINE unsigned char grlib_read_uncached8(unsigned int address)
+static inline unsigned char grlib_read_uncached8(unsigned int address)
{
unsigned char tmp;
__asm__ (" lduba [%1]1, %0 "
@@ -102,7 +121,7 @@ RTEMS_INLINE_ROUTINE unsigned char grlib_read_uncached8(unsigned int address)
return tmp;
}
-RTEMS_INLINE_ROUTINE unsigned short grlib_read_uncached16(unsigned int addr) {
+static inline unsigned short grlib_read_uncached16(unsigned int addr) {
unsigned short tmp;
__asm__ (" lduha [%1]1, %0 "
: "=r"(tmp)
@@ -112,7 +131,7 @@ RTEMS_INLINE_ROUTINE unsigned short grlib_read_uncached16(unsigned int addr) {
}
-RTEMS_INLINE_ROUTINE unsigned int grlib_read_uncached32(unsigned int address)
+static inline unsigned int grlib_read_uncached32(unsigned int address)
{
unsigned int tmp;
__asm__ (" lda [%1]1, %0 "
@@ -122,7 +141,7 @@ RTEMS_INLINE_ROUTINE unsigned int grlib_read_uncached32(unsigned int address)
return tmp;
}
-RTEMS_INLINE_ROUTINE uint64_t grlib_read_uncached64(uint64_t *address)
+static inline uint64_t grlib_read_uncached64(uint64_t *address)
{
uint64_t tmp;
__asm__ (" ldda [%1]1, %0 "
@@ -147,7 +166,7 @@ static __inline__ unsigned short grlib_read_uncached16(unsigned int address) {
return tmp;
}
-RTEMS_INLINE_ROUTINE unsigned int grlib_read_uncached32(unsigned int address)
+static inline unsigned int grlib_read_uncached32(unsigned int address)
{
unsigned int tmp = (*(volatile unsigned int *)(address));
return tmp;