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 9d85590136..f7f0f32426 100644
--- a/firmware/export/debug.h
+++ b/firmware/export/debug.h
@@ -21,7 +21,7 @@
21#ifndef DEBUG_H 21#ifndef DEBUG_H
22#define DEBUG_H 22#define DEBUG_H
23 23
24#include "../include/_ansi.h" 24#include "gcc_extensions.h"
25 25
26extern void debug_init(void); 26extern void debug_init(void);
27extern void debugf(const char* fmt,...) ATTRIBUTE_PRINTF(1, 2); 27extern void debugf(const char* fmt,...) ATTRIBUTE_PRINTF(1, 2);
diff --git a/firmware/export/logf.h b/firmware/export/logf.h
index 1aca29d5ba..b57ae91872 100644
--- a/firmware/export/logf.h
+++ b/firmware/export/logf.h
@@ -22,7 +22,7 @@
22#define LOGF_H 22#define LOGF_H
23#include <config.h> 23#include <config.h>
24#include <stdbool.h> 24#include <stdbool.h>
25#include "../include/_ansi.h" 25#include "gcc_extensions.h"
26#include "debug.h" 26#include "debug.h"
27 27
28#ifdef ROCKBOX_HAS_LOGF 28#ifdef ROCKBOX_HAS_LOGF
diff --git a/firmware/export/panic.h b/firmware/export/panic.h
index 0808f3b300..b0325aaeb7 100644
--- a/firmware/export/panic.h
+++ b/firmware/export/panic.h
@@ -22,7 +22,7 @@
22#ifndef __PANIC_H__ 22#ifndef __PANIC_H__
23#define __PANIC_H__ 23#define __PANIC_H__
24 24
25#include "_ansi.h" 25#include "gcc_extensions.h"
26 26
27void panicf( const char *fmt, ... ) ATTRIBUTE_PRINTF(1, 2); 27void panicf( const char *fmt, ... ) ATTRIBUTE_PRINTF(1, 2);
28 28
diff --git a/firmware/export/system.h b/firmware/export/system.h
index bbaf5d74df..ce6277ac7a 100644
--- a/firmware/export/system.h
+++ b/firmware/export/system.h
@@ -25,6 +25,7 @@
25#include "cpu.h" 25#include "cpu.h"
26#include "stdbool.h" 26#include "stdbool.h"
27#include "kernel.h" 27#include "kernel.h"
28#include "gcc_extensions.h" /* for LIKELY/UNLIKELY */
28 29
29extern void system_reboot (void); 30extern void system_reboot (void);
30/* Called from any UIE handler and panicf - wait for a key and return 31/* Called from any UIE handler and panicf - wait for a key and return
@@ -198,15 +199,6 @@ int get_cpu_boost_counter(void);
198#define TYPE_FROM_MEMBER(type, memberptr, membername) \ 199#define TYPE_FROM_MEMBER(type, memberptr, membername) \
199 ((type *)((intptr_t)(memberptr) - OFFSETOF(type, membername))) 200 ((type *)((intptr_t)(memberptr) - OFFSETOF(type, membername)))
200 201
201/* Use to give gcc hints on which branch is most likely taken */
202#if defined(__GNUC__) && __GNUC__ >= 3
203#define LIKELY(x) __builtin_expect(!!(x), 1)
204#define UNLIKELY(x) __builtin_expect(!!(x), 0)
205#else
206#define LIKELY(x) (x)
207#define UNLIKELY(x) (x)
208#endif
209
210/* returns index of first set bit or 32 if no bits are set */ 202/* returns index of first set bit or 32 if no bits are set */
211int find_first_set_bit(uint32_t val); 203int find_first_set_bit(uint32_t val);
212 204