Cleanup cdefs.h

Jeroen Ruigrok/asmodai asmodai at wxs.nl
Thu Jul 22 04:26:44 PDT 2004


We added these macros 10 months ago but aren't using them.

Will we use them in the forseeable future?  Otherwise I'd advocate on
removing them and just adding them back in whenever we start to use them for
real.

Yes, I am on a dead code removal spree in general.

-- 
Jeroen Ruigrok van der Werven <asmodai(at)wxs.nl> / asmodai / kita no mono
Free Tibet! http://www.savetibet.org/ | http://www.tibet.nu/
http://www.tendra.org/   | http://diary.in-nomine.org/
But touch my tears, with your lips, touch my world, with your fingertips,
and we can have forever...
Index: src/sys/sys/cdefs.h
===================================================================
RCS file: /home/ncvs/DragonFly/src/sys/sys/cdefs.h,v
retrieving revision 1.10
diff -u -r1.10 cdefs.h
--- src/sys/sys/cdefs.h	20 Mar 2004 16:27:41 -0000	1.10
+++ src/sys/sys/cdefs.h	22 Jul 2004 11:16:05 -0000
@@ -61,20 +61,6 @@
 #endif
 
 /*
- * The VM_CACHELINE_SIZE macro defines the common cache line alignment
- * size that can be found across most recent and somewhat latest Intel
- * hardware, i.e. L1 cache sizes etc.
- *
- * If needed, this value can be TUNED.  Suitable values for this macro
- * are 32, 64 and 128 bytes.  The unit of measurement for this macro is
- * bytes.
- * 
- * XXX: This macro and related macros will eventually move to a MD
- * header, but currently, we do need such a hierarchy.
- */
-#define	VM_CACHELINE_SIZE	32
-
-/*
  * The __CONCAT macro is used to concatenate parts of symbol names, e.g.
  * with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo.
  * The __CONCAT macro is a bit tricky to use if it must work in non-ANSI
@@ -244,43 +230,6 @@
 #define	__printf0like(fmtarg, firstvararg)
 #endif
 
-/*
- * Handy GCC based macros:
- *
- * 	__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 - USAGE INFORMATION!!
- *
- * The __cachealign macro should not be used for data structures that are
- * as big struct proc, struct vnode, struct thread, and other structs which
- * are as big as them; simply because it will be useless in that case.
- *
- * The __usereg macro should be used whenever possible, i.e., when a function
- * does not exceed more than 3 arguments, and should not be used for vararg
- * type functions.
- *
- * In other words, AVOID MISUSE OF THESE MACROS. :-)
- */
-#ifdef __GNUC__
-#define	__cachealign	__attribute__((aligned(VM_CACHELINE_SIZE)))
-#define	__usereg     	__attribute__((regparm(3)))
-#else
-#define	__cachealign
-#define	__usereg
-#endif
-
 #ifdef __GNUC__
 #define __strong_reference(sym,aliassym)	\
 	extern __typeof (sym) aliassym __attribute__ ((__alias__ (#sym)));




More information about the Submit mailing list