Hallo,
i use tsk_lock() for disables task switching(on Arm Cortex-M3) is this the same function as NVIC_DisableIRQ(SysTick_IRQn)
i wonder because tsk_lock() takes longer then calling NVIC_DisableIRQ(SysTick_IRQn)
Rgds, Willi Huber
Sounds like the two functions does completely different things.
Disabling the systick counter sounds like a solution that wouldn't allow the RTOS to see time, potentially increasing the timeouts or timers.
Hi Per,
please take o look on http://www.keil.com/support/man/docs/rlarm/rlarm_tsk_lock.htm
The tsk_lock function disables the RTX kernel timer interrupts and thereby disables task switching.
So i want to figure out what is exactly the difference between these two possibility to prevent task switching.
Rgds, mario
one difference is that 'os_tsk_lock' is a SWI function.
OK. It really is that aggresive.
So if i run RTX-kernel in Privileged Mode i can use NVIC_DisableIRQ(SysTick_IRQn instead of use tsk_lock() with no disadvantges ?
using the OS API can have side effects beyond what you immediately assume. how do you know RTX is not doing anything beyond disabling the interrupt? the best way to know is too look at the source (I'm too lazy now to do it...)
"using the OS API can have side effects beyond what you immediately assume."
For those who AREN'T reluctant to read the Keil supported documentation, it can be whole lot easier.
The on-line help states:
Looking at the source code and you find, guess what, the timer interrupt is disabled. No more, no less.
Now that didn't prove anything other than that Keil didn't miss to document any side effects for this specific function.
We have already discussed other functions where Keil did not document all significant behaviour.
but I only warned him to do something you repeated - with the remark to keep in mind not to only trust advise or instinct. you are a troll, Steve, admit it.
Stunned Steve silently sits sending short sarcastic stings, secretly smiling, sensing strong symptoms superheated steam soon surfacing.
Per, I wouldn't worry too much. I don't care what he writes or says (I would have if it contained something other than unsuccessful attempts to annoy, thus: meaningful payload. Maybe he was personally offended by me "abusing" RTX (I never did and don't now - I was merely pointing out a feature). Let him talk. Wow, big deal. He really is convinced he looks smart. OK. Let's move on.