]> git.proxmox.com Git - mirror_spl-debian.git/blobdiff - include/sys/sysmacros.h
Imported Upstream version 0.6.4.1
[mirror_spl-debian.git] / include / sys / sysmacros.h
index b4778b70e83fc0437879f456edc2c893ada64792..c56d7e12a6203051abf79213ac88e49d14f55cac 100644 (file)
 #define minclsyspri                    (MAX_RT_PRIO)
 #define maxclsyspri                    (MAX_PRIO-1)
 
+#ifndef NICE_TO_PRIO
 #define NICE_TO_PRIO(nice)             (MAX_RT_PRIO + (nice) + 20)
+#endif
+#ifndef PRIO_TO_NICE
 #define PRIO_TO_NICE(prio)             ((prio) - MAX_RT_PRIO - 20)
+#endif
 
-/* Missing macros
+/*
+ * Missing macros
  */
+#ifndef PAGESIZE
 #define PAGESIZE                       PAGE_SIZE
+#endif
 
 /* from Solaris sys/byteorder.h */
 #define BSWAP_8(x)     ((x) & 0xff)
 /* Missing globals */
 extern char spl_version[32];
 extern unsigned long spl_hostid;
-extern char hw_serial[11];
 
 /* Missing misc functions */
-extern int highbit(unsigned long i);
 extern uint32_t zone_get_hostid(void *zone);
 extern void spl_setup(void);
 extern void spl_cleanup(void);
 
-#define makedevice(maj,min) makedev(maj,min)
+#define        highbit64(x)            fls64(x)
+#define        makedevice(maj,min)     makedev(maj,min)
 
 /* common macros */
 #ifndef MIN
@@ -169,6 +175,9 @@ extern void spl_cleanup(void);
 #ifndef roundup
 #define roundup(x, y)          ((((x) + ((y) - 1)) / (y)) * (y))
 #endif
+#ifndef howmany
+#define howmany(x, y)          (((x) + ((y) - 1)) / (y))
+#endif
 
 /*
  * Compatibility macros/typedefs needed for Solaris -> Linux port