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
This commit is contained in:
parent
7d61376ef8
commit
fdc29d0ea4
|
@ -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);
|
||||
|
|
|
@ -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),
|
||||
|
|
|
@ -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... */
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
#define __PLAYLIST_H__
|
||||
|
||||
#include <stdbool.h>
|
||||
#include "config.h"
|
||||
#include "file.h"
|
||||
#include "kernel.h"
|
||||
#include "metadata.h"
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
#ifndef RADIO_H
|
||||
#define RADIO_H
|
||||
|
||||
#include "config.h"
|
||||
#ifndef FMRADIO_H
|
||||
#include "fmradio.h"
|
||||
#endif
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
#ifndef _TAGCACHE_H
|
||||
#define _TAGCACHE_H
|
||||
|
||||
#include "config.h"
|
||||
#include "system.h"
|
||||
#include "metadata.h"
|
||||
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
#ifndef _TAGTREE_H
|
||||
#define _TAGTREE_H
|
||||
|
||||
#include "config.h"
|
||||
#include "tagcache.h"
|
||||
#include "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)
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
#define __MMC_H__
|
||||
|
||||
#include <stdbool.h>
|
||||
#include "config.h"
|
||||
#include "mv.h" /* for HAVE_MULTIDRIVE or not */
|
||||
|
||||
struct storage_info;
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
#define __NAND_H__
|
||||
|
||||
#include <stdbool.h>
|
||||
#include "config.h"
|
||||
#include "mv.h" /* for HAVE_MULTIDRIVE or not */
|
||||
|
||||
struct storage_info;
|
||||
|
|
|
@ -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); \
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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. */
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
#define __RAMDISK_H__
|
||||
|
||||
#include <stdbool.h>
|
||||
#include "config.h"
|
||||
#include "mv.h" /* for HAVE_MULTIDRIVE or not */
|
||||
|
||||
struct storage_info;
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
#ifndef __SCROLL_ENGINE_H__
|
||||
#define __SCROLL_ENGINE_H__
|
||||
|
||||
#include "config.h"
|
||||
#include <lcd.h>
|
||||
#include "file.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
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
#ifndef __TUNER_H__
|
||||
#define __TUNER_H__
|
||||
|
||||
#include "config.h"
|
||||
#include "hwcompat.h"
|
||||
|
||||
/** Settings to the tuner layer **/
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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 */
|
||||
|
|
Loading…
Reference in New Issue