µTasker Forum
µTasker Forum => µTasker general => Topic started by: neil on January 09, 2009, 12:39:24 PM
-
Hi Mark,
I was going to make sure I am right, before I continue. I have a routine that is called from the serial,USB and ethernet task, so at any stage, one of these tasks can call this routine. I must make sure that one task doesnt call the routine when another task is already in it. I was going to place a variable lock at the start of the routine,so each task has to wait till its free before continuing.
But, am I right in saying, a task has to complete before another one gets control? And as this routine is only called from a task, and not an interupt directly, then there is no need for the lock?
Neil
-
Hi Neil
This is correct. Only interrupts need to be considered, whereas the uTasker OS/driver routines and interrupts are fully protected. Therefore you only need to really worry about your own interrupts which may be interacting with your own code's variable.
Regards
Mark