X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Finclude%2Fliblustre.h;h=79ffd505c18ecf45fa9dc130b5e6f44947701510;hb=14765d2816bafa2a08879ece0e33bf8c97f84948;hp=c562e75ee4c4737f7ce2f45b387b3fc06b4a9a87;hpb=83f755685e50da38cb916ae4fb83f62429b5d568;p=fs%2Flustre-release.git diff --git a/lustre/include/liblustre.h b/lustre/include/liblustre.h index c562e75..79ffd50 100644 --- a/lustre/include/liblustre.h +++ b/lustre/include/liblustre.h @@ -34,6 +34,10 @@ #define __LINUX_SPINLOCK_H #endif +#include +#include +#include + #include #ifdef HAVE_STDINT_H # include @@ -61,9 +65,9 @@ #include #include +#include #include #include -#include #include #ifndef _IOWR @@ -74,18 +78,12 @@ #ifdef __CYGWIN__ -#define CFS_PAGE_SHIFT 12 -#define CFS_PAGE_SIZE (1UL << CFS_PAGE_SHIFT) -#define CFS_PAGE_MASK (~((__u64)CFS_PAGE_SIZE-1)) #define loff_t long long #define ERESTART 2001 typedef unsigned short umode_t; #endif -#ifndef CURRENT_SECONDS -# define CURRENT_SECONDS time(0) -#endif #ifndef ARRAY_SIZE #define ARRAY_SIZE(a) ((sizeof (a))/(sizeof ((a)[0]))) @@ -166,24 +164,6 @@ struct file; /* forward ref */ typedef int (write_proc_t)(struct file *file, const char *buffer, unsigned long count, void *data); -#define NIPQUAD(addr) \ - ((unsigned char *)&addr)[0], \ - ((unsigned char *)&addr)[1], \ - ((unsigned char *)&addr)[2], \ - ((unsigned char *)&addr)[3] - -#if defined(__LITTLE_ENDIAN) -#define HIPQUAD(addr) \ - ((unsigned char *)&addr)[3], \ - ((unsigned char *)&addr)[2], \ - ((unsigned char *)&addr)[1], \ - ((unsigned char *)&addr)[0] -#elif defined(__BIG_ENDIAN) -#define HIPQUAD NIPQUAD -#else -#error "Undefined byteorder??" -#endif /* __LITTLE_ENDIAN */ - /* bits ops */ /* a long can be more than 32 bits, so use BITS_PER_LONG @@ -300,7 +280,7 @@ typedef spinlock_t rwlock_t; #define read_unlock(l) spin_unlock(l) #define write_lock(l) spin_lock(l) #define write_unlock(l) spin_unlock(l) - +#define rwlock_init(l) spin_lock_init(l) #define min(x,y) ((x)<(y) ? (x) : (y)) #define max(x,y) ((x)>(y) ? (x) : (y))