parinda
Member level 2
- Joined
- Jun 3, 2008
- Messages
- 44
- Helped
- 2
- Reputation
- 4
- Reaction score
- 1
- Trophy points
- 1,288
- Location
- sri lanka
- Activity points
- 1,533
Hi all
I think this question may already arose, but didn't see a good answer. so i thought to start new thread. My problem is what is the advantage of use semaphore over global flag ?
this is the situation. in my system two tasks use single RS232 out FIFO to send data. if any one task successfully sent data then acknowledgement will receive. so one senior person told me to use semaphore for this problem. My idea was to use simple global flag as this is simple case. so i would like to know what is the advantage of use of semaphore over global flag ( i know use of global flag is bad practice except that disadvantage are there any ?).
Thank you
B.R
Parinda
I think this question may already arose, but didn't see a good answer. so i thought to start new thread. My problem is what is the advantage of use semaphore over global flag ?
this is the situation. in my system two tasks use single RS232 out FIFO to send data. if any one task successfully sent data then acknowledgement will receive. so one senior person told me to use semaphore for this problem. My idea was to use simple global flag as this is simple case. so i would like to know what is the advantage of use of semaphore over global flag ( i know use of global flag is bad practice except that disadvantage are there any ?).
Thank you
B.R
Parinda