diff options
| author | Boris Gjenero <dreamlayers@rockbox.org> | 2011-12-19 20:12:52 +0000 |
|---|---|---|
| committer | Boris Gjenero <dreamlayers@rockbox.org> | 2011-12-19 20:12:52 +0000 |
| commit | fdc29d0ea4fbdd2cc1509a53122be7ec85cdb432 (patch) | |
| tree | 3855b7ea3a288059458b847b4bdfabd5c48ccce4 | |
| parent | 7d61376ef80bc6ac7a817201729ee1e612625ef6 (diff) | |
| download | rockbox-fdc29d0ea4fbdd2cc1509a53122be7ec85cdb432.zip rockbox-fdc29d0ea4fbdd2cc1509a53122be7ec85cdb432.tar.gz rockbox-fdc29d0ea4fbdd2cc1509a53122be7ec85cdb432.tar.bz2 rockbox-fdc29d0ea4fbdd2cc1509a53122be7ec85cdb432.tar.xz | |
Add more INIT_ATTR and add config.h includes to header files with INIT_ATTR.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31370 a1c6a512-1295-4272-9138-f99709370657
| -rw-r--r-- | apps/buffering.h | 3 | ||||
| -rw-r--r-- | apps/codec_thread.h | 3 | ||||
| -rw-r--r-- | apps/filetypes.h | 3 | ||||
| -rw-r--r-- | apps/gui/statusbar.h | 1 | ||||
| -rw-r--r-- | apps/gui/wps.h | 1 | ||||
| -rw-r--r-- | apps/misc.h | 2 | ||||
| -rw-r--r-- | apps/playlist.h | 1 | ||||
| -rw-r--r-- | apps/radio/radio.h | 1 | ||||
| -rw-r--r-- | apps/recorder/pcm_record.h | 4 | ||||
| -rw-r--r-- | apps/settings.h | 2 | ||||
| -rw-r--r-- | apps/tagcache.h | 1 | ||||
| -rw-r--r-- | apps/tagtree.h | 1 | ||||
| -rw-r--r-- | apps/tree.h | 1 | ||||
| -rw-r--r-- | apps/voice_thread.h | 4 | ||||
| -rw-r--r-- | firmware/export/disk.h | 3 | ||||
| -rw-r--r-- | firmware/export/mmc.h | 1 | ||||
| -rw-r--r-- | firmware/export/nand.h | 1 | ||||
| -rw-r--r-- | firmware/export/pcm-internal.h | 2 | ||||
| -rw-r--r-- | firmware/export/pcm.h | 1 | ||||
| -rw-r--r-- | firmware/export/power.h | 2 | ||||
| -rw-r--r-- | firmware/export/ramdisk.h | 1 | ||||
| -rw-r--r-- | firmware/export/scroll_engine.h | 1 | ||||
| -rw-r--r-- | firmware/export/sd.h | 1 | ||||
| -rw-r--r-- | firmware/export/tuner.h | 1 | ||||
| -rw-r--r-- | firmware/export/usb.h | 3 | ||||
| -rw-r--r-- | firmware/include/core_alloc.h | 3 | ||||
| -rw-r--r-- | firmware/target/arm/as3525/ascodec-target.h | 1 |
27 files changed, 39 insertions, 10 deletions
diff --git a/apps/buffering.h b/apps/buffering.h index ee3e7c9..6d52794 100644 --- a/apps/buffering.h +++ b/apps/buffering.h @@ -24,6 +24,7 @@ #include <sys/types.h> #include <stdbool.h> +#include "config.h" #include "appevents.h" @@ -47,7 +48,7 @@ enum data_type { /* Initialise the buffering subsystem */ -void buffering_init(void); +void buffering_init(void) INIT_ATTR; /* Reset the buffering system */ bool buffering_reset(char *buf, size_t buflen); diff --git a/apps/codec_thread.h b/apps/codec_thread.h index 65f64c3..c33284e 100644 --- a/apps/codec_thread.h +++ b/apps/codec_thread.h @@ -23,12 +23,13 @@ #define _CODEC_THREAD_H #include <stdbool.h> +#include "config.h" /* codec identity */ const char *get_codec_filename(int cod_spec); /* codec thread */ -void codec_thread_init(void); +void codec_thread_init(void) INIT_ATTR; /* Audio MUST be stopped before requesting callback! */ void codec_thread_do_callback(void (*fn)(void), diff --git a/apps/filetypes.h b/apps/filetypes.h index dd8993e..8c9e9a5 100644 --- a/apps/filetypes.h +++ b/apps/filetypes.h @@ -22,6 +22,7 @@ #define _FILEHANDLE_H_ #include <stdbool.h> +#include "config.h" #include <tree.h> /* using attribute bits not used by FAT (FAT uses lower 7) */ @@ -54,7 +55,7 @@ struct filetype { enum themable_icons icon; int voiceclip; }; -void tree_get_filetypes(const struct filetype**, int*); +void tree_get_filetypes(const struct filetype**, int*) INIT_ATTR; /* init the filetypes structs. uses audio buffer for storage, so call early in init... */ diff --git a/apps/gui/statusbar.h b/apps/gui/statusbar.h index 281cf3f..7ad07d0 100644 --- a/apps/gui/statusbar.h +++ b/apps/gui/statusbar.h @@ -22,6 +22,7 @@ #ifndef _GUI_STATUSBAR_H_ #define _GUI_STATUSBAR_H_ +#include "config.h" #include "status.h" #include "screen_access.h" #include "events.h" diff --git a/apps/gui/wps.h b/apps/gui/wps.h index f1ec746..a463b0e 100644 --- a/apps/gui/wps.h +++ b/apps/gui/wps.h @@ -21,6 +21,7 @@ #ifndef _WPS_H_ #define _WPS_H_ #include <stdbool.h> +#include "config.h" #include "screen_access.h" long gui_wps_show(void); diff --git a/apps/misc.h b/apps/misc.h index 4647898..6305bca 100644 --- a/apps/misc.h +++ b/apps/misc.h @@ -63,7 +63,7 @@ bool settings_parseline(char* line, char** name, char** value); long default_event_handler_ex(long event, void (*callback)(void *), void *parameter); long default_event_handler(long event); bool list_stop_handler(void); -void car_adapter_mode_init(void); +void car_adapter_mode_init(void) INIT_ATTR; extern int show_logo(void); int open_utf8(const char* pathname, int flags); diff --git a/apps/playlist.h b/apps/playlist.h index 4722be1..d19d9a7 100644 --- a/apps/playlist.h +++ b/apps/playlist.h @@ -23,6 +23,7 @@ #define __PLAYLIST_H__ #include <stdbool.h> +#include "config.h" #include "file.h" #include "kernel.h" #include "metadata.h" diff --git a/apps/radio/radio.h b/apps/radio/radio.h index d243cb6..8c4b394 100644 --- a/apps/radio/radio.h +++ b/apps/radio/radio.h @@ -21,6 +21,7 @@ #ifndef RADIO_H #define RADIO_H +#include "config.h" #ifndef FMRADIO_H #include "fmradio.h" #endif diff --git a/apps/recorder/pcm_record.h b/apps/recorder/pcm_record.h index 3d9bb4c..1ac6fae 100644 --- a/apps/recorder/pcm_record.h +++ b/apps/recorder/pcm_record.h @@ -22,6 +22,8 @@ #ifndef PCM_RECORD_H #define PCM_RECORD_H +#include "config.h" + /** Warnings **/ /* pcm (dma) buffer has overflowed */ #define PCMREC_W_PCM_BUFFER_OVF 0x00000001 @@ -49,7 +51,7 @@ void pcm_rec_error_clear(void); results for consistency with the hardware codec version */ unsigned long pcm_rec_status(void); unsigned long pcm_rec_get_warnings(void); -void pcm_rec_init(void); +void pcm_rec_init(void) INIT_ATTR; int pcm_rec_current_bitrate(void); int pcm_rec_encoder_afmt(void); /* AFMT_* value, AFMT_UNKNOWN if none */ int pcm_rec_rec_format(void); /* Format index or -1 otherwise */ diff --git a/apps/settings.h b/apps/settings.h index 2524dcc..7047b93 100644 --- a/apps/settings.h +++ b/apps/settings.h @@ -193,7 +193,7 @@ enum { ALARM_START_WPS = 0, #define SETTINGS_RTC (BIT_N(0)) /* only the settings from the RTC nonvolatile RAM */ #define SETTINGS_HD (BIT_N(1)) /* only the settings from the disk sector */ #define SETTINGS_ALL (SETTINGS_RTC|SETTINGS_HD) /* both */ -void settings_load(int which); +void settings_load(int which) INIT_ATTR; bool settings_load_config(const char* file, bool apply); void status_save(void); diff --git a/apps/tagcache.h b/apps/tagcache.h index 604e93b..44161cf 100644 --- a/apps/tagcache.h +++ b/apps/tagcache.h @@ -22,6 +22,7 @@ #ifndef _TAGCACHE_H #define _TAGCACHE_H +#include "config.h" #include "system.h" #include "metadata.h" diff --git a/apps/tagtree.h b/apps/tagtree.h index 26952b4..8369020 100644 --- a/apps/tagtree.h +++ b/apps/tagtree.h @@ -22,6 +22,7 @@ #ifndef _TAGTREE_H #define _TAGTREE_H +#include "config.h" #include "tagcache.h" #include "tree.h" diff --git a/apps/tree.h b/apps/tree.h index d3a128b..70494f8 100644 --- a/apps/tree.h +++ b/apps/tree.h @@ -24,6 +24,7 @@ #include <stdbool.h> #include <applimits.h> #include <file.h> +#include "config.h" #include "icon.h" /* keep this struct compatible (total size and name member) diff --git a/apps/voice_thread.h b/apps/voice_thread.h index 5f6547f..49b2f3f 100644 --- a/apps/voice_thread.h +++ b/apps/voice_thread.h @@ -21,6 +21,8 @@ #ifndef VOICE_THREAD_H #define VOICE_THREAD_H +#include "config.h" + void mp3_play_data(const unsigned char* start, int size, void (*get_more)(unsigned char** start, size_t* size)); void mp3_play_stop(void); @@ -30,7 +32,7 @@ bool mp3_is_playing(void); void voice_wait(void); void voice_stop(void); -void voice_thread_init(void); +void voice_thread_init(void) INIT_ATTR; #ifdef HAVE_PRIORITY_SCHEDULING void voice_thread_set_priority(int priority); #endif diff --git a/firmware/export/disk.h b/firmware/export/disk.h index ece0e26..8d6b41b 100644 --- a/firmware/export/disk.h +++ b/firmware/export/disk.h @@ -21,6 +21,7 @@ #ifndef _DISK_H_ #define _DISK_H_ +#include "config.h" #include "mv.h" /* for volume definitions */ struct partinfo { @@ -38,7 +39,7 @@ struct partinfo { struct partinfo* disk_init(IF_MD_NONVOID(int drive)); struct partinfo* disk_partinfo(int partition); -void disk_init_subsystem(void); /* Initialises mutexes */ +void disk_init_subsystem(void) INIT_ATTR; /* Initialises mutexes */ int disk_mount_all(void); /* returns the # of successful mounts */ int disk_mount(int drive); int disk_unmount_all(void); diff --git a/firmware/export/mmc.h b/firmware/export/mmc.h index 7e72cb0..4c7e9c0 100644 --- a/firmware/export/mmc.h +++ b/firmware/export/mmc.h @@ -23,6 +23,7 @@ #define __MMC_H__ #include <stdbool.h> +#include "config.h" #include "mv.h" /* for HAVE_MULTIDRIVE or not */ struct storage_info; diff --git a/firmware/export/nand.h b/firmware/export/nand.h index 13d5594..58751ab 100644 --- a/firmware/export/nand.h +++ b/firmware/export/nand.h @@ -23,6 +23,7 @@ #define __NAND_H__ #include <stdbool.h> +#include "config.h" #include "mv.h" /* for HAVE_MULTIDRIVE or not */ struct storage_info; diff --git a/firmware/export/pcm-internal.h b/firmware/export/pcm-internal.h index d881963..89d895f 100644 --- a/firmware/export/pcm-internal.h +++ b/firmware/export/pcm-internal.h @@ -22,6 +22,8 @@ #ifndef PCM_INTERNAL_H #define PCM_INTERNAL_H +#include "config.h" + /* Cheapo buffer align macro to align to the 16-16 PCM size */ #define ALIGN_AUDIOBUF(start, size) \ ({ (start) = (void *)(((uintptr_t)(start) + 3) & ~3); \ diff --git a/firmware/export/pcm.h b/firmware/export/pcm.h index 40d5afc..4a7a5b3 100644 --- a/firmware/export/pcm.h +++ b/firmware/export/pcm.h @@ -22,6 +22,7 @@ #define PCM_PLAYBACK_H #include <string.h> /* size_t */ +#include "config.h" #define DMA_REC_ERROR_DMA (-1) #ifdef HAVE_SPDIF_REC diff --git a/firmware/export/power.h b/firmware/export/power.h index 137f40c..d46b9ba 100644 --- a/firmware/export/power.h +++ b/firmware/export/power.h @@ -21,6 +21,8 @@ #ifndef _POWER_H_ #define _POWER_H_ +#include "config.h" + #if CONFIG_CHARGING enum power_input_flags { /* No external power source? Default. */ diff --git a/firmware/export/ramdisk.h b/firmware/export/ramdisk.h index 5135e38..c478c78 100644 --- a/firmware/export/ramdisk.h +++ b/firmware/export/ramdisk.h @@ -23,6 +23,7 @@ #define __RAMDISK_H__ #include <stdbool.h> +#include "config.h" #include "mv.h" /* for HAVE_MULTIDRIVE or not */ struct storage_info; diff --git a/firmware/export/scroll_engine.h b/firmware/export/scroll_engine.h index 0fe6fe4..55f4120 100644 --- a/firmware/export/scroll_engine.h +++ b/firmware/export/scroll_engine.h @@ -25,6 +25,7 @@ #ifndef __SCROLL_ENGINE_H__ #define __SCROLL_ENGINE_H__ +#include "config.h" #include <lcd.h> #include "file.h" diff --git a/firmware/export/sd.h b/firmware/export/sd.h index 43c961e..1c3c429 100644 --- a/firmware/export/sd.h +++ b/firmware/export/sd.h @@ -23,6 +23,7 @@ #define __SD_H__ #include <stdbool.h> +#include "config.h" #include "mv.h" /* for HAVE_MULTIDRIVE or not */ #ifdef HAVE_BOOTLOADER_USB_MODE diff --git a/firmware/export/tuner.h b/firmware/export/tuner.h index 6fedc0f..694da7c 100644 --- a/firmware/export/tuner.h +++ b/firmware/export/tuner.h @@ -22,6 +22,7 @@ #ifndef __TUNER_H__ #define __TUNER_H__ +#include "config.h" #include "hwcompat.h" /** Settings to the tuner layer **/ diff --git a/firmware/export/usb.h b/firmware/export/usb.h index 3baacc5..ae6d59b 100644 --- a/firmware/export/usb.h +++ b/firmware/export/usb.h @@ -21,6 +21,7 @@ #ifndef _USB_H_ #define _USB_H_ +#include "config.h" #include "kernel.h" #include "button.h" @@ -103,7 +104,7 @@ struct usb_transfer_completion_event_data void usb_init(void) INIT_ATTR; void usb_enable(bool on); void usb_attach(void); -void usb_start_monitoring(void); +void usb_start_monitoring(void) INIT_ATTR; void usb_close(void); void usb_acknowledge(long id); void usb_wait_for_disconnect(struct event_queue *q); diff --git a/firmware/include/core_alloc.h b/firmware/include/core_alloc.h index 0ac7e5b..d234947 100644 --- a/firmware/include/core_alloc.h +++ b/firmware/include/core_alloc.h @@ -3,12 +3,13 @@ #define __CORE_ALLOC_H__ #include <string.h> #include <stdbool.h> +#include "config.h" #include "buflib.h" /* All functions below are wrappers for functions in buflib.h, except * they have a predefined context */ -void core_allocator_init(void); +void core_allocator_init(void) INIT_ATTR; int core_alloc(const char* name, size_t size); int core_alloc_ex(const char* name, size_t size, struct buflib_callbacks *ops); int core_alloc_maximum(const char* name, size_t *size, struct buflib_callbacks *ops); diff --git a/firmware/target/arm/as3525/ascodec-target.h b/firmware/target/arm/as3525/ascodec-target.h index 7e1a3b7..ece8c21 100644 --- a/firmware/target/arm/as3525/ascodec-target.h +++ b/firmware/target/arm/as3525/ascodec-target.h @@ -27,6 +27,7 @@ #ifndef SIMULATOR +#include "config.h" #include "as3514.h" #include "kernel.h" /* for struct semaphore */ #include "clock-target.h" /* for AS3525_I2C_PRESCALER */ |