using in main() chSemResetI and so on Topic is solved
using in main() chSemResetI and so on Topic is solved
Can i use functions chSemResetI(), chSemGetCounterI() and so on after chSysInit() ?
- RoccoMarco
- Posts: 655
- Joined: Wed Apr 24, 2013 4:11 pm
- Location: Munich (Germany)
- Has thanked: 83 times
- Been thanked: 67 times
- Contact:
Re: using in main() chSemResetI and so on
Yes you can do this. Take a look to os\nil\include\nil.h: all the functions and macros available in NIL are declared here. Otherwise you can look the documentation here under the voice Modules/NIL Kernel/API
Ciao,
RM
Ciao,
RM
- Giovanni
- Site Admin
- Posts: 14461
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1077 times
- Been thanked: 922 times
- Contact:
Re: using in main() chSemResetI and so on
The main is the idle thread in NIL. You can use any I-class function as follow:
Of course you could just do:
You cannot call there those functions that can case the thread to sleep, for example: chThdSleep(), chSemWait() etc.
Giovanni
Code: Select all
chSysLock();
chSemResetI(...);
chSchRescheduleS();
chSysUnlock();
Of course you could just do:
Code: Select all
chSemReset(...);
You cannot call there those functions that can case the thread to sleep, for example: chThdSleep(), chSemWait() etc.
Giovanni
Who is online
Users browsing this forum: No registered users and 1 guest