diff options
author | Tiago Vignatti <tiago.vignatti@nokia.com> | 2009-12-23 17:03:37 +0200 |
---|---|---|
committer | Tiago Vignatti <tiago.vignatti@nokia.com> | 2009-12-23 17:03:37 +0200 |
commit | 44db032ab54a60475f7153a5fe25ca38a2994f82 (patch) | |
tree | c65a5078f47925642ee1600d3aaafd8e5a3a3c77 | |
parent | 7b368bbe39b6aa759717c74a4752d1942b02cc39 (diff) |
libx86: reorganize libx86 header
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
-rw-r--r-- | include/libx86.h | 54 |
1 files changed, 11 insertions, 43 deletions
diff --git a/include/libx86.h b/include/libx86.h index 71468ed..c9ff58c 100644 --- a/include/libx86.h +++ b/include/libx86.h @@ -24,13 +24,6 @@ OTHER DEALINGS IN THE SOFTWARE. */ -#ifndef LRMI_H -#define LRMI_H - -#ifndef LRMI_PREFIX -#define LRMI_PREFIX LRMI_ -#endif - #define I_S_DEFAULT_INT_VECT 0xFF065 #define SYS_SIZE 0x100000 #define SYS_BIOS 0xF0000 @@ -48,8 +41,6 @@ OTHER DEALINGS IN THE SOFTWARE. #define SEG_ADR(type, seg, reg) type((seg << 4) + (X86_##reg)) #define SEG_EADR(type, seg, reg) type((seg << 4) + (X86_E##reg)) - - /* int10 info structure */ typedef struct { int entityIndex; @@ -85,47 +76,24 @@ typedef struct _int10Mem { void(*wl)(xf86Int10InfoPtr, int, unsigned long); } int10MemRec, *int10MemPtr; -#define LRMI_CONCAT2(a, b) a ## b -#define LRMI_CONCAT(a, b) LRMI_CONCAT2(a, b) -#define LRMI_MAKENAME(a) LRMI_CONCAT(LRMI_PREFIX, a) - -/* - Initialize - returns 1 if sucessful, 0 for failure -*/ -#define LRMI_init LRMI_MAKENAME(init) -int -LRMI_init(void); +/* Initialize returns 1 if sucessful, 0 for failure */ +int LRMI_init(void); -void -LRMI_fini(xf86Int10InfoPtr pInt); +void LRMI_fini(xf86Int10InfoPtr pInt); -#define LRMI_setup LRMI_MAKENAME(setup) -void -LRMI_setup(xf86Int10InfoPtr pInt); +void LRMI_setup(xf86Int10InfoPtr pInt); /* Get the base address of the real memory address space block. */ -void * LRMI_base_addr(xf86Int10InfoPtr pInt, unsigned long addr); +void *LRMI_base_addr(xf86Int10InfoPtr pInt, unsigned long addr); -void -LRMI_set_exit_condition(xf86Int10InfoPtr pInt); +void LRMI_set_exit_condition(xf86Int10InfoPtr pInt); /* Simulate a 16 bit interrupt */ void LRMI_int(xf86Int10InfoPtr pInt); -/* - Allocate real mode memory - The returned block is paragraph (16 byte) aligned -*/ -#define LRMI_alloc_real LRMI_MAKENAME(alloc_real) -void * -LRMI_alloc_real(int size); - -/* - Free real mode memory -*/ -#define LRMI_free_real LRMI_MAKENAME(free_real) -void -LRMI_free_real(void *m); +/* Allocate real mode memory. The returned block is paragraph (16 byte) + aligned */ +void *LRMI_alloc_real(int size); -#endif +/* Free real mode memory */ +void LRMI_free_real(void *m); |