Commit dff91466 by bernhard-gatzhammer

Corrected doxygen style.

EMBB-453
parent 8e0bf02d
...@@ -162,7 +162,6 @@ typedef opaque_type embb_shared_mutex_t; ...@@ -162,7 +162,6 @@ typedef opaque_type embb_shared_mutex_t;
* \pre \c shared_mutex is uninitialized * \pre \c shared_mutex is uninitialized
* \post \c shared_mutex is initialized * \post \c shared_mutex is initialized
* *
* \param shared_mutex Pointer to shared mutex
* \return EMBB_SUCCESS if shared mutex could be initialized \n * \return EMBB_SUCCESS if shared mutex could be initialized \n
* EMBB_ERROR otherwise * EMBB_ERROR otherwise
* *
...@@ -172,7 +171,10 @@ typedef opaque_type embb_shared_mutex_t; ...@@ -172,7 +171,10 @@ typedef opaque_type embb_shared_mutex_t;
* *
* \see embb_shared_mutex_destroy() * \see embb_shared_mutex_destroy()
*/ */
int embb_shared_mutex_init(embb_shared_mutex_t* shared_mutex); int embb_shared_mutex_init(
embb_shared_mutex_t* shared_mutex
/**< [IN/OUT] Pointer to shared mutex to be initialized */
);
/** /**
* Waits until the shared mutex can be locked for writing and locks it. * Waits until the shared mutex can be locked for writing and locks it.
...@@ -180,7 +182,6 @@ int embb_shared_mutex_init(embb_shared_mutex_t* shared_mutex); ...@@ -180,7 +182,6 @@ int embb_shared_mutex_init(embb_shared_mutex_t* shared_mutex);
* \pre \c shared_mutex is initialized and not locked by the current thread. * \pre \c shared_mutex is initialized and not locked by the current thread.
* \post If successful, \c shared_mutex is locked for writing. * \post If successful, \c shared_mutex is locked for writing.
* *
* \param shared_mutex Pointer to shared mutex
* \return EMBB_SUCCESS if shared_mutex could be locked for writing \n * \return EMBB_SUCCESS if shared_mutex could be locked for writing \n
* EMBB_ERROR otherwise * EMBB_ERROR otherwise
* *
...@@ -188,7 +189,10 @@ int embb_shared_mutex_init(embb_shared_mutex_t* shared_mutex); ...@@ -188,7 +189,10 @@ int embb_shared_mutex_init(embb_shared_mutex_t* shared_mutex);
* *
* \see embb_shared_mutex_try_lock(), embb_shared_mutex_unlock() * \see embb_shared_mutex_try_lock(), embb_shared_mutex_unlock()
*/ */
int embb_shared_mutex_lock(embb_shared_mutex_t* shared_mutex); int embb_shared_mutex_lock(
embb_shared_mutex_t* shared_mutex
/**< [IN/OUT] Pointer to shared mutex to be locked */
);
/** /**
* Tries to lock the shared mutex for writing and returns immediately. * Tries to lock the shared mutex for writing and returns immediately.
...@@ -199,7 +203,6 @@ int embb_shared_mutex_lock(embb_shared_mutex_t* shared_mutex); ...@@ -199,7 +203,6 @@ int embb_shared_mutex_lock(embb_shared_mutex_t* shared_mutex);
* \pre \c shared_mutex is initialized * \pre \c shared_mutex is initialized
* \post If successful, \c shared_mutex is locked for writing * \post If successful, \c shared_mutex is locked for writing
* *
* \param shared_mutex Pointer to shared mutex
* \return EMBB_SUCCESS if shared_mutex could be locked for writing \n * \return EMBB_SUCCESS if shared_mutex could be locked for writing \n
* EMBB_BUSY if shared_mutex could not be locked for writing, because * EMBB_BUSY if shared_mutex could not be locked for writing, because
* the mutex is locked for writing or reading \n * the mutex is locked for writing or reading \n
...@@ -209,7 +212,10 @@ int embb_shared_mutex_lock(embb_shared_mutex_t* shared_mutex); ...@@ -209,7 +212,10 @@ int embb_shared_mutex_lock(embb_shared_mutex_t* shared_mutex);
* *
* \see embb_shared_mutex_lock(), embb_shared_mutex_unlock() * \see embb_shared_mutex_lock(), embb_shared_mutex_unlock()
*/ */
int embb_shared_mutex_try_lock(embb_shared_mutex_t* shared_mutex); int embb_shared_mutex_try_lock(
embb_shared_mutex_t* shared_mutex
/**< [IN/OUT] Pointer to shared mutex to be tried to lock */
);
/** /**
* Unlocks the shared mutex locked for writing. * Unlocks the shared mutex locked for writing.
...@@ -217,7 +223,6 @@ int embb_shared_mutex_try_lock(embb_shared_mutex_t* shared_mutex); ...@@ -217,7 +223,6 @@ int embb_shared_mutex_try_lock(embb_shared_mutex_t* shared_mutex);
* \pre \c shared_mutex has been locked for writing by the current thread. * \pre \c shared_mutex has been locked for writing by the current thread.
* \post If successful, \c shared_mutex is unlocked. * \post If successful, \c shared_mutex is unlocked.
* *
* \param shared_mutex Pointer to shared mutex
* \return EMBB_SUCCESS if the operation was successful \n * \return EMBB_SUCCESS if the operation was successful \n
* EMBB_ERROR otherwise * EMBB_ERROR otherwise
* *
...@@ -225,7 +230,10 @@ int embb_shared_mutex_try_lock(embb_shared_mutex_t* shared_mutex); ...@@ -225,7 +230,10 @@ int embb_shared_mutex_try_lock(embb_shared_mutex_t* shared_mutex);
* *
* \see embb_shared_mutex_lock(), embb_shared_mutex_try_lock() * \see embb_shared_mutex_lock(), embb_shared_mutex_try_lock()
*/ */
int embb_shared_mutex_unlock(embb_shared_mutex_t* shared_mutex); int embb_shared_mutex_unlock(
embb_shared_mutex_t* shared_mutex
/**< [IN/OUT] Pointer to shared mutex to be unlocked */
);
/** /**
* Waits until the shared mutex can be locked for reading and locks it. * Waits until the shared mutex can be locked for reading and locks it.
...@@ -233,7 +241,6 @@ int embb_shared_mutex_unlock(embb_shared_mutex_t* shared_mutex); ...@@ -233,7 +241,6 @@ int embb_shared_mutex_unlock(embb_shared_mutex_t* shared_mutex);
* \pre \c shared_mutex is initialized and not locked by the current thread. * \pre \c shared_mutex is initialized and not locked by the current thread.
* \post If successful, \c shared_mutex is locked for reading. * \post If successful, \c shared_mutex is locked for reading.
* *
* \param shared_mutex Pointer to shared mutex
* \return EMBB_SUCCESS if shared_mutex could be locked for reading \n * \return EMBB_SUCCESS if shared_mutex could be locked for reading \n
* EMBB_ERROR otherwise * EMBB_ERROR otherwise
* *
...@@ -241,7 +248,10 @@ int embb_shared_mutex_unlock(embb_shared_mutex_t* shared_mutex); ...@@ -241,7 +248,10 @@ int embb_shared_mutex_unlock(embb_shared_mutex_t* shared_mutex);
* *
* \see embb_shared_mutex_try_lock_shared(), embb_shared_mutex_unlock_shared() * \see embb_shared_mutex_try_lock_shared(), embb_shared_mutex_unlock_shared()
*/ */
int embb_shared_mutex_lock_shared(embb_shared_mutex_t* shared_mutex); int embb_shared_mutex_lock_shared(
embb_shared_mutex_t* shared_mutex
/**< [IN/OUT] Pointer to shared mutex to be locked shared */
);
/** /**
* Tries to lock the shared mutex for reading and returns immediately. * Tries to lock the shared mutex for reading and returns immediately.
...@@ -249,7 +259,6 @@ int embb_shared_mutex_lock_shared(embb_shared_mutex_t* shared_mutex); ...@@ -249,7 +259,6 @@ int embb_shared_mutex_lock_shared(embb_shared_mutex_t* shared_mutex);
* \pre \c shared_mutex is initialized * \pre \c shared_mutex is initialized
* \post If successful, \c shared_mutex is locked for reading * \post If successful, \c shared_mutex is locked for reading
* *
* \param shared_mutex Pointer to shared mutex
* \return EMBB_SUCCESS if shared_mutex could be locked for reading \n * \return EMBB_SUCCESS if shared_mutex could be locked for reading \n
* EMBB_BUSY if shared_mutex could not be locked for reading \n * EMBB_BUSY if shared_mutex could not be locked for reading \n
* EMBB_ERROR if an error occurred * EMBB_ERROR if an error occurred
...@@ -258,7 +267,10 @@ int embb_shared_mutex_lock_shared(embb_shared_mutex_t* shared_mutex); ...@@ -258,7 +267,10 @@ int embb_shared_mutex_lock_shared(embb_shared_mutex_t* shared_mutex);
* *
* \see embb_shared_mutex_lock_shared(), embb_shared_mutex_unlock_shared() * \see embb_shared_mutex_lock_shared(), embb_shared_mutex_unlock_shared()
*/ */
int embb_shared_mutex_try_lock_shared(embb_shared_mutex_t* shared_mutex); int embb_shared_mutex_try_lock_shared(
embb_shared_mutex_t* shared_mutex
/**< [IN/OUT] Pointer to shared mutex to be tried to lock shared */
);
/** /**
* Unlocks the shared mutex locked for reading. * Unlocks the shared mutex locked for reading.
...@@ -266,7 +278,6 @@ int embb_shared_mutex_try_lock_shared(embb_shared_mutex_t* shared_mutex); ...@@ -266,7 +278,6 @@ int embb_shared_mutex_try_lock_shared(embb_shared_mutex_t* shared_mutex);
* \pre \c shared_mutex has been locked for reading by the current thread. * \pre \c shared_mutex has been locked for reading by the current thread.
* \post If successful, \c shared_mutex is unlocked. * \post If successful, \c shared_mutex is unlocked.
* *
* \param shared_mutex Pointer to shared mutex
* \return EMBB_SUCCESS if the operation was successful \n * \return EMBB_SUCCESS if the operation was successful \n
* EMBB_ERROR otherwise * EMBB_ERROR otherwise
* *
...@@ -274,7 +285,10 @@ int embb_shared_mutex_try_lock_shared(embb_shared_mutex_t* shared_mutex); ...@@ -274,7 +285,10 @@ int embb_shared_mutex_try_lock_shared(embb_shared_mutex_t* shared_mutex);
* *
* \see embb_shared_mutex_lock_shared(), embb_shared_mutex_try_lock_shared() * \see embb_shared_mutex_lock_shared(), embb_shared_mutex_try_lock_shared()
*/ */
int embb_shared_mutex_unlock_shared(embb_shared_mutex_t* shared_mutex); int embb_shared_mutex_unlock_shared(
embb_shared_mutex_t* shared_mutex
/**< [IN/OUT] Pointer to shared mutex to be unlocked shared */
);
/** /**
* Destroys the shared mutex and frees its resources. * Destroys the shared mutex and frees its resources.
...@@ -282,13 +296,14 @@ int embb_shared_mutex_unlock_shared(embb_shared_mutex_t* shared_mutex); ...@@ -282,13 +296,14 @@ int embb_shared_mutex_unlock_shared(embb_shared_mutex_t* shared_mutex);
* \pre \c shared_mutex has been initialized * \pre \c shared_mutex has been initialized
* \post \c shared_mutex is uninitialized * \post \c shared_mutex is uninitialized
* *
* \param shared_mutex Pointer to shared mutex
*
* \notthreadsafe * \notthreadsafe
* *
* \see embb_shared_mutex_init() * \see embb_shared_mutex_init()
*/ */
void embb_shared_mutex_destroy(embb_shared_mutex_t* shared_mutex); void embb_shared_mutex_destroy(
embb_shared_mutex_t* shared_mutex
/**< [IN/OUT] Pointer to shared mutex to be destroyed */
);
#ifdef __cplusplus #ifdef __cplusplus
......
...@@ -631,21 +631,24 @@ class SharedLock { ...@@ -631,21 +631,24 @@ class SharedLock {
* *
* \pre \c shared_mutex is unlocked * \pre \c shared_mutex is unlocked
* \post \c shared_mutex is locked for reading * \post \c shared_mutex is locked for reading
*
* \param[IN] shared_mutex Shared mutex to be managed
*/ */
explicit SharedLock(SharedMutex& shared_mutex); explicit SharedLock(
SharedMutex& shared_mutex
/**< [IN] Shared mutex to be managed */
);
/** /**
* Creates a lock from an unlocked shared mutex without locking it. * Creates a lock from an unlocked shared mutex without locking it.
* *
* \pre \c shared_mutex is unlocked * \pre \c shared_mutex is unlocked
* \post \c shared_mutex is unlocked * \post \c shared_mutex is unlocked
*
* \param[IN] shared_mutex Shared mutex to be managed
* \param[IN] tag Tag to select correct constructor
*/ */
SharedLock(SharedMutex& shared_mutex, DeferLockTag tag); SharedLock(
SharedMutex& shared_mutex,
/**< [IN] Shared mutex to be managed */
DeferLockTag tag
/**< [IN] Tag to select correct constructor */
);
/** /**
* Creates a lock from an unlocked shared mutex and tries to lock it * Creates a lock from an unlocked shared mutex and tries to lock it
...@@ -653,22 +656,26 @@ class SharedLock { ...@@ -653,22 +656,26 @@ class SharedLock {
* *
* \pre \c shared_mutex is unlocked * \pre \c shared_mutex is unlocked
* \post If successful, \c shared_mutex is locked for reading * \post If successful, \c shared_mutex is locked for reading
*
* \param[IN] shared_mutex Shared mutex to be managed
* \param[IN] tag Tag to select correct constructor
*/ */
SharedLock(SharedMutex& shared_mutex, TryLockTag tag); SharedLock(
SharedMutex& shared_mutex,
/**< [IN] Shared mutex to be managed */
TryLockTag tag
/**< [IN] Tag to select correct constructor */
);
/** /**
* Creates a lock from an already locked shared mutex. * Creates a lock from an already locked shared mutex.
* *
* \pre \c shared_mutex is locked for reading * \pre \c shared_mutex is locked for reading
* \post \c shared_mutex is locked for reading * \post \c shared_mutex is locked for reading
*
* \param[IN] shared_mutex Shared mutex to be managed
* \param[IN] tag Tag to select correct constructor
*/ */
SharedLock(SharedMutex& shared_mutex, AdoptLockTag tag); SharedLock(
SharedMutex& shared_mutex,
/**< [IN] Shared mutex to be managed */
AdoptLockTag tag
/**< [IN] Tag to select correct constructor */
);
/** /**
* Unlocks the shared mutex if owned. * Unlocks the shared mutex if owned.
...@@ -705,10 +712,11 @@ class SharedLock { ...@@ -705,10 +712,11 @@ class SharedLock {
/** /**
* Exchange shared mutex ownership with another shared lock * Exchange shared mutex ownership with another shared lock
*
* \param other Shared lock to exchange ownership with
*/ */
void Swap(SharedLock& other); void Swap(
SharedLock& other
/**< [IN/OUT] Shared lock to exchange ownership with */
);
/** /**
* Gives up ownership of the shared mutex and returns a pointer to it. * Gives up ownership of the shared mutex and returns a pointer to it.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment