Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
FORMUS3IC_LAS3
/
embb
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
dff91466
authored
Nov 04, 2015
by
bernhard-gatzhammer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Corrected doxygen style.
EMBB-453
parent
8e0bf02d
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
58 additions
and
35 deletions
+58
-35
base_c/include/embb/base/c/mutex.h
+32
-17
base_cpp/include/embb/base/mutex.h
+26
-18
No files found.
base_c/include/embb/base/c/mutex.h
View file @
dff91466
...
...
@@ -162,7 +162,6 @@ typedef opaque_type embb_shared_mutex_t;
* \pre \c shared_mutex is uninitialized
* \post \c shared_mutex is initialized
*
* \param shared_mutex Pointer to shared mutex
* \return EMBB_SUCCESS if shared mutex could be initialized \n
* EMBB_ERROR otherwise
*
...
...
@@ -172,7 +171,10 @@ typedef opaque_type embb_shared_mutex_t;
*
* \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.
...
...
@@ -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.
* \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
* EMBB_ERROR otherwise
*
...
...
@@ -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()
*/
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.
...
...
@@ -199,7 +203,6 @@ int embb_shared_mutex_lock(embb_shared_mutex_t* shared_mutex);
* \pre \c shared_mutex is initialized
* \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
* EMBB_BUSY if shared_mutex could not be locked for writing, because
* the mutex is locked for writing or reading \n
...
...
@@ -209,7 +212,10 @@ int embb_shared_mutex_lock(embb_shared_mutex_t* shared_mutex);
*
* \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.
...
...
@@ -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.
* \post If successful, \c shared_mutex is unlocked.
*
* \param shared_mutex Pointer to shared mutex
* \return EMBB_SUCCESS if the operation was successful \n
* EMBB_ERROR otherwise
*
...
...
@@ -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()
*/
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.
...
...
@@ -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.
* \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
* EMBB_ERROR otherwise
*
...
...
@@ -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()
*/
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.
...
...
@@ -249,7 +259,6 @@ int embb_shared_mutex_lock_shared(embb_shared_mutex_t* shared_mutex);
* \pre \c shared_mutex is initialized
* \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
* EMBB_BUSY if shared_mutex could not be locked for reading \n
* EMBB_ERROR if an error occurred
...
...
@@ -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()
*/
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.
...
...
@@ -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.
* \post If successful, \c shared_mutex is unlocked.
*
* \param shared_mutex Pointer to shared mutex
* \return EMBB_SUCCESS if the operation was successful \n
* EMBB_ERROR otherwise
*
...
...
@@ -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()
*/
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.
...
...
@@ -282,13 +296,14 @@ int embb_shared_mutex_unlock_shared(embb_shared_mutex_t* shared_mutex);
* \pre \c shared_mutex has been initialized
* \post \c shared_mutex is uninitialized
*
* \param shared_mutex Pointer to shared mutex
*
* \notthreadsafe
*
* \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
...
...
base_cpp/include/embb/base/mutex.h
View file @
dff91466
...
...
@@ -631,21 +631,24 @@ class SharedLock {
*
* \pre \c shared_mutex is unlocked
* \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.
*
* \pre \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
...
...
@@ -653,22 +656,26 @@ class SharedLock {
*
* \pre \c shared_mutex is unlocked
* \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.
*
* \pre \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.
...
...
@@ -705,10 +712,11 @@ class SharedLock {
/**
* 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.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment