O'Reilly logo

Embedded Software Development with eCos™ by Anthony J. Massa

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

6.2. Synchronization Mechanisms

The eCos kernel provides the mechanisms for the threads in the system to communicate with each other and synchronize access to shared resources. The mechanisms provided by the eCos kernel are:

  • Mutexes

  • Semaphores

  • Condition variables

  • Flags

  • Message boxes

  • Spinlocks (for SMP systems)

The kernel also provides API functions that allow applications to make use of the synchronization mechanisms. Some of the synchronization mechanism API functions provided are either blocking or nonblocking.

Blocking function calls, such as cyg_semaphore_wait, halt execution of the thread until the API function can complete successfully. Nonblocking function calls, such as cyg_semaphore_trywait, attempt to complete successfully; however, if the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required