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
86460d14
Commit
86460d14
authored
Jun 23, 2013
by
Pedro Gonnet
Browse files
fix inserted logic bug.
Former-commit-id: dde4d6fa8bf07c0be6ba80c5a4da77575a1dd877
parent
692bb903
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/queue.c
View file @
86460d14
...
...
@@ -118,9 +118,9 @@ void queue_insert ( struct queue *q , struct task *t ) {
} */
/* Verify queue consistency. */
/*
for ( int k = 1 ; k < q->count ; k++ )
for
(
int
k
=
1
;
k
<
q
->
count
;
k
++
)
if
(
q
->
tasks
[
q
->
tid
[(
k
-
1
)
/
2
]
].
weight
<
q
->
tasks
[
q
->
tid
[
k
]
].
weight
)
error( "Queue not heaped." );
*/
error
(
"Queue not heaped."
);
/* Unlock the queue. */
if
(
lock_unlock
(
&
q
->
lock
)
!=
0
)
...
...
@@ -269,9 +269,9 @@ struct task *queue_gettask ( struct queue *q , int qid , int blocking ) {
} */
/* Verify queue consistency. */
/*
for ( k = 1 ; k < q->count ; k++ )
for
(
k
=
1
;
k
<
q
->
count
;
k
++
)
if
(
q
->
tasks
[
q
->
tid
[(
k
-
1
)
/
2
]
].
weight
<
q
->
tasks
[
q
->
tid
[
k
]
].
weight
)
error( "Queue not heaped." );
*/
error
(
"Queue not heaped."
);
}
else
...
...
src/scheduler.c
View file @
86460d14
...
...
@@ -563,7 +563,7 @@ void scheduler_start ( struct scheduler *s , unsigned int mask ) {
// #pragma omp parallel for schedule(static) private(t,j)
for
(
k
=
s
->
nr_tasks
-
1
;
k
>=
0
;
k
--
)
{
t
=
&
tasks
[
tid
[
k
]
];
if
(
!
(
(
1
<<
t
->
type
)
&
mask
)
||
!
t
->
skip
)
if
(
!
(
(
1
<<
t
->
type
)
&
mask
)
||
t
->
skip
)
continue
;
for
(
j
=
0
;
j
<
t
->
nr_unlock_tasks
;
j
++
)
atomic_inc
(
&
t
->
unlock_tasks
[
j
]
->
wait
);
...
...
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