Whamcloud - gitweb
b=15326
authorjxiong <jxiong>
Wed, 2 Apr 2008 11:40:20 +0000 (11:40 +0000)
committerjxiong <jxiong>
Wed, 2 Apr 2008 11:40:20 +0000 (11:40 +0000)
r=nikita

In order to make new llite to be compilable for liblustre

lnet/include/libcfs/kp30.h
lnet/include/libcfs/linux/linux-lock.h
lnet/include/libcfs/user-prim.h
lnet/libcfs/user-prim.c

index 1da8475..0869f67 100644 (file)
@@ -98,6 +98,8 @@
 #define LASSERTF(cond, fmt...) ((void)(0))
 #endif /* LIBCFS_DEBUG */
 
+#define KLASSERT(e) LASSERT(e)
+
 void lbug_with_loc(char *file, const char *func, const int line)
         __attribute__((noreturn));
 
@@ -212,6 +214,7 @@ do {                                                                           \
 #  define LASSERTF(cond, args...) do { } while (0)
 #  define LBUG()   ((void)(0))
 # endif /* LIBCFS_DEBUG */
+# define KLASSERT(e) do { } while (0)
 # define printk(format, args...) printf (format, ## args)
 # ifdef CRAY_XT3                                /* buggy calloc! */
 #  define LIBCFS_ALLOC(ptr, size)               \
index f419c9b..4b51d1b 100644 (file)
@@ -85,6 +85,7 @@
 #define init_mutex_locked(x)            init_MUTEX_LOCKED(x)
 #define mutex_up(x)                     up(x)
 #define mutex_down(x)                   down(x)
+#define mutex_down_trylock(x)           down_trylock(x)
 
 /*
  * completion (use Linux kernel's primitives)
index 2447bbc..1939640 100644 (file)
@@ -98,8 +98,8 @@ void cfs_waitq_del(struct cfs_waitq *waitq, struct cfs_waitlink *link);
 int  cfs_waitq_active(struct cfs_waitq *waitq);
 void cfs_waitq_signal(struct cfs_waitq *waitq);
 void cfs_waitq_signal_nr(struct cfs_waitq *waitq, int nr);
-void cfs_waitq_broadcast(struct cfs_waitq *waitq, int state);
-void cfs_waitq_wait(struct cfs_waitlink *link);
+void cfs_waitq_broadcast(struct cfs_waitq *waitq);
+void cfs_waitq_wait(struct cfs_waitlink *link, int state);
 int64_t cfs_waitq_timedwait(struct cfs_waitlink *link, int state, int64_t timeout);
 #define cfs_schedule_timeout(s, t)              \
         do {                                    \
@@ -129,6 +129,7 @@ struct page {
 #ifdef LIBLUSTRE_HANDLE_UNALIGNED_PAGE
         int     _managed;
 #endif
+        struct list_head _node;
 };
 
 typedef struct page cfs_page_t;
@@ -322,7 +323,6 @@ struct cfs_stack_trace {
                 (remainder);            \
         })
 
-
 /* !__KERNEL__ */
 #endif
 
index 2dad1b3..58f6b37 100644 (file)
@@ -120,13 +120,13 @@ void cfs_waitq_signal_nr(struct cfs_waitq *waitq, int nr)
         (void)waitq;
 }
 
-void cfs_waitq_broadcast(struct cfs_waitq *waitq, int state)
+void cfs_waitq_broadcast(struct cfs_waitq *waitq)
 {
         LASSERT(waitq != NULL);
         (void)waitq;
 }
 
-void cfs_waitq_wait(struct cfs_waitlink *link)
+void cfs_waitq_wait(struct cfs_waitlink *link, int state)
 {
         LASSERT(link != NULL);
         (void)link;
@@ -378,7 +378,6 @@ void lbug_with_loc(char *file, const char *func, const int line)
         abort();
 }
 
-
 /* !__KERNEL__ */
 #endif