On 28 May 2015 at 14:05, Pi-Cheng Chen pi-cheng.chen@linaro.org wrote:
On Thu, May 28, 2015 at 7:04 PM, Vincent Guittot vincent.guittot@linaro.org wrote:
On 27 May 2015 at 10:52, Juri Lelli juri.lelli@arm.com wrote:
Hi,
On 05/13/2015 04:31 AM, pi-cheng.chen wrote:
Signed-off-by: Vincent Guittot vincent.guittot@linaro.org
src/rt-app_parse_config.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)
diff --git a/src/rt-app_parse_config.c b/src/rt-app_parse_config.c index 85aa14f..cd0ddcd 100644 --- a/src/rt-app_parse_config.c +++ b/src/rt-app_parse_config.c @@ -364,6 +364,18 @@ parse_thread_data(char *name, struct json_object *obj, int idx, data->min_et = usec_to_timespec(exec); data->max_et = usec_to_timespec(exec);
/* deadline */
dline = get_int_value_from(obj, "deadline", TRUE, period);
if (dline < exec) {
log_critical(PIN2 "Deadline cannot be less than exec time");
exit(EXIT_INV_CONFIG);
}
if (dline > period) {
log_critical(PIN2 "Deadline cannot be greater than period");
exit(EXIT_INV_CONFIG);
}
data->deadline = usec_to_timespec(dline);
There is already this exact snippet a bit below, after "priority".
Pi-Cheng,
Can you point the original sha1 ? I can't find it in g.l.o to try to understand the duplication
Hi Vincent,
The original sha1 is 80debd6a5a28b162a69c981c0f42b9ee61777a41 I think I made a mistake when I was cherry-picking this patch and fixing the conflicts. In the original patch, it was not trying to add this code snip but moving the code snip to above the code getting policy instead. Sorry for that.
BTW, do you remember the reason for doing the move?
IIRC, the goal was only to gather the settings of exec time, period time and deadline time in one place
Regards, Vincent
Best Regards, Pi-Cheng
Regards, Vincent
Thanks,
- Juri
/* policy */ policy_to_string(opts->policy, def_policy); policy = get_string_value_from(obj, "policy", TRUE, def_policy);