View License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from

5.0 | 3 ratings Rate this file 4 Downloads (last 30 days) File Size: 4.44 KB File ID: #32489 Version: 1.0
image thumbnail




This mex file provides an interface with the POSIX semaphore functionality.

| Watch this File

File Information

This mex file provides an interface with the POSIX semaphore functionality. For more information, see `man 7posix semaphore.h`.

To install/compile: mex semaphore.c


Sharedmatrix inspired this file.

This file inspired Semaphore Posix And Windows and Semaphore.

MATLAB release MATLAB 7.12 (R2011a)
Other requirements Linux, Unix, MacOS, semaphore.h
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (7)
14 May 2014 Jonathan C. Lansey

11 Feb 2014 Andrew Smart

K, this one will work with MS Visual Studio (and POSIX compliant platforms):

You can alternatively try to use a POSIX implementation on top of windows:

Comment only
11 Feb 2014 Andrew Smart

Unfortunately pastebin is now blocked at my work :(
I've submitted a new semaphore package on the file exchange, it will appear as soon as it is approved.

Comment only
11 Feb 2014 Andrew Smart

I apologize about that. It appears I had misused pastebin. Looks like that microsoft API link is dead too. I had augmented Mr. Dillon's code to use CreateSemaphore, OpenSemaphore, and ReleaseSemaphore from the Windows API instead of sem_init, sem_wait, and etc from POSIX. Will attach a patch shortly.

Comment only
11 Sep 2013 Omar Shenawy

@Andrew Smart:
The pastebin link is private, if you could please post another link?

Comment only
01 Jun 2013 Andrew Smart

Thank you very much Mr Dillon. Didn't work for me w/ MS Visual Studio compiler, so I added support using whatever this is ( a year or so ago:

Hope this helps someone out there.

28 Sep 2011 Wouter

Wouter (view profile)

Contact us