Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
SWIFTsim
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SWIFT
SWIFTsim
Commits
acaed861
Commit
acaed861
authored
8 years ago
by
Matthieu Schaller
Browse files
Options
Downloads
Patches
Plain Diff
Removed dead code
parent
394e1ecc
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!180
Task sub split
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/task.c
+0
-42
0 additions, 42 deletions
src/task.c
src/task.h
+0
-1
0 additions, 1 deletion
src/task.h
with
0 additions
and
43 deletions
src/task.c
+
0
−
42
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
*
...
...
This diff is collapsed.
Click to expand it.
src/task.h
+
0
−
1
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
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment