summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2014-01-05 01:22:19 +0100
committerThomas Martitz <kugel@rockbox.org>2014-01-05 19:35:23 +0100
commit281d1fadb34242347da379ddeba75d2195148b4c (patch)
treedd1d1fb044d4e905c56b73e94d88a47ccc215a71
parentdd7b14173647c6e3326d705e5c4d802a35711030 (diff)
downloadrockbox-281d1fadb34242347da379ddeba75d2195148b4c.tar.gz
rockbox-281d1fadb34242347da379ddeba75d2195148b4c.zip
Do not include kernel.h in system.h.
system.h doesn't need it on its own and this change makes it less dependant on Rockbox internals. Change-Id: I4e1e4108a52a7b599627a829204eb82b392fc6d6
-rw-r--r--apps/codec_thread.c1
-rw-r--r--apps/rbcodecconfig.h3
-rw-r--r--apps/recorder/bmp.c4
-rw-r--r--apps/recorder/resize.c8
-rw-r--r--apps/voice_thread.c2
-rw-r--r--firmware/buflib.c1
-rw-r--r--firmware/drivers/audio/as3514.c2
-rw-r--r--firmware/export/system.h5
-rw-r--r--firmware/font.c10
-rw-r--r--firmware/general.c5
-rw-r--r--firmware/target/arm/as3525/debug-as3525.c3
-rw-r--r--firmware/target/arm/as3525/lcd-fuze.c5
-rw-r--r--firmware/target/arm/as3525/sansa-fuzev2/button-fuzev2.c1
-rw-r--r--firmware/target/arm/pp/system-target.h3
-rw-r--r--firmware/target/hosted/android/pcm-android.c3
-rw-r--r--firmware/target/hosted/kernel-unix.c3
16 files changed, 41 insertions, 18 deletions
diff --git a/apps/codec_thread.c b/apps/codec_thread.c
index 8f9f5a3c74..f2039d10e6 100644
--- a/apps/codec_thread.c
+++ b/apps/codec_thread.c
@@ -20,6 +20,7 @@
20 * KIND, either express or implied. 20 * KIND, either express or implied.
21 * 21 *
22 ****************************************************************************/ 22 ****************************************************************************/
23
23#include "config.h" 24#include "config.h"
24#include "system.h" 25#include "system.h"
25#include "kernel.h" 26#include "kernel.h"
diff --git a/apps/rbcodecconfig.h b/apps/rbcodecconfig.h
index c92415979f..92584187ea 100644
--- a/apps/rbcodecconfig.h
+++ b/apps/rbcodecconfig.h
@@ -18,6 +18,9 @@
18 * {,U}INT{8,16,32,64}_{MIN,MAX} */ 18 * {,U}INT{8,16,32,64}_{MIN,MAX} */
19#include "system.h" 19#include "system.h"
20 20
21/* HZ, TIME_AFTER */
22#include "kernel.h"
23
21/* Structure to record some info during processing call */ 24/* Structure to record some info during processing call */
22struct dsp_loop_context 25struct dsp_loop_context
23{ 26{
diff --git a/apps/recorder/bmp.c b/apps/recorder/bmp.c
index e4eb588eb3..dfd6a0474e 100644
--- a/apps/recorder/bmp.c
+++ b/apps/recorder/bmp.c
@@ -38,6 +38,7 @@
38 ahead by whole lines, or read the next chunk of the current line 38 ahead by whole lines, or read the next chunk of the current line
39*/ 39*/
40 40
41#define ROCKBOX_DEBUG_BMP_LOADER
41#include <stdio.h> 42#include <stdio.h>
42#include <stdlib.h> 43#include <stdlib.h>
43#include <string.h> 44#include <string.h>
@@ -53,7 +54,7 @@
53#include "lcd-remote.h" 54#include "lcd-remote.h"
54#endif 55#endif
55#ifdef ROCKBOX_DEBUG_BMP_LOADER 56#ifdef ROCKBOX_DEBUG_BMP_LOADER
56#define BDEBUGF DEBUGF 57#define BDEBUGF printf
57#else 58#else
58#define BDEBUGF(...) 59#define BDEBUGF(...)
59#endif 60#endif
@@ -774,6 +775,7 @@ int read_bmp_fd(int fd,
774#endif 775#endif
775 .alpha_detected = false, .first_alpha_byte = 0x80, 776 .alpha_detected = false, .first_alpha_byte = 0x80,
776 .order = order, 777 .order = order,
778 .buf = NULL,
777 }; 779 };
778 780
779#if (LCD_DEPTH > 1 || (defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1)) && \ 781#if (LCD_DEPTH > 1 || (defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1)) && \
diff --git a/apps/recorder/resize.c b/apps/recorder/resize.c
index 1e45b66a24..32384537d4 100644
--- a/apps/recorder/resize.c
+++ b/apps/recorder/resize.c
@@ -31,12 +31,14 @@
31 * 31 *
32 ****************************************************************************/ 32 ****************************************************************************/
33 33
34#include <system.h>
35#include <stdio.h> 34#include <stdio.h>
36#include <stdlib.h> 35#include <stdlib.h>
37#include <string.h> 36#include <string.h>
38#include <general.h> 37#include <stdint.h>
39#include "inttypes.h" 38
39#include "general.h"
40#include "kernel.h"
41#include "system.h"
40#ifndef PLUGIN 42#ifndef PLUGIN
41#include "debug.h" 43#include "debug.h"
42#endif 44#endif
diff --git a/apps/voice_thread.c b/apps/voice_thread.c
index 7788f659b0..3b6fe5b3ba 100644
--- a/apps/voice_thread.c
+++ b/apps/voice_thread.c
@@ -18,8 +18,10 @@
18 * KIND, either express or implied. 18 * KIND, either express or implied.
19 * 19 *
20 ****************************************************************************/ 20 ****************************************************************************/
21
21#include "config.h" 22#include "config.h"
22#include "system.h" 23#include "system.h"
24#include "kernel.h"
23#include "core_alloc.h" 25#include "core_alloc.h"
24#include "thread.h" 26#include "thread.h"
25#include "appevents.h" 27#include "appevents.h"
diff --git a/firmware/buflib.c b/firmware/buflib.c
index d7a24b8722..db09d3efc9 100644
--- a/firmware/buflib.c
+++ b/firmware/buflib.c
@@ -27,6 +27,7 @@
27 27
28#include <stdlib.h> /* for abs() */ 28#include <stdlib.h> /* for abs() */
29#include <stdio.h> /* for snprintf() */ 29#include <stdio.h> /* for snprintf() */
30#include <stddef.h> /* for ptrdiff_t */
30#include "buflib.h" 31#include "buflib.h"
31#include "string-extra.h" /* strlcpy() */ 32#include "string-extra.h" /* strlcpy() */
32#include "debug.h" 33#include "debug.h"
diff --git a/firmware/drivers/audio/as3514.c b/firmware/drivers/audio/as3514.c
index 1f79277423..6f531be095 100644
--- a/firmware/drivers/audio/as3514.c
+++ b/firmware/drivers/audio/as3514.c
@@ -21,9 +21,11 @@
21 * KIND, either express or implied. 21 * KIND, either express or implied.
22 * 22 *
23 ****************************************************************************/ 23 ****************************************************************************/
24
24#include "cpu.h" 25#include "cpu.h"
25#include "debug.h" 26#include "debug.h"
26#include "system.h" 27#include "system.h"
28#include "kernel.h"
27#include "audio.h" 29#include "audio.h"
28#include "sound.h" 30#include "sound.h"
29 31
diff --git a/firmware/export/system.h b/firmware/export/system.h
index b1959c496d..25f9287618 100644
--- a/firmware/export/system.h
+++ b/firmware/export/system.h
@@ -22,9 +22,10 @@
22#ifndef __SYSTEM_H__ 22#ifndef __SYSTEM_H__
23#define __SYSTEM_H__ 23#define __SYSTEM_H__
24 24
25#include <stdbool.h>
26#include <stdint.h>
27
25#include "cpu.h" 28#include "cpu.h"
26#include "stdbool.h"
27#include "kernel.h"
28#include "gcc_extensions.h" /* for LIKELY/UNLIKELY */ 29#include "gcc_extensions.h" /* for LIKELY/UNLIKELY */
29 30
30extern void system_reboot (void); 31extern void system_reboot (void);
diff --git a/firmware/font.c b/firmware/font.c
index 06f104054f..e7a574f0dd 100644
--- a/firmware/font.c
+++ b/firmware/font.c
@@ -24,14 +24,16 @@
24 * loaded at startup, as well as their mapping into 24 * loaded at startup, as well as their mapping into
25 * the FONT_SYSFIXED, FONT_UI and FONT_MP3 ids. 25 * the FONT_SYSFIXED, FONT_UI and FONT_MP3 ids.
26 */ 26 */
27#include "config.h"
28
29#include <stdio.h> 27#include <stdio.h>
30#include <string.h> 28#include <string.h>
31#include <stdlib.h> 29#include <stdlib.h>
32#include "inttypes.h" 30#include <stdint.h>
33#include "lcd.h" 31#include <stddef.h>
32
33#include "config.h"
34#include "system.h" 34#include "system.h"
35#include "kernel.h"
36#include "lcd.h"
35#include "font.h" 37#include "font.h"
36#include "file.h" 38#include "file.h"
37#include "core_alloc.h" 39#include "core_alloc.h"
diff --git a/firmware/general.c b/firmware/general.c
index 8e6d5af9a0..d6c1d2f465 100644
--- a/firmware/general.c
+++ b/firmware/general.c
@@ -19,8 +19,10 @@
19 * 19 *
20 ****************************************************************************/ 20 ****************************************************************************/
21 21
22#include "config.h"
23#include <stdio.h> 22#include <stdio.h>
23#include "config.h"
24#include "system.h"
25#include "kernel.h"
24#include "general.h" 26#include "general.h"
25#include "file.h" 27#include "file.h"
26#include "dir.h" 28#include "dir.h"
@@ -28,7 +30,6 @@
28#include "limits.h" 30#include "limits.h"
29#include "stdlib.h" 31#include "stdlib.h"
30#include "string-extra.h" 32#include "string-extra.h"
31#include "system.h"
32#include "time.h" 33#include "time.h"
33#include "timefuncs.h" 34#include "timefuncs.h"
34 35
diff --git a/firmware/target/arm/as3525/debug-as3525.c b/firmware/target/arm/as3525/debug-as3525.c
index 514eebd390..ab70f73165 100644
--- a/firmware/target/arm/as3525/debug-as3525.c
+++ b/firmware/target/arm/as3525/debug-as3525.c
@@ -20,10 +20,11 @@
20 ****************************************************************************/ 20 ****************************************************************************/
21 21
22#include <stdbool.h> 22#include <stdbool.h>
23#include "system.h"
24#include "kernel.h"
23#include "button.h" 25#include "button.h"
24#include "lcd.h" 26#include "lcd.h"
25#include "font.h" 27#include "font.h"
26#include "system.h"
27#include "cpu.h" 28#include "cpu.h"
28#include "pl180.h" 29#include "pl180.h"
29#include "ascodec.h" 30#include "ascodec.h"
diff --git a/firmware/target/arm/as3525/lcd-fuze.c b/firmware/target/arm/as3525/lcd-fuze.c
index b2033738b6..df4d668ab0 100644
--- a/firmware/target/arm/as3525/lcd-fuze.c
+++ b/firmware/target/arm/as3525/lcd-fuze.c
@@ -19,11 +19,12 @@
19 * KIND, either express or implied. 19 * KIND, either express or implied.
20 * 20 *
21 ****************************************************************************/ 21 ****************************************************************************/
22#include "config.h"
23 22
23#include "config.h"
24#include "cpu.h" 24#include "cpu.h"
25#include "lcd.h"
26#include "system.h" 25#include "system.h"
26#include "kernel.h"
27#include "lcd.h"
27#include "file.h" 28#include "file.h"
28#include "clock-target.h" 29#include "clock-target.h"
29#include "dbop-as3525.h" 30#include "dbop-as3525.h"
diff --git a/firmware/target/arm/as3525/sansa-fuzev2/button-fuzev2.c b/firmware/target/arm/as3525/sansa-fuzev2/button-fuzev2.c
index 8244c475fa..1b30e112fd 100644
--- a/firmware/target/arm/as3525/sansa-fuzev2/button-fuzev2.c
+++ b/firmware/target/arm/as3525/sansa-fuzev2/button-fuzev2.c
@@ -21,6 +21,7 @@
21 21
22#include "config.h" 22#include "config.h"
23#include "system.h" 23#include "system.h"
24#include "kernel.h"
24#include "button.h" 25#include "button.h"
25#include "backlight.h" 26#include "backlight.h"
26 27
diff --git a/firmware/target/arm/pp/system-target.h b/firmware/target/arm/pp/system-target.h
index 84419edd77..742044b7be 100644
--- a/firmware/target/arm/pp/system-target.h
+++ b/firmware/target/arm/pp/system-target.h
@@ -22,9 +22,10 @@
22#ifndef SYSTEM_TARGET_H 22#ifndef SYSTEM_TARGET_H
23#define SYSTEM_TARGET_H 23#define SYSTEM_TARGET_H
24 24
25#include <stdbool.h>
25#include "config.h" 26#include "config.h"
26#include "system-arm.h" 27#include "system-arm.h"
27#include <stdbool.h> 28#include "kernel.h"
28 29
29/* TODO: This header could be split in 2 */ 30/* TODO: This header could be split in 2 */
30 31
diff --git a/firmware/target/hosted/android/pcm-android.c b/firmware/target/hosted/android/pcm-android.c
index 0608e971a7..23a003ff73 100644
--- a/firmware/target/hosted/android/pcm-android.c
+++ b/firmware/target/hosted/android/pcm-android.c
@@ -22,8 +22,9 @@
22#include <jni.h> 22#include <jni.h>
23#include <stdbool.h> 23#include <stdbool.h>
24#define _SYSTEM_WITH_JNI /* for getJavaEnvironment */ 24#define _SYSTEM_WITH_JNI /* for getJavaEnvironment */
25#include <system.h>
26#include <pthread.h> 25#include <pthread.h>
26#include "system.h"
27#include "kernel.h"
27#include "debug.h" 28#include "debug.h"
28#include "pcm.h" 29#include "pcm.h"
29#include "pcm-internal.h" 30#include "pcm-internal.h"
diff --git a/firmware/target/hosted/kernel-unix.c b/firmware/target/hosted/kernel-unix.c
index a0167d46c5..e3c492a8cc 100644
--- a/firmware/target/hosted/kernel-unix.c
+++ b/firmware/target/hosted/kernel-unix.c
@@ -26,8 +26,10 @@
26#include <errno.h> 26#include <errno.h>
27#include <unistd.h> 27#include <unistd.h>
28#include <pthread.h> 28#include <pthread.h>
29
29#include "config.h" 30#include "config.h"
30#include "system.h" 31#include "system.h"
32#include "kernel.h"
31#include "button.h" 33#include "button.h"
32#include "audio.h" 34#include "audio.h"
33#include "panic.h" 35#include "panic.h"
@@ -165,4 +167,3 @@ void timer_unregister(void)
165 timer_delete(timer_tid); 167 timer_delete(timer_tid);
166 timer_prio = -1; 168 timer_prio = -1;
167} 169}
168