Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
FORMUS3IC_LAS3
/
embb
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
cf15b2b6
authored
Aug 23, 2016
by
Tobias Langer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Switched from global task queue to global priority queue.
parent
429e58d6
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
7 deletions
+7
-7
mtapi_c/src/embb_mtapi_node_t.c
+2
-2
mtapi_c/src/embb_mtapi_node_t.h
+2
-2
mtapi_c/src/embb_mtapi_scheduler_t.c
+3
-3
No files found.
mtapi_c/src/embb_mtapi_node_t.c
View file @
cf15b2b6
...
@@ -130,7 +130,7 @@ void mtapi_initialize(
...
@@ -130,7 +130,7 @@ void mtapi_initialize(
}
}
#ifdef EMBB_HARD_REALTIME
#ifdef EMBB_HARD_REALTIME
embb_mtapi_
task
_queue_initialize_with_capacity
(
embb_mtapi_
priority
_queue_initialize_with_capacity
(
&
node
->
global_task_queue
,
&
node
->
global_task_queue
,
node
->
attributes
.
max_tasks
);
node
->
attributes
.
max_tasks
);
#endif
#endif
...
@@ -209,7 +209,7 @@ void mtapi_finalize(MTAPI_OUT mtapi_status_t* status) {
...
@@ -209,7 +209,7 @@ void mtapi_finalize(MTAPI_OUT mtapi_status_t* status) {
}
}
#ifdef EMBB_HARD_REALTIME
#ifdef EMBB_HARD_REALTIME
embb_mtapi_
task
_queue_finalize
(
&
node
->
global_task_queue
);
embb_mtapi_
priority
_queue_finalize
(
&
node
->
global_task_queue
);
#endif
#endif
/* free system instance */
/* free system instance */
...
...
mtapi_c/src/embb_mtapi_node_t.h
View file @
cf15b2b6
...
@@ -33,7 +33,7 @@
...
@@ -33,7 +33,7 @@
#include <embb_mtapi_log.h>
#include <embb_mtapi_log.h>
#ifdef EMBB_HARD_REALTIME
#ifdef EMBB_HARD_REALTIME
#include <embb_mtapi_
task
_queue_t.h>
#include <embb_mtapi_
priority
_queue_t.h>
#endif
/*EMBB_HARD_REALTIME*/
#endif
/*EMBB_HARD_REALTIME*/
#ifdef __cplusplus
#ifdef __cplusplus
...
@@ -76,7 +76,7 @@ struct embb_mtapi_node_struct {
...
@@ -76,7 +76,7 @@ struct embb_mtapi_node_struct {
embb_atomic_int
is_scheduler_running
;
embb_atomic_int
is_scheduler_running
;
mtapi_affinity_t
affinity_all
;
mtapi_affinity_t
affinity_all
;
#ifdef EMBB_HARD_REALTIME
#ifdef EMBB_HARD_REALTIME
embb_mtapi_
task
_queue_t
global_task_queue
;
embb_mtapi_
priority
_queue_t
global_task_queue
;
#endif
/*EMBB_HARD_REALTIME*/
#endif
/*EMBB_HARD_REALTIME*/
};
};
...
...
mtapi_c/src/embb_mtapi_scheduler_t.c
View file @
cf15b2b6
...
@@ -38,7 +38,7 @@
...
@@ -38,7 +38,7 @@
#include <embb_mtapi_task_context_t.h>
#include <embb_mtapi_task_context_t.h>
#include <embb_mtapi_task_t.h>
#include <embb_mtapi_task_t.h>
#ifdef EMBB_HARD_REALTIME
#ifdef EMBB_HARD_REALTIME
#include <embb_mtapi_
task
_queue_t.h>
#include <embb_mtapi_
priority
_queue_t.h>
#endif
/*EMBB_HARD_REALTIME*/
#endif
/*EMBB_HARD_REALTIME*/
#include <embb_mtapi_action_t.h>
#include <embb_mtapi_action_t.h>
#include <embb_mtapi_alloc.h>
#include <embb_mtapi_alloc.h>
...
@@ -181,7 +181,7 @@ embb_mtapi_task_t * embb_mtapi_scheduler_get_next_task_gedf(
...
@@ -181,7 +181,7 @@ embb_mtapi_task_t * embb_mtapi_scheduler_get_next_task_gedf(
assert
(
MTAPI_NULL
!=
that
);
assert
(
MTAPI_NULL
!=
that
);
assert
(
MTAPI_NULL
!=
node
);
assert
(
MTAPI_NULL
!=
node
);
task
=
embb_mtapi_
task
_queue_pop
(
&
node
->
global_task_queue
);
task
=
embb_mtapi_
priority
_queue_pop
(
&
node
->
global_task_queue
);
return
task
;
return
task
;
}
}
...
@@ -649,7 +649,7 @@ mtapi_boolean_t embb_mtapi_scheduler_schedule_task(
...
@@ -649,7 +649,7 @@ mtapi_boolean_t embb_mtapi_scheduler_schedule_task(
/* one more task in flight for this action */
/* one more task in flight for this action */
embb_atomic_fetch_and_add_int
(
&
local_action
->
num_tasks
,
1
);
embb_atomic_fetch_and_add_int
(
&
local_action
->
num_tasks
,
1
);
pushed
=
embb_mtapi_
task
_queue_push
(
&
node
->
global_task_queue
,
task
);
pushed
=
embb_mtapi_
priority
_queue_push
(
&
node
->
global_task_queue
,
task
);
if
(
!
pushed
)
{
if
(
!
pushed
)
{
embb_atomic_fetch_and_add_int
(
&
local_action
->
num_tasks
,
-
1
);
embb_atomic_fetch_and_add_int
(
&
local_action
->
num_tasks
,
-
1
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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