Mercury
mercury_private.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2013 Argonne National Laboratory, Department of Energy,
3  *                    UChicago Argonne, LLC and The HDF Group.
4  * All rights reserved.
5  *
6  * The full copyright notice, including terms governing use, modification,
7  * and redistribution, is contained in the COPYING file that can be
8  * found at the root of the source code distribution tree.
9  */
10 
11 #ifndef MERCURY_PRIVATE_H
12 #define MERCURY_PRIVATE_H
13 
14 #include "mercury_types.h"
15 
16 /* TODO temp includes */
17 #include "mercury_request.h"
18 #include "mercury_list.h"
20 #include "mercury_thread_mutex.h"
21 #include "mercury_atomic.h"
22 
23 struct hg_handle {
24  hg_id_t id; /* Request ID */
25  hg_uint32_t cookie; /* Cookie unique to every RPC call */
26  na_addr_t addr; /* Address of the RPC source/dest */
27  na_tag_t tag; /* Tag used for request and response */
28 
29 // void *in_struct; /* Input structure */
30  void *out_struct_ptr; /* Reference to output structure */
31 
32  void *in_buf; /* Send buffer for response */
33  na_size_t in_buf_size; /* Send buffer size */
34  void *extra_in_buf; /* Extra send buffer */
35  na_size_t extra_in_buf_size; /* Extra send buffer size */
37  hg_request_object_t *in_request; /* TODO gone when switched to CB */
38 
39  void *out_buf; /* Recv buffer for request */
40  na_size_t out_buf_size; /* Recv buffer size */
41  void *extra_out_buf; /* Extra recv buffer */
42  na_size_t extra_out_buf_size; /* Extra recv buffer size */
43  hg_request_object_t *out_request; /* TODO gone when switched to CB */
44 
45  hg_list_entry_t *processing_entry; /* Entry in processing list */
46 
48 
49  hg_bool_t local;
50  hg_bool_t processed;
53 };
54 
55 struct hg_info {
56  hg_proc_cb_t in_proc_cb; /* Input serial/deserial callback */
57  hg_proc_cb_t out_proc_cb; /* Output serial/deserial callback */
58  hg_rpc_cb_t rpc_cb; /* RPC callback */
59 };
60 
61 #ifdef __cplusplus
62 extern "C" {
63 #endif
64 
69 HG_EXPORT struct hg_handle *
70 hg_handle_new(void);
71 
76 HG_EXPORT void
77 hg_handle_free(struct hg_handle *);
78 
79 #ifdef __cplusplus
80 }
81 #endif
82 
83 #endif /* MERCURY_PRIVATE_H */
na_size_t extra_out_buf_size
hg_list_entry_t * processing_entry
hg_bool_t local
void * in_buf
void * out_buf
hg_id_t id
hg_proc_cb_t in_proc_cb
hg_uint32_t cookie
void * hg_bulk_t
Definition: mercury_types.h:23
hg_bool_t processed
na_size_t extra_in_buf_size
void * out_struct_ptr
void * na_addr_t
Definition: na.h:20
hg_bulk_t extra_in_handle
OPA_int_t hg_atomic_int32_t
na_uint64_t na_size_t
Definition: na.h:21
hg_uint32_t hg_id_t
Definition: mercury_types.h:17
pthread_mutex_t hg_thread_mutex_t
na_tag_t tag
Doubly-linked list.
void * extra_in_buf
hg_thread_mutex_t processed_mutex
na_addr_t addr
hg_request_object_t * out_request
pthread_cond_t hg_thread_cond_t
hg_return_t(* hg_rpc_cb_t)(hg_handle_t handle)
Definition: mercury_types.h:84
struct hg_list_entry hg_list_entry_t
Represents an entry in a doubly-linked list.
Definition: mercury_list.h:68
HG_EXPORT struct hg_handle * hg_handle_new(void)
void * extra_out_buf
hg_proc_cb_t out_proc_cb
hg_thread_cond_t processed_cond
struct hg_request_object hg_request_object_t
na_size_t in_buf_size
na_uint32_t na_tag_t
Definition: na.h:22
hg_rpc_cb_t rpc_cb
na_size_t out_buf_size
hg_atomic_int32_t ref_count
hg_request_object_t * in_request
hg_return_t(* hg_proc_cb_t)(hg_proc_t proc, void *in_struct)
Definition: mercury_types.h:81
HG_EXPORT void hg_handle_free(struct hg_handle *)