Release

nn::os::LightSemaphore::Release Member Function

Syntax

#include <nn/os.h>

s32 Release(
     s32 releaseCount = 1
);

Parameters

Name Description
in releaseCount Specifies the value to add. This must have a value of 1 or greater. If this argument is not specified, the value 1 is added.

Return Values

Returns the counter value before the addition.

Description

Adds to the counter value.

If the counter value is 0, and a thread is waiting on the counter value to become 1 or greater, that thread stops waiting once the counter value is incremented.

If multiple threads are waiting, they stop waiting when the counter is increased by a value of 2 or more. If the number of waiting threads is greater than the value added to the counter, only as many threads as the added value are woken up. The remaining threads will continue to wait.

The threads with the highest priorities are woken up first in this case.

Revision History

2010/06/14
Initial version.

CONFIDENTIAL