Browse Source

Add always_inline attribute to force gcc to inline single-instruction

functions.
tags/v0.9.3
Michael Brown 17 years ago
parent
commit
817a446cc6
2 changed files with 4 additions and 4 deletions
  1. 2
    2
      src/include/gpxe/job.h
  2. 2
    2
      src/include/gpxe/xfer.h

+ 2
- 2
src/include/gpxe/job.h View File

@@ -98,7 +98,7 @@ static inline void job_init ( struct job_interface *job,
98 98
  * @v intf		Generic object communication interface
99 99
  * @ret job		Job control interface
100 100
  */
101
-static inline struct job_interface *
101
+static inline __attribute__ (( always_inline )) struct job_interface *
102 102
 intf_to_job ( struct interface *intf ) {
103 103
 	return container_of ( intf, struct job_interface, intf );
104 104
 }
@@ -109,7 +109,7 @@ intf_to_job ( struct interface *intf ) {
109 109
  * @v job		Job control interface
110 110
  * @ret dest		Destination interface
111 111
  */
112
-static inline struct job_interface *
112
+static inline __attribute__ (( always_inline )) struct job_interface *
113 113
 job_dest ( struct job_interface *job ) {
114 114
 	return intf_to_job ( job->intf.dest );
115 115
 }

+ 2
- 2
src/include/gpxe/xfer.h View File

@@ -138,7 +138,7 @@ static inline void xfer_init ( struct xfer_interface *xfer,
138 138
  * @v intf		Generic object communication interface
139 139
  * @ret xfer		Data transfer interface
140 140
  */
141
-static inline struct xfer_interface *
141
+static inline __attribute__ (( always_inline )) struct xfer_interface *
142 142
 intf_to_xfer ( struct interface *intf ) {
143 143
 	return container_of ( intf, struct xfer_interface, intf );
144 144
 }
@@ -149,7 +149,7 @@ intf_to_xfer ( struct interface *intf ) {
149 149
  * @v xfer		Data transfer interface
150 150
  * @ret dest		Destination interface
151 151
  */
152
-static inline struct xfer_interface *
152
+static inline __attribute__ (( always_inline )) struct xfer_interface *
153 153
 xfer_dest ( struct xfer_interface *xfer ) {
154 154
 	return intf_to_xfer ( xfer->intf.dest );
155 155
 }

Loading…
Cancel
Save