FF_ReleaseSemaphore()
From FullFAT
Releases the specified semaphore or mutex object, allowing another thread or context to gain access to a protected resource.
This function must be written by the developer to provide thread-safe integration with their platform.
Contents |
Prototype
void FF_ReleaseSemaphore(void *pSemaphore);
Back to API.
The provided pSemaphore object must be cast to the type appropriate for your platform and then passed to the platforms release semaphore function.
On windows this is done with the following code:
Example
#include <windows.h> void FF_ReleaseSemaphore(void *pSemaphore) { // Call your OS's ReleaseSemaphore with the provided pSemaphore pointer. // HANDLE hSem = (HANDLE) pSemaphore; ReleaseMutex(hSem); }
Back to API.
Or Analog Devices VDK Kernel:
#include <VDK.h> void FF_ReleaseSemaphore(void *pSemaphore) { // Call your OS's ReleaseSemaphore with the provided pSemaphore pointer. // VDK_SemaphoreID *mysem = (VDK_SemaphoreID *) pSemaphore; VDK_PostSemaphore(*mysem); }
Back to API.
NOTE
Examples for Linux are documented in the demo projects, and will be added here shortly.
These functions should NEVER be called by the developer! FullFAT will call you!
Back to API.
See Also
- FF_CreateSemaphore()
- FF_DestroySemaphore()
- FF_PendSemaphore()
- FF_ReleaseSemaphore()
- FF_Yield()
- FF_Sleep()
- FF_GetSystemTime()
- ff_config.h
- ff_types.h

