Message ID | 1417707535-7632-5-git-send-email-ola.liljedahl@linaro.org |
---|---|
State | Accepted |
Commit | 0c6a4e6b1b0df61bff1e50a8cbe25a8f0c6ca222 |
Headers | show |
On Thu, Dec 4, 2014 at 9:38 AM, Ola Liljedahl <ola.liljedahl@linaro.org> wrote: > Signed-off-by: Ola Liljedahl <ola.liljedahl@linaro.org> > Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> > --- > (This code contribution is provided under the terms of agreement > LES-LTM-21309) > Update and unify doxygen comments and function parameter names. > > platform/linux-generic/include/api/odp_spinlock.h | 42 > ++++++++++++----------- > 1 file changed, 22 insertions(+), 20 deletions(-) > > diff --git a/platform/linux-generic/include/api/odp_spinlock.h > b/platform/linux-generic/include/api/odp_spinlock.h > index 7c299c8..806cc05 100644 > --- a/platform/linux-generic/include/api/odp_spinlock.h > +++ b/platform/linux-generic/include/api/odp_spinlock.h > @@ -22,60 +22,62 @@ extern "C" { > #include <odp_std_types.h> > > /** @addtogroup odp_synchronizers > - * Operations on spinlock. > + * Operations on spin locks. > * @{ > */ > > /** > - * ODP spinlock > + * ODP spinlock type > */ > typedef struct odp_spinlock_t { > - char lock; /**< @private Lock */ > + char lock; /**< @private lock flag, should match > odp_atomic_flag_t */ > } odp_spinlock_t; > > > /** > - * Init spinlock > + * Initialize spin lock. > * > - * @param spinlock Spinlock > + * @param splock Pointer to a spin lock > */ > -void odp_spinlock_init(odp_spinlock_t *spinlock); > +void odp_spinlock_init(odp_spinlock_t *splock); > > > /** > - * Lock spinlock > + * Acquire spin lock. > * > - * @param spinlock Spinlock > + * @param splock Pointer to a spin lock > */ > -void odp_spinlock_lock(odp_spinlock_t *spinlock); > +void odp_spinlock_lock(odp_spinlock_t *splock); > > > /** > - * Try to lock spinlock > + * Try to acquire spin lock. > * > - * @param spinlock Spinlock > + * @param splock Pointer to a spin lock > * > - * @return 1 if the lock was taken, otherwise 0. > + * @retval 1 lock acquired > + * @retval 0 lock not acquired > */ > -int odp_spinlock_trylock(odp_spinlock_t *spinlock); > +int odp_spinlock_trylock(odp_spinlock_t *splock); > > > /** > - * Unlock spinlock > + * Release spin lock. > * > - * @param spinlock Spinlock > + * @param splock Pointer to a spin lock > */ > -void odp_spinlock_unlock(odp_spinlock_t *spinlock); > +void odp_spinlock_unlock(odp_spinlock_t *splock); > > > /** > - * Test if spinlock is locked > + * Check if spin lock is busy (locked). > * > - * @param spinlock Spinlock > + * @param splock Pointer to a spin lock > * > - * @return 1 if the lock is locked, otherwise 0. > + * @retval 1 lock busy (locked) > + * @retval 0 lock not busy. > */ > -int odp_spinlock_is_locked(odp_spinlock_t *spinlock); > +int odp_spinlock_is_locked(odp_spinlock_t *splock); > > > > -- > 1.9.1 > > > _______________________________________________ > lng-odp mailing list > lng-odp@lists.linaro.org > http://lists.linaro.org/mailman/listinfo/lng-odp >
diff --git a/platform/linux-generic/include/api/odp_spinlock.h b/platform/linux-generic/include/api/odp_spinlock.h index 7c299c8..806cc05 100644 --- a/platform/linux-generic/include/api/odp_spinlock.h +++ b/platform/linux-generic/include/api/odp_spinlock.h @@ -22,60 +22,62 @@ extern "C" { #include <odp_std_types.h> /** @addtogroup odp_synchronizers - * Operations on spinlock. + * Operations on spin locks. * @{ */ /** - * ODP spinlock + * ODP spinlock type */ typedef struct odp_spinlock_t { - char lock; /**< @private Lock */ + char lock; /**< @private lock flag, should match odp_atomic_flag_t */ } odp_spinlock_t; /** - * Init spinlock + * Initialize spin lock. * - * @param spinlock Spinlock + * @param splock Pointer to a spin lock */ -void odp_spinlock_init(odp_spinlock_t *spinlock); +void odp_spinlock_init(odp_spinlock_t *splock); /** - * Lock spinlock + * Acquire spin lock. * - * @param spinlock Spinlock + * @param splock Pointer to a spin lock */ -void odp_spinlock_lock(odp_spinlock_t *spinlock); +void odp_spinlock_lock(odp_spinlock_t *splock); /** - * Try to lock spinlock + * Try to acquire spin lock. * - * @param spinlock Spinlock + * @param splock Pointer to a spin lock * - * @return 1 if the lock was taken, otherwise 0. + * @retval 1 lock acquired + * @retval 0 lock not acquired */ -int odp_spinlock_trylock(odp_spinlock_t *spinlock); +int odp_spinlock_trylock(odp_spinlock_t *splock); /** - * Unlock spinlock + * Release spin lock. * - * @param spinlock Spinlock + * @param splock Pointer to a spin lock */ -void odp_spinlock_unlock(odp_spinlock_t *spinlock); +void odp_spinlock_unlock(odp_spinlock_t *splock); /** - * Test if spinlock is locked + * Check if spin lock is busy (locked). * - * @param spinlock Spinlock + * @param splock Pointer to a spin lock * - * @return 1 if the lock is locked, otherwise 0. + * @retval 1 lock busy (locked) + * @retval 0 lock not busy. */ -int odp_spinlock_is_locked(odp_spinlock_t *spinlock); +int odp_spinlock_is_locked(odp_spinlock_t *splock);
Signed-off-by: Ola Liljedahl <ola.liljedahl@linaro.org> --- (This code contribution is provided under the terms of agreement LES-LTM-21309) Update and unify doxygen comments and function parameter names. platform/linux-generic/include/api/odp_spinlock.h | 42 ++++++++++++----------- 1 file changed, 22 insertions(+), 20 deletions(-)