|
From: Simon B. <ks...@fl...> - 2011-04-05 15:03:30
|
On Tue, 2011-04-05 at 10:13 -0400, David Kopf wrote:
> I had not looked at that with much depth before, thought
> AUTOSTART_PROCESSES was a macro that you could use several times to
> append the args to the autostart_processes[] array. But apparently it
> can only be used once and you have to include all the autostart
> processes,
> AUTOSTART_PROCESSES(&sky_shell_process, &webserver_nogui_process);
> So you’ll have to merge your autostart with the other one, or start
> the process manually in the main routine with e.g.
> process_start(&receive_buf_process , NULL).
> Maybe some c guru can suggest how
> #define AUTOSTART_PROCESSES(...) struct process * const
> autostart_processes[] = {__VA_ARGS__, NULL}
> can be invoked more than once across several files to append all the
> application processes into the build.
The only way I can think of involves linker-tricks and wouldn't be very
portable. (i.e. putting the arrays in a separate section)
If someone knows a better way I'd be very interested.
simon
|