posix
Class SemSet
java.lang.Object
posix.IPC
posix.SemSet
public class SemSet
- extends IPC
Represent a posix semaphore set. Work in progress.
Nested classes/interfaces inherited from class posix.IPC |
IPC.Perm |
Fields inherited from class posix.IPC |
egid, euid, id, IPC_ALLOC, IPC_CI, IPC_CREAT, IPC_EXCL, IPC_NOCLEAR, IPC_NOWAIT, IPC_PHYS, IPC_PRIVATE, owner, pid |
Constructor Summary |
SemSet(int qid)
Attach to an existing semaphore set |
SemSet(int key,
int nsem,
int flag)
|
SemSet(String path,
int id)
Attach to an existing semaphore set |
SEM_UNDO
public static final short SEM_UNDO
SemSet
public SemSet(int key,
int nsem,
int flag)
throws IPCException
- Throws:
IPCException
SemSet
public SemSet(int qid)
throws IPCException
- Attach to an existing semaphore set
- Throws:
IPCException
SemSet
public SemSet(String path,
int id)
throws IPCException
- Attach to an existing semaphore set
- Throws:
IPCException
remove
public void remove()
- Description copied from class:
IPC
- Remove this IPC data structure from the system.
- Specified by:
remove
in class IPC
semget
public static int semget(int key,
int num,
int flag)
getStatus
public SemSet.semid_ds getStatus()
throws IPCException
- Description copied from class:
IPC
- Return the permissions for this IPC data structure.
- Specified by:
getStatus
in class IPC
- Throws:
IPCException
setPerm
public void setPerm(IPC.Perm st)
throws IPCException
- Set the uid, gid, mode, qbytes for this IPC data structure.
Only a process with appropriate privileges can raise the value of
msg_qbytes.
- Specified by:
setPerm
in class IPC
- Parameters:
st
- a current msqid_ds obtained from getStatus()
- Throws:
IPCException
semop
public void semop(short[] sema)
throws IPCException
- Throws:
IPCException
getPid
public int getPid(char semnum)
throws IPCException
- Throws:
IPCException
getNCnt
public char getNCnt(char semnum)
throws IPCException
- Throws:
IPCException
getZCnt
public char getZCnt(char semnum)
throws IPCException
- Throws:
IPCException
getValue
public short getValue(char semnum)
throws IPCException
- Throws:
IPCException
setValue
public void setValue(char semnum,
short val)
throws IPCException
- Throws:
IPCException
getValues
public short[] getValues()
throws IPCException
- Throws:
IPCException
setValues
public void setValues(short[] vals)
throws IPCException
- Throws:
IPCException