Whamcloud - gitweb
a better way to fix the build error for work_struct in 2.6
authorwangdi <wangdi>
Thu, 23 Oct 2003 14:00:47 +0000 (14:00 +0000)
committerwangdi <wangdi>
Thu, 23 Oct 2003 14:00:47 +0000 (14:00 +0000)
lnet/include/linux/kp30.h
lnet/router/router.h
lustre/portals/include/linux/kp30.h
lustre/portals/router/router.h

index 94b61e0..aef9522 100644 (file)
@@ -188,6 +188,7 @@ static inline void our_cond_resched(void)
         if (current->need_resched)
                schedule ();
 }
+#define work_struct_t       struct tq_struct 
 
 #else
 
@@ -203,6 +204,8 @@ static inline void our_cond_resched(void)
 {
         cond_resched();
 }
+#define work_struct_t      struct work_struct
+
 #endif /* LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) */
 
 #ifdef PORTAL_DEBUG
index 4ace247..ea25439 100644 (file)
@@ -71,11 +71,7 @@ typedef struct
 
 typedef struct
 {
-#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0))
-        struct work_struct        kpru_tq;
-#else
-        struct tq_struct        kpru_tq;
-#endif
+        work_struct_t           kpru_tq;
         int                     kpru_nal_id;
         ptl_nid_t               kpru_nid;
         int                     kpru_alive;
index 94b61e0..aef9522 100644 (file)
@@ -188,6 +188,7 @@ static inline void our_cond_resched(void)
         if (current->need_resched)
                schedule ();
 }
+#define work_struct_t       struct tq_struct 
 
 #else
 
@@ -203,6 +204,8 @@ static inline void our_cond_resched(void)
 {
         cond_resched();
 }
+#define work_struct_t      struct work_struct
+
 #endif /* LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) */
 
 #ifdef PORTAL_DEBUG
index 4ace247..ea25439 100644 (file)
@@ -71,11 +71,7 @@ typedef struct
 
 typedef struct
 {
-#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0))
-        struct work_struct        kpru_tq;
-#else
-        struct tq_struct        kpru_tq;
-#endif
+        work_struct_t           kpru_tq;
         int                     kpru_nal_id;
         ptl_nid_t               kpru_nid;
         int                     kpru_alive;