4 #include "build_check.h"
7 # include <asm/types.h>
8 # if defined(__powerpc__) && !defined(__KERNEL__)
10 # include <asm/timex.h>
13 # include <asm/timex.h>
16 # include <sys/types.h>
17 typedef u_int32_t __u32;
18 typedef u_int64_t __u64;
22 # include <linux/time.h>
24 # include <sys/time.h>
25 # define do_gettimeofday(tv) gettimeofday(tv, NULL);
28 #include <portals/errno.h>
30 /* This implementation uses the same type for API function return codes and
31 * the completion status in an event */
32 #define PTL_NI_OK PTL_OK
33 typedef ptl_err_t ptl_ni_fail_t;
35 typedef __u64 ptl_nid_t;
36 typedef __u32 ptl_pid_t;
37 typedef __u32 ptl_pt_index_t;
38 typedef __u32 ptl_ac_index_t;
39 typedef __u64 ptl_match_bits_t;
40 typedef __u64 ptl_hdr_data_t;
41 typedef __u32 ptl_size_t;
43 #define PTL_TIME_FOREVER (-1)
44 #define PTL_EQ_HANDLER_NONE NULL
47 unsigned long nal_idx; /* which network interface */
48 __u64 cookie; /* which thing on that interface */
51 typedef ptl_handle_any_t ptl_handle_ni_t;
52 typedef ptl_handle_any_t ptl_handle_eq_t;
53 typedef ptl_handle_any_t ptl_handle_md_t;
54 typedef ptl_handle_any_t ptl_handle_me_t;
56 #define PTL_INVALID_HANDLE \
57 ((const ptl_handle_any_t){.nal_idx = -1, .cookie = -1})
58 #define PTL_EQ_NONE PTL_INVALID_HANDLE
60 static inline int PtlHandleIsEqual (ptl_handle_any_t h1, ptl_handle_any_t h2)
62 return (h1.nal_idx == h2.nal_idx && h1.cookie == h2.cookie);
65 #define PTL_NID_ANY ((ptl_nid_t) -1)
66 #define PTL_PID_ANY ((ptl_pid_t) -1)
70 ptl_pid_t pid; /* node id / process id */
84 struct page *kiov_page;
85 unsigned int kiov_len;
86 unsigned int kiov_offset;
96 ptl_handle_eq_t eventq;
100 /* Options for the MD structure */
101 #define PTL_MD_OP_PUT (1 << 0)
102 #define PTL_MD_OP_GET (1 << 1)
103 #define PTL_MD_MANAGE_REMOTE (1 << 2)
104 /* unused (1 << 3) */
105 #define PTL_MD_TRUNCATE (1 << 4)
106 #define PTL_MD_ACK_DISABLE (1 << 5)
107 #define PTL_MD_IOVEC (1 << 6)
108 #define PTL_MD_MAX_SIZE (1 << 7)
109 #define PTL_MD_KIOV (1 << 8)
110 #define PTL_MD_EVENT_START_DISABLE (1 << 9)
111 #define PTL_MD_EVENT_END_DISABLE (1 << 10)
113 /* For compatibility with Cray Portals */
114 #define PTL_MD_LUSTRE_COMPLETION_SEMANTICS 0
116 #define PTL_MD_THRESH_INF (-1)
125 PTL_EVENT_REPLY_START,
130 PTL_EVENT_SEND_START,
136 #define PTL_SEQ_BASETYPE long
137 typedef unsigned PTL_SEQ_BASETYPE ptl_seq_t;
138 #define PTL_SEQ_GT(a,b) (((signed PTL_SEQ_BASETYPE)((a) - (b))) > 0)
141 * cygwin need the pragma line, not clear if it's needed in other places.
145 #pragma pack(push, 4)
148 ptl_event_kind_t type;
149 ptl_process_id_t initiator;
150 ptl_pt_index_t portal;
151 ptl_match_bits_t match_bits;
156 ptl_hdr_data_t hdr_data;
158 ptl_ni_fail_t ni_fail_type;
160 volatile ptl_seq_t sequence;
172 volatile ptl_seq_t sequence;
175 ptl_handle_any_t cb_eq_handle;
183 int max_match_entries; /* max number of match entries */
184 int max_mem_descriptors; /* max number of memory descriptors */
185 int max_event_queues; /* max number of event queues */
186 int max_atable_index; /* maximum access control list table index */
187 int max_ptable_index; /* maximum portals table index */
203 typedef int ptl_sr_value_t;