CMSIS-RTOS Validation  Version 1.0
RTOS Validation
 All Data Structures Files Functions Variables Macros Groups Pages
Semaphore Functions

Semaphore Functions Test Cases. More...

Functions

void TC_SemaphoreCreateAndDelete (void)
 Test case: TC_SemaphoreCreateAndDelete.
 
void TC_SemaphoreObtainCounting (void)
 Test case: TC_SemaphoreObtainCounting.
 
void TC_SemaphoreObtainBinary (void)
 Test case: TC_SemaphoreObtainBinary.
 
void TC_SemaphoreWaitForBinary (void)
 Test case: TC_SemaphoreWaitForBinary.
 
void TC_SemaphoreWaitForCounting (void)
 Test case: TC_SemaphoreWaitForCounting.
 
void TC_SemaphoreZeroCount (void)
 Test case: TC_SemaphoreZeroCount.
 
void TC_SemaphoreWaitTimeout (void)
 Test case: TC_SemaphoreWaitTimeout.
 
void TC_SemParam (void)
 Test case: TC_SemParam.
 
void TC_SemInterrupts (void)
 Test case: TC_SemInterrupts.
 

Description

The test cases check the osSemaphore* functions.

Function Documentation

void TC_SemaphoreCreateAndDelete ( void  )
  • Create a semaphore with count parameter equal to zero
  • Delete created semaphore object
  • Create a semaphore with count parameter equal to osFeature_Semaphore
  • Delete created semaphore object
void TC_SemaphoreObtainBinary ( void  )
  • Create a binary semaphore object
  • Obtain available token
  • Verify that there is no available tokens left
  • Release obtained token
  • Verify that no more tokens can be released
  • Delete a binary semaphore object
void TC_SemaphoreObtainCounting ( void  )
  • Create a counting semaphore object
  • Obtain all available tokens
  • Verify that all available tokens are obtained
  • Release all tokens
  • Delete a counting semaphore object
void TC_SemaphoreWaitForBinary ( void  )
  • Create a binary semaphore
  • Create multiple instances of a test thread that obtains semaphore
  • Wait until thread instances finish
  • Check if semaphore was acquired
  • Check if only one thread got semaphore object
  • Release and delete a semaphore
  • Only one thread instance must acquire semaphore object
void TC_SemaphoreWaitForCounting ( void  )
  • Create semaphore with index count parameter equal to 3
  • Create multiple instances of a test thread that acquires semaphore
  • Wait until thread instances finish
  • Check if only available resources were acquired
  • Release and delete a semaphore object
  • Only one thread instance must acquire semaphore object
void TC_SemaphoreWaitTimeout ( void  )
  • Obtain a semaphore object
  • Create a thread that waits for a semaphore
  • Delay parent thread to allow child thread wait for semaphore
  • Check if child thread was able to obtain a semaphore or not
void TC_SemaphoreZeroCount ( void  )
  • Create a semaphore with initial count zero
  • Try to obtain a semaphore token
  • Try to release a semaphore token
  • Delete a semaphore object
void TC_SemInterrupts ( void  )
  • Call all semaphore management functions from the ISR
void TC_SemParam ( void  )
  • Test semaphore management functions with invalid parameters