Commit 3ed41486 by Marcus Winter

mtapi_network_c: fixed 64bit issue

parent b3be3691
...@@ -226,7 +226,7 @@ static int embb_mtapi_network_thread(void * args) { ...@@ -226,7 +226,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_uint_t priority = 0;
mtapi_job_hndl_t job_hndl; mtapi_job_hndl_t job_hndl;
mtapi_task_attributes_t task_attr; mtapi_task_attributes_t task_attr;
void * arguments; void * arguments;
...@@ -247,7 +247,8 @@ static int embb_mtapi_network_thread(void * args) { ...@@ -247,7 +247,8 @@ static int embb_mtapi_network_thread(void * args) {
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 // priority
err = embb_mtapi_network_buffer_pop_front_int32(&buffer, &priority); err = embb_mtapi_network_buffer_pop_front_int32(
&buffer, (int32_t*)&priority);
assert(err == 4); 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(
...@@ -282,13 +283,16 @@ static int embb_mtapi_network_thread(void * args) { ...@@ -282,13 +283,16 @@ static int embb_mtapi_network_thread(void * args) {
network_task->socket = *socket; network_task->socket = *socket;
mtapi_taskattr_init(&task_attr, &local_status); mtapi_taskattr_init(&task_attr, &local_status);
assert(local_status == MTAPI_SUCCESS);
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);
assert(local_status == MTAPI_SUCCESS);
mtapi_boolean_t task_detached = MTAPI_TRUE; mtapi_boolean_t task_detached = MTAPI_TRUE;
mtapi_taskattr_set(&task_attr, MTAPI_TASK_DETACHED, mtapi_taskattr_set(&task_attr, MTAPI_TASK_DETACHED,
(void*)&task_detached, sizeof(mtapi_boolean_t), &local_status); (void*)&task_detached, sizeof(mtapi_boolean_t), &local_status);
assert(local_status == MTAPI_SUCCESS);
mtapi_taskattr_set(&task_attr, MTAPI_TASK_PRIORITY, mtapi_taskattr_set(&task_attr, MTAPI_TASK_PRIORITY,
(void*)&priority, sizeof(int32_t), &local_status); (void*)&priority, sizeof(mtapi_uint_t), &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,
......
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