Skip to content

Commit

Permalink
Merge branch '15-priority-segfault' into 'master'
Browse files Browse the repository at this point in the history
Fix priority

Closes #15

See merge request nos-v/nodes!42
  • Loading branch information
Antoni Navarro committed Feb 27, 2024
2 parents 70de5f1 + a894ab3 commit 76e87f8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 4 additions & 0 deletions src/system/TaskCreation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
2 changes: 0 additions & 2 deletions src/tasks/TaskMetadata.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,6 @@ class TaskMetadata {
_dataAccesses(taskAccessInfo),
_flags(flags)
{
// Initialize nOS-V priority if needed
computePriority();
}

inline bool hasCode() const
Expand Down

0 comments on commit 76e87f8

Please sign in to comment.