Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Limitation of using global variable as semaphore in RTOS

Status
Not open for further replies.

sacrpio

Member level 3
Member level 3
Joined
May 24, 2004
Messages
56
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,288
Activity points
500
ANYBODY RTOS EXPERT

DEAR FRIEND,
I WANT TO USE GLOBAL VARIABLE AS A BINARY SEMAPHORE IN ONE MY RTOS PROGRAM. I KNOW IT IS POSSIBLE, BUT I DONOT KNOW THE LIMITATION WITH THIS TYPE OF USE. WHAT ARE THE LIMITATION (EXCLUDING FACILITY OF MUTEX SEMAPHORE) HERE.

THANKS
 

ANYBODY RTOS EXPERT

Actually, "binary semaphore" and "mutex semaphore" are the same. As to implementation - it is the standard rule: you have to ensure atomic operations of test-modify for your semaphore if your system is pre-emptive. In others words, there should be no task switching during operation like "if (mutex==0) then mutex=1;".
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top