DragonFly BSD
DragonFly commits List (threaded) for 2003-08
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

cvs commit: src/sys/sys cdefs.h

From: Hiten Pandya <hmp@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 27 Aug 2003 10:13:22 -0700 (PDT)

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

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

[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]