diff options
author | Juri Lelli <juri.lelli@arm.com> | 2016-11-17 11:35:13 +0000 |
---|---|---|
committer | Juri Lelli <juri.lelli@arm.com> | 2016-11-25 08:21:18 +0000 |
commit | 74820a3998053e424e9f198d8770f10fa30b32ce (patch) | |
tree | 2327377e12277e109d8ca90859ed5d8b959af938 /src/rt-app_parse_config.c | |
parent | 9415c2e4a5b3f18655577a3fa789d39b2c2d6d38 (diff) |
rt-app: add delay thread property
Add a new thread property called 'delay' with which the initial starting
time of a thread can be delayed. Parameter is expressed in usec.
Usage is:
"tasks" : {
"thread0" : {
...
"delay" : 1000000,
...
}
}
Signed-off-by: Juri Lelli <juri.lelli@arm.com>
Acked-by: Vincent Guittot <vincent.guittot@linaro.org>
Diffstat (limited to 'src/rt-app_parse_config.c')
-rw-r--r-- | src/rt-app_parse_config.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/rt-app_parse_config.c b/src/rt-app_parse_config.c index c59b562..b0f302e 100644 --- a/src/rt-app_parse_config.c +++ b/src/rt-app_parse_config.c @@ -689,6 +689,11 @@ parse_thread_data(char *name, struct json_object *obj, int index, } log_info(PIN "key: cpus %s", data->cpuset_str); + /* initial delay */ + data->delay = get_int_value_from(obj, "delay", TRUE, 0); + if (data->delay < 0) + data->delay = 0; + /* Get phases */ phases_obj = get_in_object(obj, "phases", TRUE); if (phases_obj) { |