This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

[RTX] Queries on Mutexes

Hi,
We use Keil RTX in our projects where their are multiple tasks. Have some queries on Keil RTX mutexes.
1) I have one resource (variable) that is used in multiple tasks. One reads it while the other sets it. Lets say the section for writing into the variable is mutex locked and unlocked after this. Can the other section in same or different task be able to read it while the mutex is currently locked? Mutex is locked while the variable is read.
2) After we have read the variable in the task, we process it which takes somewhat a little execution time. Is it recommended to lock mutex while reading? this is considering we can wait for mutex for writing operation for a limited period of time.

Regards,
blueshift