]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
Add always_inline attribute to force gcc to inline single-instruction
authorMichael Brown <mcb30@etherboot.org>
Tue, 1 May 2007 10:17:29 +0000 (10:17 +0000)
committerMichael Brown <mcb30@etherboot.org>
Tue, 1 May 2007 10:17:29 +0000 (10:17 +0000)
functions.

src/include/gpxe/job.h
src/include/gpxe/xfer.h

index 23077e7a672e7f484eb9ee87cbf94c8349a5b76e..2b33408fa56db7c885c0623a0ff84d7d5bb66521 100644 (file)
@@ -98,7 +98,7 @@ static inline void job_init ( struct job_interface *job,
  * @v intf             Generic object communication interface
  * @ret job            Job control interface
  */
-static inline struct job_interface *
+static inline __attribute__ (( always_inline )) struct job_interface *
 intf_to_job ( struct interface *intf ) {
        return container_of ( intf, struct job_interface, intf );
 }
@@ -109,7 +109,7 @@ intf_to_job ( struct interface *intf ) {
  * @v job              Job control interface
  * @ret dest           Destination interface
  */
-static inline struct job_interface *
+static inline __attribute__ (( always_inline )) struct job_interface *
 job_dest ( struct job_interface *job ) {
        return intf_to_job ( job->intf.dest );
 }
index 3c46cdf2d2e46fd72771fa6e86eb9683fd5bb46a..61f5d86cf5b42a39650578ef6c21dfcff38c9f84 100644 (file)
@@ -138,7 +138,7 @@ static inline void xfer_init ( struct xfer_interface *xfer,
  * @v intf             Generic object communication interface
  * @ret xfer           Data transfer interface
  */
-static inline struct xfer_interface *
+static inline __attribute__ (( always_inline )) struct xfer_interface *
 intf_to_xfer ( struct interface *intf ) {
        return container_of ( intf, struct xfer_interface, intf );
 }
@@ -149,7 +149,7 @@ intf_to_xfer ( struct interface *intf ) {
  * @v xfer             Data transfer interface
  * @ret dest           Destination interface
  */
-static inline struct xfer_interface *
+static inline __attribute__ (( always_inline )) struct xfer_interface *
 xfer_dest ( struct xfer_interface *xfer ) {
        return intf_to_xfer ( xfer->intf.dest );
 }