Commit b6fa354f by Marcus Winter

mtapi_network_c: transfer priority

parent 317e47d7
...@@ -222,6 +222,7 @@ static int embb_mtapi_network_thread(void * args) { ...@@ -222,6 +222,7 @@ static int embb_mtapi_network_thread(void * args) {
if (operation == EMBB_MTAPI_NETWORK_START_TASK) { if (operation == EMBB_MTAPI_NETWORK_START_TASK) {
int32_t arguments_size; int32_t arguments_size;
int32_t priority;
mtapi_job_hndl_t job_hndl; mtapi_job_hndl_t job_hndl;
mtapi_task_hndl_t task_hndl; mtapi_task_hndl_t task_hndl;
mtapi_task_attributes_t task_attr; mtapi_task_attributes_t task_attr;
...@@ -234,14 +235,17 @@ static int embb_mtapi_network_thread(void * args) { ...@@ -234,14 +235,17 @@ static int embb_mtapi_network_thread(void * args) {
mtapi_status_t local_status = MTAPI_ERR_UNKNOWN; mtapi_status_t local_status = MTAPI_ERR_UNKNOWN;
err = embb_mtapi_network_socket_recvbuffer_sized( err = embb_mtapi_network_socket_recvbuffer_sized(
socket, &buffer, 24); socket, &buffer, 28);
assert(err == 24); assert(err == 28);
// domain id // domain id
err = embb_mtapi_network_buffer_pop_front_int32(&buffer, &domain_id); err = embb_mtapi_network_buffer_pop_front_int32(&buffer, &domain_id);
assert(err == 4); assert(err == 4);
// job id // job id
err = embb_mtapi_network_buffer_pop_front_int32(&buffer, &job_id); err = embb_mtapi_network_buffer_pop_front_int32(&buffer, &job_id);
assert(err == 4); assert(err == 4);
// priority
err = embb_mtapi_network_buffer_pop_front_int32(&buffer, &priority);
assert(err == 4);
// remote task handle // remote task handle
err = embb_mtapi_network_buffer_pop_front_int32( err = embb_mtapi_network_buffer_pop_front_int32(
&buffer, &network_task->remote_task_id); &buffer, &network_task->remote_task_id);
...@@ -277,6 +281,8 @@ static int embb_mtapi_network_thread(void * args) { ...@@ -277,6 +281,8 @@ static int embb_mtapi_network_thread(void * args) {
mtapi_taskattr_init(&task_attr, &local_status); mtapi_taskattr_init(&task_attr, &local_status);
mtapi_taskattr_set(&task_attr, MTAPI_TASK_USER_DATA, mtapi_taskattr_set(&task_attr, MTAPI_TASK_USER_DATA,
(void*)network_task, 0, &local_status); (void*)network_task, 0, &local_status);
mtapi_taskattr_set(&task_attr, MTAPI_TASK_PRIORITY,
(void*)priority, 0, &local_status);
assert(local_status == MTAPI_SUCCESS); assert(local_status == MTAPI_SUCCESS);
memcpy(&func_void, &func, sizeof(void*)); memcpy(&func_void, &func, sizeof(void*));
mtapi_taskattr_set(&task_attr, MTAPI_TASK_COMPLETE_FUNCTION, mtapi_taskattr_set(&task_attr, MTAPI_TASK_COMPLETE_FUNCTION,
...@@ -475,6 +481,10 @@ static void network_task_start( ...@@ -475,6 +481,10 @@ static void network_task_start(
assert(err == 4); assert(err == 4);
err = embb_mtapi_network_buffer_push_back_int32( err = embb_mtapi_network_buffer_push_back_int32(
send_buf, local_task->attributes.priority);
assert(err == 4);
err = embb_mtapi_network_buffer_push_back_int32(
send_buf, local_task->handle.id); send_buf, local_task->handle.id);
assert(err == 4); assert(err == 4);
err = embb_mtapi_network_buffer_push_back_int32( err = embb_mtapi_network_buffer_push_back_int32(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment