Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SWIFT
SWIFTsim
Commits
b76f2590
Commit
b76f2590
authored
Feb 15, 2016
by
Matthieu Schaller
Browse files
The task_print_mask() function makes a comeback with its brother task_print_submask()
parent
c974d3d5
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/task.c
View file @
b76f2590
...
...
@@ -304,3 +304,29 @@ void task_addunlock_old(struct task *ta, struct task *tb) {
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
"
);
}
src/task.h
View file @
b76f2590
...
...
@@ -96,6 +96,7 @@ void task_unlock(struct task *t);
float
task_overlap
(
const
struct
task
*
ta
,
const
struct
task
*
tb
);
int
task_lock
(
struct
task
*
t
);
void
task_print_mask
(
unsigned
int
mask
);
void
task_print_submask
(
unsigned
int
submask
);
void
task_do_rewait
(
struct
task
*
t
);
#endif
/* SWIFT_TASK_H */
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment