cvs commit: src/sys/sys cdefs.h

Hiten Pandya hmp at crater.dragonflybsd.org
Wed Aug 27 10:13:47 PDT 2003


hmp         2003/08/27 10:13:22 PDT

  Modified files:
    sys/sys              cdefs.h 
  Log:
  Add two useful macros that I have been meaning to add for quite
  some time.
  
  __cachealign:
  
  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.
  
  __usereg:
  
  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
  __cachealign macro.
  
  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






More information about the Commits mailing list