Move libPS4
[ps4-sdk.git] / libPS4 / source / semaphore.c
blob25e4dc139bb3939baef4ea3256b69c82f0454e81
1 #include "syscall.h"
3 #include "semaphore.h"
5 int createSemaphore(const char *name, int attributes, int startingCount, int maxCount) {
6 return syscall(549, name, attributes, startingCount, maxCount, 0);
9 int removeSemaphore(int semaphore) {
10 return syscall(550, semaphore);
13 int openSemaphore(const char *name, int oflag, int mode, unsigned int value) {
14 return syscall(551, name, oflag, mode, value);
17 int closeSemaphore(int semaphore) {
18 return syscall(552, semaphore);
21 int waitSemaphore(int semaphore, int requiredCount, int *microsecondTimeout) {
22 return syscall(553, semaphore, requiredCount, microsecondTimeout);
25 int pollSemaphore(int semaphore, int requiredCount) {
26 return syscall(554, semaphore, requiredCount);
29 int signalSemaphore(int semaphore, int count) {
30 return syscall(555, semaphore, count);
33 int cancelSemaphore(int semaphore, int count, int *threadsReleased) {
34 return syscall(556, semaphore, count, threadsReleased);