Fanuc C-Executer Operating Manual
B-62443EN-3/03E
- 812 -
------------------------------------------------------------------------------
11. Create semaphore <Main,Alarm,Comm>
------------------------------------------------------------------------------
[Name]
os_make_sem
[Syntax]
#include <oscall.h>
unsigned short os_make_sem( unsigned char semaphore_id,
char initial_value ) ;
[Argument]
semaphore_id semaphore ID
initial_value initial value of the semaphore counter
[Return]
0 successful completion
EC_SEMID Semaphore ID error
EC_EXSTSEM Already existing semaphore
[Description]
Creates a counter type semaphore.
Initial value of the semaphore counter represents the number of
resources managed by the semaphore.