BOOL osReleaseSharedMemory( HANDLE Handle );
The handle to the shared memory object to be released.
Returns TRUE on success or FALSE on failure. To retrieve extended error information, call the osGetLastError function.
This function releases ownership of a shared memory object, allowing other tasks to access the protected memory region.
When a task completes its operations within the shared memory buffer, it must invoke osReleaseSharedMemory to relinquish control. If other tasks are currently blocked while waiting for this specific object, the system will grant ownership to the highest-priority waiting task, transitioning it to the ready state.
The behavior of ownership release depends on the synchronization mode selected during object creation:
For additional information regarding shared memory management and best practices, please refer to the Shared Memory section.
This function is available only when the OS_USE_SHARED_MEM configuration constant is set to 1.
| Version: | 1.0 |
|---|---|
| Header file: | OS_SharedMem.h (include OS_API.h) |
| See also: | BOOL, FALSE, HANDLE, osCreateSharedMemory, osGetLastError, shared memory, TRUE |