Commit 5a93ecc6 authored by Matthieu Dorier's avatar Matthieu Dorier
Browse files

changed the processing functions to the correct prototype

parent da2918e9
...@@ -20,19 +20,25 @@ ...@@ -20,19 +20,25 @@
typedef hg_return_t (*encode_fn)(hg_proc_t, uint64_t*, void*); typedef hg_return_t (*encode_fn)(hg_proc_t, uint64_t*, void*);
typedef hg_return_t (*decode_fn)(hg_proc_t, uint64_t*, void*); typedef hg_return_t (*decode_fn)(hg_proc_t, uint64_t*, void*);
static hg_return_t encode_read_action_stat(hg_proc_t proc, uint64_t* pos, rd_action_stat_t action) static hg_return_t encode_read_action_stat(hg_proc_t proc,
uint64_t* pos,
rd_action_stat_t action)
{ {
return HG_SUCCESS; return HG_SUCCESS;
} }
static hg_return_t decode_read_action_stat(hg_proc_t proc, uint64_t* pos, rd_action_stat_t* action) static hg_return_t decode_read_action_stat(hg_proc_t proc,
uint64_t* pos,
rd_action_stat_t* action)
{ {
hg_return_t ret = HG_SUCCESS; hg_return_t ret = HG_SUCCESS;
*action = (rd_action_stat_t)calloc(1, sizeof(**action)); *action = (rd_action_stat_t)calloc(1, sizeof(**action));
return ret; return ret;
} }
static hg_return_t encode_read_action_read(hg_proc_t proc, uint64_t* pos, rd_action_read_t action) static hg_return_t encode_read_action_read(hg_proc_t proc,
uint64_t* pos,
rd_action_read_t action)
{ {
args_rd_action_read a; args_rd_action_read a;
a.offset = action->offset; a.offset = action->offset;
...@@ -42,7 +48,9 @@ static hg_return_t encode_read_action_read(hg_proc_t proc, uint64_t* pos, rd_act ...@@ -42,7 +48,9 @@ static hg_return_t encode_read_action_read(hg_proc_t proc, uint64_t* pos, rd_act
return hg_proc_memcpy(proc, &a, sizeof(a)); return hg_proc_memcpy(proc, &a, sizeof(a));
} }
static hg_return_t decode_read_action_read(hg_proc_t proc, uint64_t* pos, rd_action_read_t* action) static hg_return_t decode_read_action_read(hg_proc_t proc,
uint64_t* pos,
rd_action_read_t* action)
{ {
hg_return_t ret = HG_SUCCESS; hg_return_t ret = HG_SUCCESS;
args_rd_action_read a; args_rd_action_read a;
...@@ -58,7 +66,9 @@ static hg_return_t decode_read_action_read(hg_proc_t proc, uint64_t* pos, rd_act ...@@ -58,7 +66,9 @@ static hg_return_t decode_read_action_read(hg_proc_t proc, uint64_t* pos, rd_act
return ret; return ret;
} }
static hg_return_t encode_read_action_omap_get_keys(hg_proc_t proc, uint64_t* pos, rd_action_omap_get_keys_t action) static hg_return_t encode_read_action_omap_get_keys(hg_proc_t proc,
uint64_t* pos,
rd_action_omap_get_keys_t action)
{ {
args_rd_action_omap_get_keys a; args_rd_action_omap_get_keys a;
a.max_return = action->max_return; a.max_return = action->max_return;
...@@ -68,11 +78,13 @@ static hg_return_t encode_read_action_omap_get_keys(hg_proc_t proc, uint64_t* po ...@@ -68,11 +78,13 @@ static hg_return_t encode_read_action_omap_get_keys(hg_proc_t proc, uint64_t* po
ret = hg_proc_memcpy(proc, &a, sizeof(a)); ret = hg_proc_memcpy(proc, &a, sizeof(a));
if(ret != HG_SUCCESS) return ret; if(ret != HG_SUCCESS) return ret;
ret = hg_proc_hg_string_t(proc, action->start_after); ret = hg_proc_memcpy(proc, action->data, action->data_size);
return ret; return ret;
} }
static hg_return_t decode_read_action_omap_get_keys(hg_proc_t proc, uint64_t* pos, rd_action_omap_get_keys_t* action) static hg_return_t decode_read_action_omap_get_keys(hg_proc_t proc,
uint64_t* pos,
rd_action_omap_get_keys_t* action)
{ {
hg_return_t ret = HG_SUCCESS; hg_return_t ret = HG_SUCCESS;
args_rd_action_omap_get_keys a; args_rd_action_omap_get_keys a;
...@@ -83,12 +95,14 @@ static hg_return_t decode_read_action_omap_get_keys(hg_proc_t proc, uint64_t* po ...@@ -83,12 +95,14 @@ static hg_return_t decode_read_action_omap_get_keys(hg_proc_t proc, uint64_t* po
(*action)->max_return = a.max_return; (*action)->max_return = a.max_return;
(*action)->data_size = a.data_size; (*action)->data_size = a.data_size;
(*action)->start_after = (*action)->data; (*action)->start_after = (*action)->data;
ret = hg_proc_hg_string_t(proc, (*action)->start_after);
ret = hg_proc_memcpy(proc, (*action)->data, (*action)->data_size);
return ret; return ret;
} }
static hg_return_t encode_read_action_omap_get_vals(hg_proc_t proc, uint64_t* pos, rd_action_omap_get_vals_t action) static hg_return_t encode_read_action_omap_get_vals(hg_proc_t proc,
uint64_t* pos,
rd_action_omap_get_vals_t action)
{ {
args_rd_action_omap_get_vals a; args_rd_action_omap_get_vals a;
a.max_return = action->max_return; a.max_return = action->max_return;
...@@ -98,14 +112,14 @@ static hg_return_t encode_read_action_omap_get_vals(hg_proc_t proc, uint64_t* po ...@@ -98,14 +112,14 @@ static hg_return_t encode_read_action_omap_get_vals(hg_proc_t proc, uint64_t* po
ret = hg_proc_memcpy(proc, &a, sizeof(a)); ret = hg_proc_memcpy(proc, &a, sizeof(a));
if(ret != HG_SUCCESS) return ret; if(ret != HG_SUCCESS) return ret;
ret = hg_proc_hg_string_t(proc, action->start_after); ret = hg_proc_memcpy(proc, action->data, action->data_size);
if(ret != HG_SUCCESS) return ret;
ret = hg_proc_hg_string_t(proc, action->filter_prefix);
return ret; return ret;
} }
static hg_return_t decode_read_action_omap_get_vals(hg_proc_t proc, uint64_t* pos, rd_action_omap_get_vals_t* action) static hg_return_t decode_read_action_omap_get_vals(hg_proc_t proc,
uint64_t* pos,
rd_action_omap_get_vals_t* action)
{ {
hg_return_t ret = HG_SUCCESS; hg_return_t ret = HG_SUCCESS;
args_rd_action_omap_get_vals a; args_rd_action_omap_get_vals a;
...@@ -119,14 +133,14 @@ static hg_return_t decode_read_action_omap_get_vals(hg_proc_t proc, uint64_t* po ...@@ -119,14 +133,14 @@ static hg_return_t decode_read_action_omap_get_vals(hg_proc_t proc, uint64_t* po
size_t s = strlen((*action)->start_after); size_t s = strlen((*action)->start_after);
(*action)->filter_prefix = (*action)->data + s + 1; (*action)->filter_prefix = (*action)->data + s + 1;
ret = hg_proc_hg_string_t(proc, (*action)->start_after); ret = hg_proc_memcpy(proc, (*action)->data, (*action)->data_size);
if(ret != HG_SUCCESS) return ret;
ret = hg_proc_hg_string_t(proc, (*action)->filter_prefix);
return ret; return ret;
} }
static hg_return_t encode_read_action_omap_get_vals_by_keys(hg_proc_t proc, uint64_t* pos, rd_action_omap_get_vals_by_keys_t action) static hg_return_t encode_read_action_omap_get_vals_by_keys(hg_proc_t proc,
uint64_t* pos,
rd_action_omap_get_vals_by_keys_t action)
{ {
args_rd_action_omap_get_vals_by_keys a; args_rd_action_omap_get_vals_by_keys a;
a.num_keys = action->num_keys; a.num_keys = action->num_keys;
...@@ -141,7 +155,9 @@ static hg_return_t encode_read_action_omap_get_vals_by_keys(hg_proc_t proc, uint ...@@ -141,7 +155,9 @@ static hg_return_t encode_read_action_omap_get_vals_by_keys(hg_proc_t proc, uint
return ret; return ret;
} }
static hg_return_t decode_read_action_omap_get_vals_by_keys(hg_proc_t proc, uint64_t* pos, rd_action_omap_get_vals_by_keys_t* action) static hg_return_t decode_read_action_omap_get_vals_by_keys(hg_proc_t proc,
uint64_t* pos,
rd_action_omap_get_vals_by_keys_t* action)
{ {
hg_return_t ret = HG_SUCCESS; hg_return_t ret = HG_SUCCESS;
args_rd_action_omap_get_vals_by_keys a; args_rd_action_omap_get_vals_by_keys a;
...@@ -186,7 +202,7 @@ static decode_fn decode_read_action[_READ_OPCODE_END_ENUM_] = { ...@@ -186,7 +202,7 @@ static decode_fn decode_read_action[_READ_OPCODE_END_ENUM_] = {
* For encoding, the object should be prepared first (that is, the union fields * For encoding, the object should be prepared first (that is, the union fields
* pointing to either a buffer or an offset in a bulk should be an offset in a bulk). * pointing to either a buffer or an offset in a bulk should be an offset in a bulk).
*/ */
hg_return_t hg_proc_mobject_store_read_op_t(hg_proc_t proc, mobject_store_read_op_t read_op) hg_return_t hg_proc_mobject_store_read_op_t(hg_proc_t proc, mobject_store_read_op_t* read_op)
{ {
rd_action_base_t elem, tmp; rd_action_base_t elem, tmp;
hg_return_t ret = HG_SUCCESS; hg_return_t ret = HG_SUCCESS;
...@@ -196,18 +212,21 @@ hg_return_t hg_proc_mobject_store_read_op_t(hg_proc_t proc, mobject_store_read_o ...@@ -196,18 +212,21 @@ hg_return_t hg_proc_mobject_store_read_op_t(hg_proc_t proc, mobject_store_read_o
case HG_ENCODE: case HG_ENCODE:
MOBJECT_ASSERT(read_op->use_local_pointers == 0, "Cannot encode a read_op before it has been prepared"); MOBJECT_ASSERT((*read_op)->use_local_pointers == 0,
"Cannot encode a read_op before it has been prepared");
// encode the bulk handle associated with the series of operations // encode the bulk handle associated with the series of operations
ret = hg_proc_hg_bulk_t(proc, &(read_op->bulk_handle)); ret = hg_proc_hg_bulk_t(proc, &((*read_op)->bulk_handle));
if(ret != HG_SUCCESS) return ret; if(ret != HG_SUCCESS) return ret;
// encode the number of actions // encode the number of actions
ret = hg_proc_memcpy(proc, &(read_op->num_actions), sizeof(read_op->num_actions)); ret = hg_proc_memcpy(proc, &((*read_op)->num_actions),
sizeof((*read_op)->num_actions));
if(ret != HG_SUCCESS) return ret; if(ret != HG_SUCCESS) return ret;
// for each action ... // for each action ...
DL_FOREACH(read_op->actions,elem) { DL_FOREACH((*read_op)->actions,elem) {
read_op_code_t opcode = elem->type; read_op_code_t opcode = elem->type;
MOBJECT_ASSERT((opcode <= 0 || opcode >= _READ_OPCODE_END_ENUM_), "Invalid read_op opcode"); MOBJECT_ASSERT((opcode <= 0 || opcode >= _READ_OPCODE_END_ENUM_),
"Invalid read_op opcode");
// encode the type of action // encode the type of action
ret = hg_proc_memcpy(proc, &opcode, sizeof(opcode)); ret = hg_proc_memcpy(proc, &opcode, sizeof(opcode));
if(ret != HG_SUCCESS) return ret; if(ret != HG_SUCCESS) return ret;
...@@ -218,32 +237,37 @@ hg_return_t hg_proc_mobject_store_read_op_t(hg_proc_t proc, mobject_store_read_o ...@@ -218,32 +237,37 @@ hg_return_t hg_proc_mobject_store_read_op_t(hg_proc_t proc, mobject_store_read_o
break; break;
case HG_DECODE: case HG_DECODE:
*read_op = mobject_store_create_read_op();
(*read_op)->use_local_pointers = 0;
// decode the bulk handle // decode the bulk handle
ret = hg_proc_hg_bulk_t(proc, &(read_op->bulk_handle)); ret = hg_proc_hg_bulk_t(proc, &((*read_op)->bulk_handle));
if(ret != HG_SUCCESS) return ret; if(ret != HG_SUCCESS) return ret;
// decode the number of actions // decode the number of actions
ret = hg_proc_memcpy(proc, &(read_op->num_actions), sizeof(read_op->num_actions)); ret = hg_proc_memcpy(proc, &((*read_op)->num_actions),
sizeof((*read_op)->num_actions));
if(ret != HG_SUCCESS) return ret; if(ret != HG_SUCCESS) return ret;
rd_action_base_t next_action; rd_action_base_t next_action;
size_t i; size_t i;
for(i = 0; i < read_op->num_actions; i++) { for(i = 0; i < (*read_op)->num_actions; i++) {
// decode the current action's type // decode the current action's type
read_op_code_t opcode; read_op_code_t opcode;
ret = hg_proc_memcpy(proc, &opcode, sizeof(opcode)); ret = hg_proc_memcpy(proc, &opcode, sizeof(opcode));
if(ret != HG_SUCCESS) return ret; if(ret != HG_SUCCESS) return ret;
MOBJECT_ASSERT((opcode <= 0 || opcode >= _READ_OPCODE_END_ENUM_), "Invalid write_op opcode"); MOBJECT_ASSERT((opcode <= 0 || opcode >= _READ_OPCODE_END_ENUM_),
"Invalid write_op opcode");
// decode the action's arguments // decode the action's arguments
ret = decode_read_action[opcode](proc, &position, &next_action); ret = decode_read_action[opcode](proc, &position, &next_action);
if(ret != HG_SUCCESS) return ret; if(ret != HG_SUCCESS) return ret;
// append to the list // append to the list
DL_APPEND(read_op->actions, next_action); DL_APPEND((*read_op)->actions, next_action);
} }
break; break;
case HG_FREE: case HG_FREE:
mobject_store_release_read_op(read_op);
mobject_store_release_read_op(*read_op);
return HG_SUCCESS; return HG_SUCCESS;
} }
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
#include <margo.h> #include <margo.h>
#include "libmobject-store.h" #include "libmobject-store.h"
hg_return_t hg_proc_mobject_store_read_op_t(hg_proc_t proc, mobject_store_read_op_t list); hg_return_t hg_proc_mobject_store_read_op_t(hg_proc_t proc, mobject_store_read_op_t* read_op);
#endif #endif
...@@ -20,14 +20,18 @@ ...@@ -20,14 +20,18 @@
typedef hg_return_t (*encode_fn)(hg_proc_t, uint64_t*, void*); typedef hg_return_t (*encode_fn)(hg_proc_t, uint64_t*, void*);
typedef hg_return_t (*decode_fn)(hg_proc_t, uint64_t*, void*); typedef hg_return_t (*decode_fn)(hg_proc_t, uint64_t*, void*);
static hg_return_t encode_write_action_create(hg_proc_t proc, uint64_t* pos, wr_action_create_t action) static hg_return_t encode_write_action_create(hg_proc_t proc,
uint64_t* pos,
wr_action_create_t action)
{ {
args_wr_action_create a; args_wr_action_create a;
a.exclusive = action->exclusive; a.exclusive = action->exclusive;
return hg_proc_memcpy(proc, &a, sizeof(a)); return hg_proc_memcpy(proc, &a, sizeof(a));
} }
static hg_return_t decode_write_action_create(hg_proc_t proc, uint64_t* pos, wr_action_create_t* action) static hg_return_t decode_write_action_create(hg_proc_t proc,
uint64_t* pos,
wr_action_create_t* action)
{ {
hg_return_t ret = HG_SUCCESS; hg_return_t ret = HG_SUCCESS;
args_wr_action_create a; args_wr_action_create a;
...@@ -40,7 +44,9 @@ static hg_return_t decode_write_action_create(hg_proc_t proc, uint64_t* pos, wr_ ...@@ -40,7 +44,9 @@ static hg_return_t decode_write_action_create(hg_proc_t proc, uint64_t* pos, wr_
return ret; return ret;
} }
static hg_return_t encode_write_action_write(hg_proc_t proc, uint64_t* pos, wr_action_write_t action) static hg_return_t encode_write_action_write(hg_proc_t proc,
uint64_t* pos,
wr_action_write_t action)
{ {
args_wr_action_write a; args_wr_action_write a;
a.buffer_position = *pos; a.buffer_position = *pos;
...@@ -50,7 +56,9 @@ static hg_return_t encode_write_action_write(hg_proc_t proc, uint64_t* pos, wr_a ...@@ -50,7 +56,9 @@ static hg_return_t encode_write_action_write(hg_proc_t proc, uint64_t* pos, wr_a
return hg_proc_memcpy(proc, &a, sizeof(a)); return hg_proc_memcpy(proc, &a, sizeof(a));
} }
static hg_return_t decode_write_action_write(hg_proc_t proc, uint64_t* pos, wr_action_write_t* action) static hg_return_t decode_write_action_write(hg_proc_t proc,
uint64_t* pos,
wr_action_write_t* action)
{ {
hg_return_t ret = HG_SUCCESS; hg_return_t ret = HG_SUCCESS;
args_wr_action_write a; args_wr_action_write a;
...@@ -66,7 +74,9 @@ static hg_return_t decode_write_action_write(hg_proc_t proc, uint64_t* pos, wr_a ...@@ -66,7 +74,9 @@ static hg_return_t decode_write_action_write(hg_proc_t proc, uint64_t* pos, wr_a
return ret; return ret;
} }
static hg_return_t encode_write_action_write_full(hg_proc_t proc, uint64_t* pos, wr_action_write_full_t action) static hg_return_t encode_write_action_write_full(hg_proc_t proc,
uint64_t* pos,
wr_action_write_full_t action)
{ {
args_wr_action_write_full a; args_wr_action_write_full a;
a.buffer_position = *pos; a.buffer_position = *pos;
...@@ -75,7 +85,9 @@ static hg_return_t encode_write_action_write_full(hg_proc_t proc, uint64_t* pos, ...@@ -75,7 +85,9 @@ static hg_return_t encode_write_action_write_full(hg_proc_t proc, uint64_t* pos,
return hg_proc_memcpy(proc, &a, sizeof(a)); return hg_proc_memcpy(proc, &a, sizeof(a));
} }
static hg_return_t decode_write_action_write_full(hg_proc_t proc, uint64_t* pos, wr_action_write_full_t* action) static hg_return_t decode_write_action_write_full(hg_proc_t proc,
uint64_t* pos,
wr_action_write_full_t* action)
{ {
hg_return_t ret = HG_SUCCESS; hg_return_t ret = HG_SUCCESS;
args_wr_action_write_full a; args_wr_action_write_full a;
...@@ -90,7 +102,9 @@ static hg_return_t decode_write_action_write_full(hg_proc_t proc, uint64_t* pos, ...@@ -90,7 +102,9 @@ static hg_return_t decode_write_action_write_full(hg_proc_t proc, uint64_t* pos,
return ret; return ret;
} }
static hg_return_t encode_write_action_write_same(hg_proc_t proc, uint64_t* pos, wr_action_write_same_t action) static hg_return_t encode_write_action_write_same(hg_proc_t proc,
uint64_t* pos,
wr_action_write_same_t action)
{ {
args_wr_action_write_same a; args_wr_action_write_same a;
a.buffer_position = *pos; a.buffer_position = *pos;
...@@ -101,7 +115,9 @@ static hg_return_t encode_write_action_write_same(hg_proc_t proc, uint64_t* pos, ...@@ -101,7 +115,9 @@ static hg_return_t encode_write_action_write_same(hg_proc_t proc, uint64_t* pos,
return hg_proc_memcpy(proc, &a, sizeof(a)); return hg_proc_memcpy(proc, &a, sizeof(a));
} }
static hg_return_t decode_write_action_write_same(hg_proc_t proc, uint64_t* pos, wr_action_write_same_t* action) static hg_return_t decode_write_action_write_same(hg_proc_t proc,
uint64_t* pos,
wr_action_write_same_t* action)
{ {
hg_return_t ret = HG_SUCCESS; hg_return_t ret = HG_SUCCESS;
args_wr_action_write_same a; args_wr_action_write_same a;
...@@ -118,7 +134,9 @@ static hg_return_t decode_write_action_write_same(hg_proc_t proc, uint64_t* pos, ...@@ -118,7 +134,9 @@ static hg_return_t decode_write_action_write_same(hg_proc_t proc, uint64_t* pos,
return ret; return ret;
} }
static hg_return_t encode_write_action_append(hg_proc_t proc, uint64_t* pos, wr_action_append_t action) static hg_return_t encode_write_action_append(hg_proc_t proc,
uint64_t* pos,
wr_action_append_t action)
{ {
args_wr_action_append a; args_wr_action_append a;
a.buffer_position = *pos; a.buffer_position = *pos;
...@@ -127,7 +145,9 @@ static hg_return_t encode_write_action_append(hg_proc_t proc, uint64_t* pos, wr_ ...@@ -127,7 +145,9 @@ static hg_return_t encode_write_action_append(hg_proc_t proc, uint64_t* pos, wr_
return hg_proc_memcpy(proc, &a, sizeof(a)); return hg_proc_memcpy(proc, &a, sizeof(a));
} }
static hg_return_t decode_write_action_append(hg_proc_t proc, uint64_t* pos, wr_action_append_t* action) static hg_return_t decode_write_action_append(hg_proc_t proc,
uint64_t* pos,
wr_action_append_t* action)
{ {
hg_return_t ret = HG_SUCCESS; hg_return_t ret = HG_SUCCESS;
args_wr_action_append a; args_wr_action_append a;
...@@ -142,12 +162,16 @@ static hg_return_t decode_write_action_append(hg_proc_t proc, uint64_t* pos, wr_ ...@@ -142,12 +162,16 @@ static hg_return_t decode_write_action_append(hg_proc_t proc, uint64_t* pos, wr_
return ret; return ret;
} }
static hg_return_t encode_write_action_remove(hg_proc_t proc, uint64_t* pos, wr_action_remove_t action) static hg_return_t encode_write_action_remove(hg_proc_t proc,
uint64_t* pos,
wr_action_remove_t action)
{ {
return HG_SUCCESS; return HG_SUCCESS;
} }
static hg_return_t decode_write_action_remove(hg_proc_t proc, uint64_t* pos, wr_action_remove_t* action) static hg_return_t decode_write_action_remove(hg_proc_t proc,
uint64_t* pos,
wr_action_remove_t* action)
{ {
hg_return_t ret = HG_SUCCESS; hg_return_t ret = HG_SUCCESS;
*action = (wr_action_remove_t)calloc(1, sizeof(**action)); *action = (wr_action_remove_t)calloc(1, sizeof(**action));
...@@ -155,14 +179,18 @@ static hg_return_t decode_write_action_remove(hg_proc_t proc, uint64_t* pos, wr_ ...@@ -155,14 +179,18 @@ static hg_return_t decode_write_action_remove(hg_proc_t proc, uint64_t* pos, wr_
return ret; return ret;
} }
static hg_return_t encode_write_action_truncate(hg_proc_t proc, uint64_t* pos, wr_action_truncate_t action) static hg_return_t encode_write_action_truncate(hg_proc_t proc,
uint64_t* pos,
wr_action_truncate_t action)
{ {
args_wr_action_truncate a; args_wr_action_truncate a;
a.offset = action->offset; a.offset = action->offset;
return hg_proc_memcpy(proc, &a, sizeof(a)); return hg_proc_memcpy(proc, &a, sizeof(a));
} }
static hg_return_t decode_write_action_truncate(hg_proc_t proc, uint64_t* pos, wr_action_truncate_t* action) static hg_return_t decode_write_action_truncate(hg_proc_t proc,
uint64_t* pos,
wr_action_truncate_t* action)
{ {
hg_return_t ret = HG_SUCCESS; hg_return_t ret = HG_SUCCESS;
args_wr_action_truncate a; args_wr_action_truncate a;
...@@ -175,7 +203,9 @@ static hg_return_t decode_write_action_truncate(hg_proc_t proc, uint64_t* pos, w ...@@ -175,7 +203,9 @@ static hg_return_t decode_write_action_truncate(hg_proc_t proc, uint64_t* pos, w
return ret; return ret;
} }
static hg_return_t encode_write_action_zero(hg_proc_t proc, uint64_t* pos, wr_action_zero_t action) static hg_return_t encode_write_action_zero(hg_proc_t proc,
uint64_t* pos,
wr_action_zero_t action)
{ {
args_wr_action_zero a; args_wr_action_zero a;
a.offset = action->offset; a.offset = action->offset;
...@@ -183,7 +213,9 @@ static hg_return_t encode_write_action_zero(hg_proc_t proc, uint64_t* pos, wr_ac ...@@ -183,7 +213,9 @@ static hg_return_t encode_write_action_zero(hg_proc_t proc, uint64_t* pos, wr_ac
return hg_proc_memcpy(proc, &a, sizeof(a)); return hg_proc_memcpy(proc, &a, sizeof(a));
} }
static hg_return_t decode_write_action_zero(hg_proc_t proc, uint64_t* pos, wr_action_zero_t* action) static hg_return_t decode_write_action_zero(hg_proc_t proc,
uint64_t* pos,
wr_action_zero_t* action)
{ {
hg_return_t ret = HG_SUCCESS; hg_return_t ret = HG_SUCCESS;
args_wr_action_zero a; args_wr_action_zero a;
...@@ -197,7 +229,9 @@ static hg_return_t decode_write_action_zero(hg_proc_t proc, uint64_t* pos, wr_ac ...@@ -197,7 +229,9 @@ static hg_return_t decode_write_action_zero(hg_proc_t proc, uint64_t* pos, wr_ac
return ret; return ret;
} }
static hg_return_t encode_write_action_omap_set(hg_proc_t proc, uint64_t* pos, wr_action_omap_set_t action) static hg_return_t encode_write_action_omap_set(hg_proc_t proc,
uint64_t* pos,
wr_action_omap_set_t action)
{ {
args_wr_action_omap_set a; args_wr_action_omap_set a;
a.num = action->num; a.num = action->num;
...@@ -207,7 +241,9 @@ static hg_return_t encode_write_action_omap_set(hg_proc_t proc, uint64_t* pos, w ...@@ -207,7 +241,9 @@ static hg_return_t encode_write_action_omap_set(hg_proc_t proc, uint64_t* pos, w
return hg_proc_memcpy(proc, action->data, action->data_size); return hg_proc_memcpy(proc, action->data, action->data_size);
} }
static hg_return_t decode_write_action_omap_set(hg_proc_t proc, uint64_t* pos, wr_action_omap_set_t* action) static hg_return_t decode_write_action_omap_set(hg_proc_t proc,
uint64_t* pos,
wr_action_omap_set_t* action)
{ {
hg_return_t ret = HG_SUCCESS; hg_return_t ret = HG_SUCCESS;
args_wr_action_omap_set a; args_wr_action_omap_set a;
...@@ -223,7 +259,9 @@ static hg_return_t decode_write_action_omap_set(hg_proc_t proc, uint64_t* pos, w ...@@ -223,7 +259,9 @@ static hg_return_t decode_write_action_omap_set(hg_proc_t proc, uint64_t* pos, w
return ret; return ret;
} }
static hg_return_t encode_write_action_omap_rm_keys(hg_proc_t proc, uint64_t* pos, wr_action_omap_rm_keys_t action) static hg_return_t encode_write_action_omap_rm_keys(hg_proc_t proc,
uint64_t* pos,
wr_action_omap_rm_keys_t action)
{ {
args_wr_action_omap_rm_keys a; args_wr_action_omap_rm_keys a;
a.num_keys = action->num_keys; a.num_keys = action->num_keys;
...@@ -233,7 +271,9 @@ static hg_return_t encode_write_action_omap_rm_keys(hg_proc_t proc, uint64_t* po ...@@ -233,7 +271,9 @@ static hg_return_t encode_write_action_omap_rm_keys(hg_proc_t proc, uint64_t* po
return hg_proc_memcpy(proc, action->data, action->data_size); return hg_proc_memcpy(proc, action->data, action->data_size);
} }
static hg_return_t decode_write_action_omap_rm_keys(hg_proc_t proc, uint64_t* pos, wr_action_omap_rm_keys_t* action) static hg_return_t decode_write_action_omap_rm_keys(hg_proc_t proc,
uint64_t* pos,
wr_action_omap_rm_keys_t* action)
{ {
hg_return_t ret = HG_SUCCESS; hg_return_t ret = HG_SUCCESS;
args_wr_action_omap_rm_keys a; args_wr_action_omap_rm_keys a;
...@@ -288,7 +328,7 @@ static decode_fn decode_write_action[_WRITE_OPCODE_END_ENUM_] = { ...@@ -288,7 +328,7 @@ static decode_fn decode_write_action[_WRITE_OPCODE_END_ENUM_] = {
* For encoding, the object should be prepared first (that is, the union fields * For encoding, the object should be prepared first (that is, the union fields
* pointing to either a buffer or an offset in a bulk should be an offset in a bulk). * pointing to either a buffer or an offset in a bulk should be an offset in a bulk).
*/ */
hg_return_t hg_proc_mobject_store_write_op_t(hg_proc_t proc, mobject_store_write_op_t write_op)