Ad more routines for semaphores support
Some checks failed
ci/woodpecker/push/build Pipeline failed

This commit is contained in:
2023-02-17 09:40:18 +01:00
parent 03bae53fb9
commit 08405e7bdc
3 changed files with 61 additions and 0 deletions

View File

@@ -39,3 +39,51 @@ KeInitializeSemaphore(IN PKSEMAPHORE Semaphore,
/* Initialize semaphore wait list */
RtlInitializeListHead(&Semaphore->Header.WaitListHead);
}
/**
* Reads semaphore's current signal state.
*
* @param Semaphore
* Supplies a pointer to a semaphore object.
*
* @return This routine returns the current signal state of the semaphore.
*
* @since XT 1.0
*/
XTAPI
LONG
KeReadSemaphoreState(IN PKSEMAPHORE Semaphore)
{
/* Return semaphore's signal state */
return Semaphore->Header.SignalState;
}
/**
* Releases a semaphore.
*
* @param Semaphore
* Supplies a pointer to a semaphore object.
*
* @param Increment
* Specifies the priority increment value of the semaphore.
*
* @param Adjustment
* Specifies adjustment value added to the semaphore's initial count value.
*
* @param Wait
* Determines whether release of the semaphore will be followed by a kernel wait routine call or not.
*
* @return This routine returns a previous signal state of the semaphore.
*
* @since NT 3.5
*/
XTAPI
LONG
KeReleaseSemaphore(IN PKSEMAPHORE Semaphore,
IN KPRIORITY Increment,
IN LONG Adjustment,
IN BOOLEAN Wait)
{
UNIMPLEMENTED;
return 0;
}