diff options
| author | Monte Copeland <copelanm@us.ibm.com> | 2011-07-11 16:24:13 -0500 |
|---|---|---|
| committer | Monte K. Copeland <copelanm@us.ibm.com> | 2011-07-14 14:43:22 -0500 |
| commit | accc0f438eca45dcd1058a195d192d51a6f1c4aa (patch) | |
| tree | 7f98f3f58252536eeace7cb25257d7b8bb502fad /src/include/sys/sync.h | |
| parent | b9558dcb65612b60a20719ea489dadda4776e1e4 (diff) | |
| download | blackbird-hostboot-accc0f438eca45dcd1058a195d192d51a6f1c4aa.tar.gz blackbird-hostboot-accc0f438eca45dcd1058a195d192d51a6f1c4aa.zip | |
syscall cleanup/scrub
- 2nd pass
- 3rd pass
Change-Id: I5eb314c0c635aa42bc4d841065d9a9a786f8be4b
Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/198
Tested-by: Jenkins Server
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Reviewed-by: MIKE J. JONES <mjjones@us.ibm.com>
Diffstat (limited to 'src/include/sys/sync.h')
| -rw-r--r-- | src/include/sys/sync.h | 36 |
1 files changed, 22 insertions, 14 deletions
diff --git a/src/include/sys/sync.h b/src/include/sys/sync.h index b6274a0a6..7a4d1afde 100644 --- a/src/include/sys/sync.h +++ b/src/include/sys/sync.h @@ -29,29 +29,35 @@ typedef _barrier_imp_t barrier_t; #define MUTEX_INITIALIZER {0} /** - * Initialize a barrier object + * @fn barrier_init + * @brief Initialize a barrier object * @param[out] o_barrier The barrier * @param[in] i_count The number of threads to wait on - * @pre an unitiailized barrier object + * @pre an uninitialized barrier object * @post a valid barrier object */ void barrier_init (barrier_t * o_barrier, uint64_t i_count); + /** - * Destroy a barrier + * @fn barrier_destroy + * @brief Destroy a barrier * @param[in] i_barrier The barrier */ void barrier_destroy (barrier_t * i_barrier); + /** - * Wait on a barrier + * @fn barrier_wait + * @brief Wait on a barrier + * This thread will block until the barrier count is reached. * @param[in] i_barrier The barrier - * @post this thread will be blocked until the barrier count is reached. */ void barrier_wait (barrier_t * i_barrier); /** - * Initialize a mutex object + * @fn mutex_init + * @brief Initialize a mutex object * @param[out] o_mutex the mutex * @pre an uninitialized mutex object * @post a valid mutex object @@ -59,25 +65,27 @@ void barrier_wait (barrier_t * i_barrier); void mutex_init(mutex_t * o_mutex); /** - * Destroy / Uninitialize a mutex object. - * @param[in] i_mutex The mutex + * @fn mutex_destroy + * @brief Destroy / uninitialize a mutex object. + * @param[in] i_mutex - the mutex * @note This does not free the memory associated with the object if the mutex * was allocated off the heap. */ void mutex_destroy(mutex_t * i_mutex); /** - * Obtain a lock on a mutex - * @param[in] i_mutex The mutex + * @fn mutex_lock + * @brief Obtain a lock on a mutex + * @param[in] i_mutex - The mutex * @post returns when this thread has the lock */ void mutex_lock(mutex_t * i_mutex); /** - * Release a lock on a mutex - * @param[in] i_mutex the mutex - * @returns non zero on error - * @post mutex lock release + * @fn mutex_unlock + * @brief Release a lock on a mutex + * @param[in] i_mutex - the mutex + * @post mutex lock released */ void mutex_unlock(mutex_t * i_mutex); |

