AW: [En-Nut-Discussion] Posting an event to main()
Oliver Schulz
olischulz at web.de
Mon Jul 26 21:32:34 CEST 2004
Hi Anton,
> Do I have to modify init.c and recompile NUT/OS with the
> above statement as
> follow?
> NutThreadCreate("main", NutMain, &myevent, 768);
> Or is there a simpler method?
Yes. Just use a global variable in main.c (the file where your main() is
implemented) like this:
HANDLE myevent;
If your second thread is not in main.c use the following definition at the
beginning of the file:
extern HANDLE myevent;
Thats all.
Cheers,
Oliver.
More information about the En-Nut-Discussion
mailing list