DragonFly commits List (threaded) for 2003-08
cvs commit: src/sys/sys cdefs.h
hmp 2003/08/27 10:13:22 PDT
Add two useful macros that I have been meaning to add for quite
The __cachealign macro can be used for cache line aligning structures
of small to medium size. It aligns the particular structure or
storage type to a system default cache line alignment, thus giving us
a much more better cache utilization by making the hardware work at
its best burst speeds.
The __usereg macro can/should be used when a function contains
arguments not more than 3. It can be very useful to us due to the
message-passing nature of the kernel.
NOTE: I have not modified any other source files to make use of this
macro yet. After I do some analysis, headers in sys/ which contain
small to medium sized structures will be modified to use the
NOTE: No source files have been modified to make use of the __usereg
macro yet. This process can be automated, because the maximum number
of arguments that apply to this macro is 3.
Reviewed by: Matt
Revision Changes Path
1.5 +51 -0 src/sys/sys/cdefs.h