diff options
author | Daniel Leung <daniel.leung@intel.com> | 2016-05-03 13:45:55 -0700 |
---|---|---|
committer | Benjamin Walsh <benjamin.walsh@windriver.com> | 2016-05-04 15:16:55 +0000 |
commit | aed8ef4d4cf60c70af5941f1a288558d311f5385 (patch) | |
tree | 056af9354b82e37079f96b49c2892f42de4d7e7b /scripts/sysgen | |
parent | 6fd732f780b8aae10d19396bcccc6c0a69fa4c60 (diff) |
microkernel: events: fix undefined function error
The handler of the microkernel events are not declared properly.
This causes the public event objects to complain about
undefined functions. Fix this by declaring the function
before using it.
JIRA: ZEP-85
Change-Id: I68afe777bad66e010c92e637806a48911b2f52f4
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Diffstat (limited to 'scripts/sysgen')
-rwxr-xr-x | scripts/sysgen | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/scripts/sysgen b/scripts/sysgen index 1fbf87eea..d258dbda0 100755 --- a/scripts/sysgen +++ b/scripts/sysgen @@ -451,6 +451,15 @@ def kernel_main_c_events(): # project-specific events for event in event_list: + + # if there is a handler function, it needs to be declared + # before setting up the object via DEFINE_EVENT() + # + # in other words, no declaration if handler is NULL or 0 + handler = event[1].strip().lower() + if handler != "null" and handler != "0": + kernel_main_c_out("extern int %s(int event);\n"% (event[1])) + kernel_main_c_out("DEFINE_EVENT(%s, %s);\n" % (event[0], event[1])) if (event[0].startswith("_TaskIrqEvt")): |