#include <Windows.h>
#include "hyport.h"
#include "portpriv.h"
#include "ut_hyprt.h"
#include "hyshsem.h"
Functions | |
IDATA VMCALL | hyshsem_open (struct HyPortLibrary *portLibrary, struct hyshsem_handle **handle, const char *semname, int setSize, int permission) |
Open an existing semaphore set, or create a new one if it does not exist. | |
IDATA VMCALL | hyshsem_post (struct HyPortLibrary *portLibrary, struct hyshsem_handle *handle, UDATA semset, UDATA flag) |
post operation increments the counter in the semaphore by 1 if there is no one in wait for the semaphore. | |
IDATA VMCALL | hyshsem_wait (struct HyPortLibrary *portLibrary, struct hyshsem_handle *handle, UDATA semset, UDATA flag) |
Wait operation decrements the counter in the semaphore set if the counter > 0 if counter == 0 then the caller will be suspended. | |
IDATA VMCALL | hyshsem_getVal (struct HyPortLibrary *portLibrary, struct hyshsem_handle *handle, UDATA semset) |
reading the value of the semaphore in the set. | |
IDATA VMCALL | hyshsem_setVal (struct HyPortLibrary *portLibrary, struct hyshsem_handle *handle, UDATA semset, IDATA value) |
setting the value of the semaphore specified in semset. | |
void VMCALL | hyshsem_close (struct HyPortLibrary *portLibrary, struct hyshsem_handle **handle) |
Release the resources allocated for the semaphore handles. | |
IDATA VMCALL | hyshsem_destroy (struct HyPortLibrary *portLibrary, struct hyshsem_handle **handle) |
Destroy the semaphore and release the resources allocated for the semaphore handles. | |
I_32 VMCALL | hyshsem_startup (struct HyPortLibrary *portLibrary) |
PortLibrary startup. | |
void VMCALL | hyshsem_shutdown (struct HyPortLibrary *portLibrary) |
PortLibrary shutdown. |
|
Release the resources allocated for the semaphore handles.
|
|
Destroy the semaphore and release the resources allocated for the semaphore handles.
|
|
reading the value of the semaphore in the set. This function uses no synchronisation prmitives
|
|
Open an existing semaphore set, or create a new one if it does not exist.
|
|
post operation increments the counter in the semaphore by 1 if there is no one in wait for the semaphore. if there are other processes suspended by wait then one of them will become runnable and the counter remains the same.
|
|
setting the value of the semaphore specified in semset. This function uses no synchronisation prmitives
|
|
PortLibrary shutdown. This function is called during shutdown of the portLibrary. Any resources that were created by hyshsem_startup should be destroyed here.
|
|
PortLibrary startup. This function is called during startup of the portLibrary. Any resources that are required for the file operations may be created here. All resources created here should be destroyed in hyshsem_shutdown.
|
|
Wait operation decrements the counter in the semaphore set if the counter > 0 if counter == 0 then the caller will be suspended.
|