Back to index

lightning-sunbird  0.9+nobinonly
Functions
ntsem.c File Reference
#include "primpl.h"

Go to the source code of this file.

Functions

void _PR_MD_NEW_SEM (_MDSemaphore *md, PRUintn value)
void _PR_MD_DESTROY_SEM (_MDSemaphore *md)
PRStatus _PR_MD_TIMED_WAIT_SEM (_MDSemaphore *md, PRIntervalTime ticks)
PRStatus _PR_MD_WAIT_SEM (_MDSemaphore *md)
void _PR_MD_POST_SEM (_MDSemaphore *md)

Function Documentation

Definition at line 54 of file ntsem.c.

{
    CloseHandle(md->sem);
}
void _PR_MD_NEW_SEM ( _MDSemaphore md,
PRUintn  value 
)

Definition at line 48 of file ntsem.c.

{
    md->sem = CreateSemaphore(NULL, value, 0x7fffffff, NULL);
}

Definition at line 79 of file ntsem.c.

{
    int old_count;

    ReleaseSemaphore(md->sem, 1, &old_count);
}

Definition at line 60 of file ntsem.c.

{
    int rv;

    rv = WaitForSingleObject(md->sem, PR_IntervalToMilliseconds(ticks));

    if (rv == WAIT_OBJECT_0)
        return PR_SUCCESS;
    else
        return PR_FAILURE;
}

Definition at line 73 of file ntsem.c.

Here is the call graph for this function: