Commit b76f2590 authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

The task_print_mask() function makes a comeback with its brother task_print_submask()

parent c974d3d5
...@@ -304,3 +304,29 @@ void task_addunlock_old(struct task *ta, struct task *tb) { ...@@ -304,3 +304,29 @@ void task_addunlock_old(struct task *ta, struct task *tb) {
lock_unlock_blind(&ta->lock); lock_unlock_blind(&ta->lock);
} }
/**
* @brief Prints the list of tasks contained in a given mask
*
* @param The mask to analyse
*/
void task_print_mask(unsigned int mask) {
printf("task_print_mask: The tasks to run are [");
for (int k = 1; k < task_type_count; k++)
printf(" %s=%s", taskID_names[k], (mask & (1 << k)) ? "yes" : "no");
printf(" ]\n");
}
/**
* @brief Prints the list of subtasks contained in a given submask
*
* @param The submask to analyse
*/
void task_print_submask(unsigned int submask) {
printf("task_print_submask: The subtasks to run are [");
for (int k = 1; k < task_subtype_count; k++)
printf(" %s=%s", subtaskID_names[k], (submask & (1 << k)) ? "yes" : "no");
printf(" ]\n");
}
...@@ -96,6 +96,7 @@ void task_unlock(struct task *t); ...@@ -96,6 +96,7 @@ void task_unlock(struct task *t);
float task_overlap(const struct task *ta, const struct task *tb); float task_overlap(const struct task *ta, const struct task *tb);
int task_lock(struct task *t); int task_lock(struct task *t);
void task_print_mask(unsigned int mask); void task_print_mask(unsigned int mask);
void task_print_submask(unsigned int submask);
void task_do_rewait(struct task *t); void task_do_rewait(struct task *t);
#endif /* SWIFT_TASK_H */ #endif /* SWIFT_TASK_H */
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment