|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectmoss.ipc.MSemaphore
public class MSemaphore
this class implements a "semaphore". Operations are performed based on changing the semaphore's value arbitrarily, not strictly `wait' (-1) and `signal' (+1). However, wait() and signal() methods are still provided, for bits of the kernel that want to use them like that.
| Field Summary | |
|---|---|
static int |
SEMOP_CREATE
create a semaphore |
static int |
SEMOP_REMOVE
remove a semaphore |
static int |
SEMOP_SET
set (adjust) a semaphore's value |
| Constructor Summary | |
|---|---|
MSemaphore()
|
|
| Method Summary | |
|---|---|
static void |
finalinit()
this is called to perform any final initialisation, in the context of the init-task. |
static void |
init_semaphore()
this initialises the semaphore handling class |
static int |
semcreate(int key,
int value)
creates a new semaphore |
static int |
semremove(int key)
removes a semaphore. |
static int |
semset(MProcess current,
int key,
int value)
changes a semaphore's value |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int SEMOP_CREATE
public static final int SEMOP_SET
public static final int SEMOP_REMOVE
| Constructor Detail |
|---|
public MSemaphore()
| Method Detail |
|---|
public static void init_semaphore()
public static void finalinit()
public static int semcreate(int key,
int value)
key - semaphore keyvalue - initial value of the semaphore. If < 0, the method blocks.
public static int semset(MProcess current,
int key,
int value)
key - semaphore keyvalue - change semaphore value by this (+ve or -ve)
public static int semremove(int key)
key - semaphore key
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||