summaryrefslogtreecommitdiff
path: root/firmware/export
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/export')
-rw-r--r--firmware/export/debug.h2
-rw-r--r--firmware/export/logf.h2
-rw-r--r--firmware/export/panic.h2
-rw-r--r--firmware/export/system.h10
4 files changed, 4 insertions, 12 deletions
diff --git a/firmware/export/debug.h b/firmware/export/debug.h
index 9d85590..f7f0f32 100644
--- a/firmware/export/debug.h
+++ b/firmware/export/debug.h
@@ -21,7 +21,7 @@
#ifndef DEBUG_H
#define DEBUG_H
-#include "../include/_ansi.h"
+#include "gcc_extensions.h"
extern void debug_init(void);
extern void debugf(const char* fmt,...) ATTRIBUTE_PRINTF(1, 2);
diff --git a/firmware/export/logf.h b/firmware/export/logf.h
index 1aca29d..b57ae91 100644
--- a/firmware/export/logf.h
+++ b/firmware/export/logf.h
@@ -22,7 +22,7 @@
#define LOGF_H
#include <config.h>
#include <stdbool.h>
-#include "../include/_ansi.h"
+#include "gcc_extensions.h"
#include "debug.h"
#ifdef ROCKBOX_HAS_LOGF
diff --git a/firmware/export/panic.h b/firmware/export/panic.h
index 0808f3b..b0325aa 100644
--- a/firmware/export/panic.h
+++ b/firmware/export/panic.h
@@ -22,7 +22,7 @@
#ifndef __PANIC_H__
#define __PANIC_H__
-#include "_ansi.h"
+#include "gcc_extensions.h"
void panicf( const char *fmt, ... ) ATTRIBUTE_PRINTF(1, 2);
diff --git a/firmware/export/system.h b/firmware/export/system.h
index bbaf5d7..ce6277a 100644
--- a/firmware/export/system.h
+++ b/firmware/export/system.h
@@ -25,6 +25,7 @@
#include "cpu.h"
#include "stdbool.h"
#include "kernel.h"
+#include "gcc_extensions.h" /* for LIKELY/UNLIKELY */
extern void system_reboot (void);
/* Called from any UIE handler and panicf - wait for a key and return
@@ -198,15 +199,6 @@ int get_cpu_boost_counter(void);
#define TYPE_FROM_MEMBER(type, memberptr, membername) \
((type *)((intptr_t)(memberptr) - OFFSETOF(type, membername)))
-/* Use to give gcc hints on which branch is most likely taken */
-#if defined(__GNUC__) && __GNUC__ >= 3
-#define LIKELY(x) __builtin_expect(!!(x), 1)
-#define UNLIKELY(x) __builtin_expect(!!(x), 0)
-#else
-#define LIKELY(x) (x)
-#define UNLIKELY(x) (x)
-#endif
-
/* returns index of first set bit or 32 if no bits are set */
int find_first_set_bit(uint32_t val);