Whamcloud - gitweb
b=2914
[fs/lustre-release.git] / lnet / include / lnet / types.h
index 0269290..74ef493 100644 (file)
@@ -3,7 +3,13 @@
 
 #ifdef __linux__
 # include <asm/types.h>
-# include <asm/timex.h>
+# if defined(__powerpc__) && !defined(__KERNEL__)
+#  define __KERNEL__
+#  include <asm/timex.h>
+#  undef __KERNEL__
+# else
+#  include <asm/timex.h>
+# endif
 #else
 # include <sys/types.h>
 typedef u_int32_t __u32;
@@ -14,9 +20,11 @@ typedef u_int64_t __u64;
 # include <linux/time.h>
 #else
 # include <sys/time.h>
-# define do_gettimeofday(tv) gettimeofday(tv, NULL)
+# define do_gettimeofday(tv) gettimeofday(tv, NULL);
 #endif
 
+#include <portals/errno.h>
+
 typedef __u64 ptl_nid_t;
 typedef __u32 ptl_pid_t;
 typedef __u32 ptl_pt_index_t;
@@ -97,25 +105,40 @@ typedef enum {
         PTL_EVENT_PUT,
         PTL_EVENT_REPLY,
         PTL_EVENT_ACK,
-        PTL_EVENT_SENT
+        PTL_EVENT_SENT,
+       PTL_EVENT_UNLINK,
 } ptl_event_kind_t;
 
 #define PTL_SEQ_BASETYPE       long
 typedef unsigned PTL_SEQ_BASETYPE ptl_seq_t;
 #define PTL_SEQ_GT(a,b)        (((signed PTL_SEQ_BASETYPE)((a) - (b))) > 0)
 
+/* XXX
+ * cygwin need the pragma line, not clear if it's needed in other places.
+ * checking!!!
+ */
+#ifdef __CYGWIN__
+#pragma pack(push, 4)
+#endif
 typedef struct {
-        ptl_event_kind_t type;
-        ptl_process_id_t initiator;
-        ptl_pt_index_t portal;
-        ptl_match_bits_t match_bits;
-        ptl_size_t rlength, mlength, offset;
-        ptl_handle_me_t unlinked_me;
-        ptl_md_t mem_desc;
-        ptl_hdr_data_t hdr_data;
-        struct timeval arrival_time;
+        ptl_event_kind_t   type;
+       ptl_err_t          status;
+       int                unlinked;
+        ptl_process_id_t   initiator;
+        ptl_pt_index_t     portal;
+        ptl_match_bits_t   match_bits;
+        ptl_size_t         rlength;
+       ptl_size_t         mlength;
+       ptl_size_t         offset;
+        ptl_md_t           mem_desc;
+        ptl_hdr_data_t     hdr_data;
+        struct timeval     arrival_time;
+
         volatile ptl_seq_t sequence;
 } ptl_event_t;
+#ifdef __CYGWIN__
+#pragma pop
+#endif
 
 typedef enum {
         PTL_ACK_REQ,