MDK-ARM Keil, MDK-ARM Datasheet - Page 37
![KIT REALVIEW MCU DEVELOPMENT](/photos/9/32/93274/mdk-arm_sml.jpg)
MDK-ARM
Manufacturer Part Number
MDK-ARM
Description
KIT REALVIEW MCU DEVELOPMENT
Manufacturer
Keil
Type
Compiler and IDEr
Specifications of MDK-ARM
For Use With/related Products
ARM MCUs
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
- Current page: 37 of 156
- Download datasheet (3Mb)
Getting Started: Building Applications with RL-ARM
The code for the entry turnstile is duplicated in each of the participating tasks:
os_sem_init(Mutex, 1);
os_sem_init(Entry_Turnstile, 0);
os_sem_init(Exit_Turnstile, 1);
count = 0;
……………
while (1)
……………
In this example, a barrier synchronizes four tasks. As the first task arrives, it will
increment the count variable. Execution continues until it reaches the turnstile
gate os_sem_wait(Entry_Turnstile,0xffff). At this point, the Entry_Turnstile
semaphore is zero. This will cause the task to halt and de-schedule. The same
will happen to the second and third task. When the fourth task enters the
turnstile, the value of count will become four. This causes the
if( count == 4) statement to be executed. Now, a token is placed into the
Entry_Turnstile semaphore. When the fourth task reaches the
os_sem_wait(Entry_Turnstile,0xffff) statement, a token is available, so it can
continue execution. The turnstile gate is now open. Once the fourth task has
passed through the gate, it places a token back into the Entry_Turnstile
semaphore. This allows a waiting task to resume execution. As each waiting
task resumes, it writes a token into the Entry_Turnstile semaphore. The Mutex
semaphore locks access to the critical section of the turnstile. The Mutex
semaphore ensures that each task will exclusively execute the critical section. In
the critical section, the last arriving task will also remove a token from
Exit_Turnstile. This closes the gate of the Exit_Turnstile, as we shall see below.
}
os_sem_wait (Mutex, 0xffff);
count = count+1;
if (count==4)
}
os_sem_send (Mutex);
os_sem_wait (Entry_Turnstile, 0xffff);
os_sem_send (Entry_Turnstile);
os_sem_wait (Mutex, 0xffff);
count = count-1;
if (count==0)
}
os_sem_send (Mutex);
os_sem_wait (Exit_Turnstile,0xffff); );
os_sem_send (Exit_Turnstile);
os_sem_wait (Exit_Turnstile, 0xffff);
os_sem_send (Entry_Turnstile);
os_sem_wait (Entry_Turnstile,0xffff);
os_sem_send (Exit_Turnstile);
{
{
{
// Begin critical section
// End critical section
// Turnstile gate
// Begin critical section
// End critical section
// Turnstile gate
37
Related parts for MDK-ARM
Image
Part Number
Description
Manufacturer
Datasheet
Request
R
![MDK-ARM-B](/photos/28/43/284363/mdk-arm-basic_tmb.jpg)
Part Number:
Description:
KIT REALVIEW MCU DEVELOPMENT
Manufacturer:
Keil
Datasheet:
![MDK-ARM-B-SM](/photos/15/87/158780/keil_software_tmb.jpg)
Part Number:
Description:
Development Software SUPPORT EXTENSION FOR MDK-ARM-B
Manufacturer:
Keil Software
![MDK-ARM-SM](/photos/15/87/158780/keil_software_tmb.jpg)
Part Number:
Description:
Development Software SUPPORT EXTENSION FOR MDK-ARM
Manufacturer:
Keil Software
![MDK-ARM-BASIC](/photos/28/43/284363/mdk-arm-basic_tmb.jpg)
Part Number:
Description:
KIT REALVIEW MCU DEVELOPMENT
Manufacturer:
Keil
Datasheet:
![MDK-ARM-UF](/photos/15/87/158780/keil_software_tmb.jpg)
Part Number:
Description:
Development Software MCU DEV KIT FOR ARM UPG TO FLOATING LIC
Manufacturer:
Keil Tools
![MDK-ARM-F](/photos/15/87/158780/keil_software_tmb.jpg)
Part Number:
Description:
Development Software MCU DEV KIT FOR ARM W/ FLOATING LICENSE
Manufacturer:
Keil Software
![MDK-ARM3.1](/photos/26/86/268691/landingpagekeilrealviewarmkit_tmb.jpg)
Part Number:
Description:
Development Software MCU DEV KIT FOR ARM uVISION & C++ & RTX
Manufacturer:
Keil Tools
![MDK-ARM-SMB](/images/no-image3.png)
Part Number:
Description:
Development Software SUPP LICENSE RENEWAL 90+ DAYS NO TECH SUP
Manufacturer:
Keil Software
![KEIL-PK51-INTL](/images/manufacturer_photos/0/6/609/silicon_laboratories_inc_tmb.jpg)
Part Number:
Description:
KEIL C-COMPILER INTERNATIONAL
Manufacturer:
Silicon Laboratories Inc
![OM10045](/photos/9/21/92162/om10045_tmb.jpg)
Part Number:
Description:
BOARD EVAL FOR LPC213X ARM MCU
Manufacturer:
NXP Semiconductors
Datasheet:
![TWR-K60N512-KEIL](/images/manufacturer_photos/0/2/262/freescale_semiconductor_tmb.jpg)
Part Number:
Description:
K60N512 Keil Tower Kit
Manufacturer:
Freescale Semiconductor
Datasheet: