wangzhengquan
2020-12-07 d7d05fb334db91e3ecbf009ca2650d88f9ed7b46
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#ifndef PCSEM_H
#define PCSEM_H  
 
#include "usg_common.h"
#include "usg_typedef.h"
 
namespace SemUtil {
 
    int get(key_t key, unsigned int value);
    int dec(int semId);
    int dec_nowait(int semId);
    int dec_timeout(const int semId, const struct timespec * timeout);
    int zero(int semId);
    int zero_nowait(int semId);
    int zero_timeout(const int semId, const struct timespec * timeout);
    int inc(int semId);
    void remove(int semid);
 
    void set(int semId, int val);
 
}
 
#endif