diff --git a/src/system/TaskCreation.cpp b/src/system/TaskCreation.cpp index 72c5727..be4bd19 100644 --- a/src/system/TaskCreation.cpp +++ b/src/system/TaskCreation.cpp @@ -274,6 +274,10 @@ void nanos6_submit_task(void *taskHandle) // own space of data dependencies TaskMetadata *taskMetadata = TaskMetadata::getTaskMetadata(task); nosv_task_t parentTask = nosv_self(); + + // Initialize nOS-V priority if needed + taskMetadata->computePriority(); + if (!taskMetadata->isSpawned() && parentTask != nullptr) { taskMetadata->setParent(parentTask); } diff --git a/src/tasks/TaskMetadata.hpp b/src/tasks/TaskMetadata.hpp index b571628..71c2fc4 100644 --- a/src/tasks/TaskMetadata.hpp +++ b/src/tasks/TaskMetadata.hpp @@ -163,8 +163,6 @@ class TaskMetadata { _dataAccesses(taskAccessInfo), _flags(flags) { - // Initialize nOS-V priority if needed - computePriority(); } inline bool hasCode() const