Patches Dillon's work to allow native semaphore usage within Matlab on Windows and POSIX systems


Updated 19 Mar 2014

View License

Editor's Note: This file was selected as MATLAB Central Pick of the Week

Augment of Mr. Dillon's work:
This provides an interface with POSIX semaphore functionality on the native platform. Windows doesn't implement the POSIX semaphore API, so the Windows API equivalents are used if compiled on Windows.
To install/compile: mex -O -v semaphore.c

Cite As

Andrew Smart (2023). semaphore_POSIX_and_Windows (, MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2013a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Find more on Energy Production in Help Center and MATLAB Answers

Inspired by: semaphore

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes

Apparently I needed to re-enter contribution ids.

Updated the semaphore.c file to fix bugs.

Updated description.