Use __always_inline to force inlining.
authorKevin O'Connor <kevin@koconnor.net>
Sun, 13 Apr 2008 20:57:16 +0000 (16:57 -0400)
committerKevin O'Connor <kevin@koconnor.net>
Sun, 13 Apr 2008 20:57:16 +0000 (16:57 -0400)
Before, inline was enough to force inlining.

src/ata.c
src/types.h

index 73f3cd7c899407593820227efb32470d73b74b53..a438f5420df528e3f1a7654b03bee2a94db073b7 100644 (file)
--- a/src/ata.c
+++ b/src/ata.c
@@ -76,7 +76,7 @@ await_ide(u8 when_done, u16 base, u16 timeout)
 }
 
 // Wait for ide state - pauses for one ata cycle first.
-static inline int
+static __always_inline int
 pause_await_ide(u8 when_done, u16 iobase1, u16 iobase2, u16 timeout)
 {
     // Wait one PIO transfer cycle.
@@ -226,7 +226,7 @@ insx_discard(int mode, int iobase1, int bytes)
 // and/or last block may be partially transferred.  This function is
 // inlined because all the callers use different forms and because the
 // large number of parameters would consume a lot of stack space.
-static inline int
+static __always_inline int
 ata_transfer(int driveid, int iswrite, int count, int blocksize
              , int skipfirst, int skiplast, void *far_buffer)
 {
@@ -386,7 +386,7 @@ send_atapi_cmd(int driveid, u8 *cmdbuf, u8 cmdlen, u16 blocksize)
 }
 
 // Low-level cdrom read atapi command transmit function.
-static inline int
+static __always_inline int
 send_cdrom_cmd(int driveid, u32 lba, u16 count)
 {
     u8 atacmd[12];
index faee59318f6f0ed6109a5ce26fc8538972554957..b52635277fbaa6b8802c7002df272a6b7e49d33f 100644 (file)
@@ -37,7 +37,7 @@ typedef u32 size_t;
 
 #define barrier() __asm__ __volatile__("": : :"memory")
 
-#define inline inline __attribute__((always_inline))
+#define __always_inline inline __attribute__((always_inline))
 
 #define __stringify_1(x)        #x
 #define __stringify(x)          __stringify_1(x)