patacongo commented on pull request #1602: URL: https://github.com/apache/incubator-nuttx/pull/1602#issuecomment-680129897
There are some startup hooks that might be usable for such a purpose with some extensions??? sched/task/task_starthook.c The the start hooks are not currently set up in a way that would be usable to you because it really only works if the TCB has been created (via nxtask_init()) but not yet started (via nxtask_activate()). It is currently using only in binfmt/binfmt_execmodule.c when an ELF task is created in order to run the C++ static constuctors (This is a documented security Issue #1265 for this). Hmm... I think it would be fine to implement a abstracted, generalized, platform-specific hook in sched/task/task_init.c or maybe nxtask_activate. It would be wrapped and a general external task startup hook: * It would have a name like up_start_hook() * It would be prototyped in include/nuttx/arch.h * There would be a configuration in sched/Kconfig like ARCH_STARTHOOK That should work if I understand what you need correctly. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org