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

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

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

Loading…
Cancel
Save