Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
Software for White Rabbit PTP Core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
32
Issues
32
List
Board
Labels
Milestones
Merge Requests
5
Merge Requests
5
CI / CD
CI / CD
Pipelines
Schedules
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
Software for White Rabbit PTP Core
Commits
b5d86591
Commit
b5d86591
authored
Feb 20, 2021
by
Adam Wujek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lib/wrs-tasks: rename two functions
Signed-off-by:
Adam Wujek
<
adam.wujek@creotech.pl
>
parent
38791af8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
8 deletions
+11
-8
wrc-task.h
include/wrc-task.h
+2
-2
wrc-tasks.c
lib/wrc-tasks.c
+4
-4
wrc_main.c
wrc_main.c
+5
-2
No files found.
include/wrc-task.h
View file @
b5d86591
...
...
@@ -27,11 +27,11 @@ struct wrc_task {
unsigned
long
max_run_ticks
;
/* in ticks */
};
void
wrc_tasks_init
(
void
);
void
wrc_tasks_
pre
init
(
void
);
struct
wrc_task
*
wrc_task_create
(
const
char
*
name
,
void
(
*
init
)(
void
),
int
(
*
job
)(
void
)
);
void
wrc_task_set_enable
(
struct
wrc_task
*
task
,
int
(
*
enabled
)(
void
)
);
struct
wrc_task
*
wrc_task_get
(
int
tid
);
void
wrc_
start_all_task
s
(
void
);
void
wrc_
tasks_run_init
s
(
void
);
void
wrc_poll_all_tasks
(
void
);
void
wrc_tasks_accounting_init
(
void
);
int
wrc_task_not_yet
(
uint32_t
*
lastt
,
unsigned
period
);
...
...
lib/wrc-tasks.c
View file @
b5d86591
...
...
@@ -115,12 +115,12 @@ void wrc_task_set_enable( struct wrc_task* task, int (*enabled)(void) )
task
->
enabled
=
enabled
;
}
void
wrc_tasks_
init
(
)
void
wrc_tasks_
preinit
(
void
)
{
memset
(
&
tasks
,
0
,
sizeof
(
struct
wrc_task
)
*
WRC_MAX_TASKS
);
}
void
wrc_poll_all_tasks
()
void
wrc_poll_all_tasks
(
void
)
{
int
i
;
...
...
@@ -131,7 +131,7 @@ void wrc_poll_all_tasks()
}
}
void
wrc_
start_all_tasks
(
)
void
wrc_
tasks_run_inits
(
void
)
{
int
i
;
...
...
@@ -142,7 +142,7 @@ void wrc_start_all_tasks()
}
}
void
wrc_tasks_accounting_init
()
void
wrc_tasks_accounting_init
(
void
)
{
shw_pps_gen_get_time
(
NULL
,
&
prev_nanos_for_profile
);
/* get tics */
...
...
wrc_main.c
View file @
b5d86591
...
...
@@ -274,7 +274,10 @@ static void create_tasks(void)
{
struct
wrc_task
*
t
;
wrc_tasks_init
();
/* clear task table in case of a reset */
wrc_tasks_preinit
();
/* create all other tasks */
wrc_task_create
(
"idle"
,
NULL
,
NULL
);
wrc_task_create
(
"check-link"
,
NULL
,
wrc_check_link
);
wrc_task_create
(
"uptime"
,
init_uptime
,
update_uptime
);
...
...
@@ -336,7 +339,7 @@ int main(void)
wrc_initialize
();
/* initialization of individual tasks */
wrc_
start_all_task
s
();
wrc_
tasks_run_init
s
();
for
(;;)
{
// run all pending tasks
...
...
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