//
-// Open Service Platform
// Copyright (c) 2012 Samsung Electronics Co., Ltd.
//
// Licensed under the Apache License, Version 2.0 (the License);
{
/**
* @class Semaphore
- * @brief This class represents semaphore, a type of synchronization mechanisms. It can provide the acquiring semantics. @n
+ * @brief This class represents a semaphore, that is, a type of synchronization mechanism. It can provide the acquiring semantics. @n
*
* @since 2.0
*
* @final This class is not intended for extension.
*
* The %Semaphore class represents a semaphore; a type of synchronization mechanism.
- * It can provide the acquiring semantics. The semaphore allows the N threads to acquire the semaphore simultaneously.
+ * It can provide the acquiring semantics. The semaphore allows N threads to acquire the semaphore simultaneously.
*
* For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/base/mutex_and_semaphore.htm">Mutex and Semaphore</a>.
*
*
* @since 2.0
*
- * @return An error code
+ * @return An error code
* @param[in] count The number of threads that can acquire the semaphore simultaneously @n
* If the count is @c 1, then it is the same as a mutex.
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The specified @c count is less than @c 0.
- * @exception E_OUT_OF_MEMORY The memory is insufficient.
+ * @exception E_OUT_OF_MEMORY The memory is insufficient.
* @exception E_SYSTEM A system error has occurred.
*/
result Create(int count = 1);
*
* @since 2.0
*
- * @return An error code
+ * @return An error code
* @param[in] name The name of the semaphore
* @param[in] count The number of threads that can acquire the semaphore simultaneously
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The specified @c count is less than @c 0.
- * @exception E_OUT_OF_MEMORY The memory is insufficient.
+ * @exception E_OUT_OF_MEMORY The memory is insufficient.
* @exception E_SYSTEM A system error has occurred.
*/
result Create(const Tizen::Base::String& name, int count = 1);
*
* @since 2.0
*
- * @return An error code
+ * @return An error code
* @param[in] timeout The period during which the thread tries to acquire the semaphore
* @exception E_SUCCESS The method is successful.
- * @exception E_TIMEOUT The operation cannot be completed within the specified time period. @n
- * The method has failed to acquire the semaphore because the given time has elapsed.
+ * @exception E_TIMEOUT Either of the following conditions has occurred:
+ * - The operation cannot be completed within the specified time period.
+ * - The method has failed to acquire the semaphore because the given time has elapsed.
* @exception E_SYSTEM A system error has occurred.
*/
result Acquire(long timeout = INFINITE);
/**
* Tries to acquire the semaphore. @n
- * If the semaphore is already acquired by another thread, E_OBJECT_LOCKED is returned.
+ * If the semaphore is already acquired by another thread, @c E_OBJECT_LOCKED is returned.
*
* @since 2.0
*
- * @return An error code
+ * @return An error code
* @exception E_SUCCESS The method is successful.
- * @exception E_OBJECT_LOCKED The semaphore is already locked.
+ * @exception E_OBJECT_LOCKED The semaphore is already locked.
* @exception E_SYSTEM A system error has occurred.
*/
result TryToAcquire(void);
*
* @since 2.0
*
- * @return An error code
+ * @return An error code
* @exception E_SUCCESS The method is successful.
* @exception E_SYSTEM A system error has occurred.
*/