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
acaed861
Commit
acaed861
authored
Jun 14, 2016
by
Matthieu Schaller
Browse files
Removed dead code
parent
394e1ecc
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/task.c
View file @
acaed861
...
...
@@ -271,48 +271,6 @@ void task_rmunlock_blind(struct task *ta, struct task *tb) {
lock_unlock_blind
(
&
ta
->
lock
);
}
/**
* @brief Add an unlock_task to the given task.
*
* @param ta The unlocking #task.
* @param tb The #task that will be unlocked.
*/
void
task_addunlock
(
struct
task
*
ta
,
struct
task
*
tb
)
{
error
(
"Use sched_addunlock instead."
);
/* Add the lock atomically. */
ta
->
unlock_tasks
[
atomic_inc
(
&
ta
->
nr_unlock_tasks
)]
=
tb
;
/* Check a posteriori if we did not overshoot. */
if
(
ta
->
nr_unlock_tasks
>
task_maxunlock
)
error
(
"Too many unlock_tasks in task."
);
}
void
task_addunlock_old
(
struct
task
*
ta
,
struct
task
*
tb
)
{
int
k
;
lock_lock
(
&
ta
->
lock
);
/* Check if ta already unlocks tb. */
for
(
k
=
0
;
k
<
ta
->
nr_unlock_tasks
;
k
++
)
if
(
ta
->
unlock_tasks
[
k
]
==
tb
)
{
error
(
"Duplicate unlock."
);
lock_unlock_blind
(
&
ta
->
lock
);
return
;
}
if
(
ta
->
nr_unlock_tasks
==
task_maxunlock
)
error
(
"Too many unlock_tasks in task."
);
ta
->
unlock_tasks
[
ta
->
nr_unlock_tasks
]
=
tb
;
ta
->
nr_unlock_tasks
+=
1
;
lock_unlock_blind
(
&
ta
->
lock
);
}
/**
* @brief Prints the list of tasks contained in a given mask
*
...
...
src/task.h
View file @
acaed861
...
...
@@ -98,7 +98,6 @@ struct task {
void
task_rmunlock
(
struct
task
*
ta
,
struct
task
*
tb
);
void
task_rmunlock_blind
(
struct
task
*
ta
,
struct
task
*
tb
);
void
task_cleanunlock
(
struct
task
*
t
,
int
type
);
void
task_addunlock
(
struct
task
*
ta
,
struct
task
*
tb
);
void
task_unlock
(
struct
task
*
t
);
float
task_overlap
(
const
struct
task
*
ta
,
const
struct
task
*
tb
);
int
task_lock
(
struct
task
*
t
);
...
...
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