mirror of
https://github.com/drasko/codezero.git
synced 2026-04-17 17:29:04 +02:00
Changed unit macro to use section attribute directly.`
This commit is contained in:
@@ -17,19 +17,6 @@
|
|||||||
|
|
||||||
/* use this to place code/data in a certain section */
|
/* use this to place code/data in a certain section */
|
||||||
#define SECTION(x) __attribute__((section(x)))
|
#define SECTION(x) __attribute__((section(x)))
|
||||||
#define UNIT(x) __attribute__((section(".data." x)))
|
|
||||||
|
|
||||||
/*
|
|
||||||
* use WEAK to specifiy a weak function which can be replaced
|
|
||||||
* by a architecture specific optimization
|
|
||||||
* example: void WEAK bla()
|
|
||||||
*/
|
|
||||||
#define WEAK __attribute__(( weak ))
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Marks a function as noreturn.
|
|
||||||
*/
|
|
||||||
#define NORETURN __attribute__(( noreturn ))
|
|
||||||
|
|
||||||
/* Functions for critical path optimizations */
|
/* Functions for critical path optimizations */
|
||||||
#if (__GNUC__ >= 3)
|
#if (__GNUC__ >= 3)
|
||||||
@@ -110,5 +97,4 @@
|
|||||||
printk(msg); \
|
printk(msg); \
|
||||||
BUG(); \
|
BUG(); \
|
||||||
} while(0)
|
} while(0)
|
||||||
#endif /* !__MACROS_H__ */
|
#endif /* __MACROS_H__ */
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
#include INC_ARCH(bootdesc.h)
|
#include INC_ARCH(bootdesc.h)
|
||||||
|
|
||||||
/* FIXME: Change the unit name */
|
/* FIXME: Change the unit name */
|
||||||
UNIT("kip") struct kip kip;
|
__attribute__ ((section(".data.kip"))) struct kip kip;
|
||||||
|
|
||||||
/* Error-checked kernel data request call */
|
/* Error-checked kernel data request call */
|
||||||
int __sys_kread(int rd, void *dest)
|
int __sys_kread(int rd, void *dest)
|
||||||
|
|||||||
Reference in New Issue
Block a user