From 5ff703d5d0dfab03bd37630f44edfda3b859f4f8 Mon Sep 17 00:00:00 2001 From: Abdelatif Guettouche Date: Tue, 24 Aug 2021 15:09:38 +0200 Subject: [PATCH] arch/*_testset: Fix few typos. Signed-off-by: Abdelatif Guettouche --- arch/arm/src/armv7-a/arm_testset.S | 10 +++++----- arch/arm/src/armv7-m/gnu/arm_testset.S | 10 +++++----- arch/arm/src/armv7-m/iar/arm_testset.S | 8 ++++---- arch/arm/src/armv7-r/arm_testset.S | 10 +++++----- arch/arm/src/armv8-m/arm_testset.S | 10 +++++----- arch/arm/src/cxd56xx/cxd56_testset.c | 12 ++++++------ arch/arm/src/lc823450/lc823450_testset.c | 10 +++++----- arch/arm/src/rp2040/rp2040_testset.c | 10 +++++----- arch/risc-v/src/rv64gc/riscv_testset.S | 10 +++++----- arch/sim/src/sim/up_testset.c | 10 +++++----- arch/xtensa/src/common/xtensa_testset.c | 10 +++++----- include/nuttx/spinlock.h | 18 +++++++++--------- 12 files changed, 64 insertions(+), 64 deletions(-) diff --git a/arch/arm/src/armv7-a/arm_testset.S b/arch/arm/src/armv7-a/arm_testset.S index 2cc4284a90..822c5d7c48 100644 --- a/arch/arm/src/armv7-a/arm_testset.S +++ b/arch/arm/src/armv7-a/arm_testset.S @@ -60,14 +60,14 @@ * This function must be provided via the architecture-specific logic. * * Input Parameters: - * lock - The address of spinlock object. + * lock - A reference to the spinlock object. * * Returned Value: - * The spinlock is always locked upon return. The value of previous value - * of the spinlock variable is returned, either SP_LOCKED if the spinlock - * as previously locked (meaning that the test-and-set operation failed to + * The spinlock is always locked upon return. The previous value of the + * spinlock variable is returned, either SP_LOCKED if the spinlock was + * previously locked (meaning that the test-and-set operation failed to * obtain the lock) or SP_UNLOCKED if the spinlock was previously unlocked - * (meaning that we successfully obtained the lock) + * (meaning that we successfully obtained the lock). * ****************************************************************************/ diff --git a/arch/arm/src/armv7-m/gnu/arm_testset.S b/arch/arm/src/armv7-m/gnu/arm_testset.S index 226004b60d..36e039d0ba 100644 --- a/arch/arm/src/armv7-m/gnu/arm_testset.S +++ b/arch/arm/src/armv7-m/gnu/arm_testset.S @@ -62,14 +62,14 @@ * This function must be provided via the architecture-specific logic. * * Input Parameters: - * lock - The address of spinlock object. + * lock - A reference to the spinlock object. * * Returned Value: - * The spinlock is always locked upon return. The value of previous value - * of the spinlock variable is returned, either SP_LOCKED if the spinlock - * as previously locked (meaning that the test-and-set operation failed to + * The spinlock is always locked upon return. The previous value of the + * spinlock variable is returned, either SP_LOCKED if the spinlock was + * previously locked (meaning that the test-and-set operation failed to * obtain the lock) or SP_UNLOCKED if the spinlock was previously unlocked - * (meaning that we successfully obtained the lock) + * (meaning that we successfully obtained the lock). * ****************************************************************************/ diff --git a/arch/arm/src/armv7-m/iar/arm_testset.S b/arch/arm/src/armv7-m/iar/arm_testset.S index 16763b5a4b..8ad50f9374 100644 --- a/arch/arm/src/armv7-m/iar/arm_testset.S +++ b/arch/arm/src/armv7-m/iar/arm_testset.S @@ -62,11 +62,11 @@ * lock - The address of spinlock object. * * Returned Value: - * The spinlock is always locked upon return. The value of previous value - * of the spinlock variable is returned, either SP_LOCKED if the spinlock - * as previously locked (meaning that the test-and-set operation failed to + * The spinlock is always locked upon return. The previous value of the + * spinlock variable is returned, either SP_LOCKED if the spinlock was + * previously locked (meaning that the test-and-set operation failed to * obtain the lock) or SP_UNLOCKED if the spinlock was previously unlocked - * (meaning that we successfully obtained the lock) + * (meaning that we successfully obtained the lock). * ****************************************************************************/ diff --git a/arch/arm/src/armv7-r/arm_testset.S b/arch/arm/src/armv7-r/arm_testset.S index 79807bf761..d8b1aeaad6 100644 --- a/arch/arm/src/armv7-r/arm_testset.S +++ b/arch/arm/src/armv7-r/arm_testset.S @@ -60,14 +60,14 @@ * This function must be provided via the architecture-specific logic. * * Input Parameters: - * lock - The address of spinlock object. + * lock - A reference to the spinlock object. * * Returned Value: - * The spinlock is always locked upon return. The value of previous value - * of the spinlock variable is returned, either SP_LOCKED if the spinlock - * as previously locked (meaning that the test-and-set operation failed to + * The spinlock is always locked upon return. The previous value of the + * spinlock variable is returned, either SP_LOCKED if the spinlock was + * previously locked (meaning that the test-and-set operation failed to * obtain the lock) or SP_UNLOCKED if the spinlock was previously unlocked - * (meaning that we successfully obtained the lock) + * (meaning that we successfully obtained the lock). * ****************************************************************************/ diff --git a/arch/arm/src/armv8-m/arm_testset.S b/arch/arm/src/armv8-m/arm_testset.S index 79ec82a4ca..45e2c273f8 100644 --- a/arch/arm/src/armv8-m/arm_testset.S +++ b/arch/arm/src/armv8-m/arm_testset.S @@ -62,14 +62,14 @@ * This function must be provided via the architecture-specific logic. * * Input Parameters: - * lock - The address of spinlock object. + * lock - A reference to the spinlock object. * * Returned Value: - * The spinlock is always locked upon return. The value of previous value - * of the spinlock variable is returned, either SP_LOCKED if the spinlock - * as previously locked (meaning that the test-and-set operation failed to + * The spinlock is always locked upon return. The previous value of the + * spinlock variable is returned, either SP_LOCKED if the spinlock was + * previously locked (meaning that the test-and-set operation failed to * obtain the lock) or SP_UNLOCKED if the spinlock was previously unlocked - * (meaning that we successfully obtained the lock) + * (meaning that we successfully obtained the lock). * ****************************************************************************/ diff --git a/arch/arm/src/cxd56xx/cxd56_testset.c b/arch/arm/src/cxd56xx/cxd56_testset.c index ecc6580d7a..672c98e4e2 100644 --- a/arch/arm/src/cxd56xx/cxd56_testset.c +++ b/arch/arm/src/cxd56xx/cxd56_testset.c @@ -76,18 +76,18 @@ spinlock_t up_testset2(volatile FAR spinlock_t *lock) * Name: up_testset * * Description: - * Perform and atomic test and set operation on the provided spinlock. + * Perform an atomic test and set operation on the provided spinlock. * This function must be provided via the architecture-specific logic. * * Input Parameters: - * lock - The address of spinlock object. + * lock - A reference to the spinlock object. * * Returned Value: - * The spinlock is always locked upon return. The value of previous value - * of the spinlock variable is returned, either SP_LOCKED if the spinlock - * as previously locked (meaning that the test-and-set operation failed to + * The spinlock is always locked upon return. The previous value of the + * spinlock variable is returned, either SP_LOCKED if the spinlock was + * previously locked (meaning that the test-and-set operation failed to * obtain the lock) or SP_UNLOCKED if the spinlock was previously unlocked - * (meaning that we successfully obtained the lock) + * (meaning that we successfully obtained the lock). * ****************************************************************************/ diff --git a/arch/arm/src/lc823450/lc823450_testset.c b/arch/arm/src/lc823450/lc823450_testset.c index 25351e4cea..d234b54290 100644 --- a/arch/arm/src/lc823450/lc823450_testset.c +++ b/arch/arm/src/lc823450/lc823450_testset.c @@ -52,14 +52,14 @@ * LC823450 does not support ldrex/strex. Instead, MUTEX is provided. * * Input Parameters: - * lock - The address of spinlock object. + * lock - A reference to the spinlock object. * * Returned Value: - * The spinlock is always locked upon return. The value of previous value - * of the spinlock variable is returned, either SP_LOCKED if the spinlock - * as previously locked (meaning that the test-and-set operation failed to + * The spinlock is always locked upon return. The previous value of the + * spinlock variable is returned, either SP_LOCKED if the spinlock was + * previously locked (meaning that the test-and-set operation failed to * obtain the lock) or SP_UNLOCKED if the spinlock was previously unlocked - * (meaning that we successfully obtained the lock) + * (meaning that we successfully obtained the lock). * ****************************************************************************/ diff --git a/arch/arm/src/rp2040/rp2040_testset.c b/arch/arm/src/rp2040/rp2040_testset.c index df693bf38c..37fd5b80bd 100644 --- a/arch/arm/src/rp2040/rp2040_testset.c +++ b/arch/arm/src/rp2040/rp2040_testset.c @@ -49,14 +49,14 @@ * This function must be provided via the architecture-specific logic. * * Input Parameters: - * lock - The address of spinlock object. + * lock - A reference to the spinlock object. * * Returned Value: - * The spinlock is always locked upon return. The value of previous value - * of the spinlock variable is returned, either SP_LOCKED if the spinlock - * as previously locked (meaning that the test-and-set operation failed to + * The spinlock is always locked upon return. The previous value of the + * spinlock variable is returned, either SP_LOCKED if the spinlock was + * previously locked (meaning that the test-and-set operation failed to * obtain the lock) or SP_UNLOCKED if the spinlock was previously unlocked - * (meaning that we successfully obtained the lock) + * (meaning that we successfully obtained the lock). * ****************************************************************************/ diff --git a/arch/risc-v/src/rv64gc/riscv_testset.S b/arch/risc-v/src/rv64gc/riscv_testset.S index def9172583..7a4ccdd041 100644 --- a/arch/risc-v/src/rv64gc/riscv_testset.S +++ b/arch/risc-v/src/rv64gc/riscv_testset.S @@ -60,14 +60,14 @@ * This function must be provided via the architecture-specific logic. * * Input Parameters: - * lock - The address of spinlock object (a0). + * lock - A reference to the spinlock object (a0). * * Returned Value: - * The spinlock is always locked upon return. The value of previous value - * of the spinlock variable is returned, either SP_LOCKED if the spinlock - * as previously locked (meaning that the test-and-set operation failed to + * The spinlock is always locked upon return. The previous value of the + * spinlock variable is returned, either SP_LOCKED if the spinlock was + * previously locked (meaning that the test-and-set operation failed to * obtain the lock) or SP_UNLOCKED if the spinlock was previously unlocked - * (meaning that we successfully obtained the lock) + * (meaning that we successfully obtained the lock). * * Modifies: a1, a2 * diff --git a/arch/sim/src/sim/up_testset.c b/arch/sim/src/sim/up_testset.c index 18140990d7..4716ecfdc7 100644 --- a/arch/sim/src/sim/up_testset.c +++ b/arch/sim/src/sim/up_testset.c @@ -40,14 +40,14 @@ * This function must be provided via the architecture-specific logic. * * Input Parameters: - * lock - The address of spinlock object. + * lock - A reference to the spinlock object. * * Returned Value: - * The spinlock is always locked upon return. The value of previous value - * of the spinlock variable is returned, either SP_LOCKED if the spinlock - * as previously locked (meaning that the test-and-set operation failed to + * The spinlock is always locked upon return. The previous value of the + * spinlock variable is returned, either SP_LOCKED if the spinlock was + * previously locked (meaning that the test-and-set operation failed to * obtain the lock) or SP_UNLOCKED if the spinlock was previously unlocked - * (meaning that we successfully obtained the lock) + * (meaning that we successfully obtained the lock). * ****************************************************************************/ diff --git a/arch/xtensa/src/common/xtensa_testset.c b/arch/xtensa/src/common/xtensa_testset.c index 35ad8692d7..5016dc5946 100644 --- a/arch/xtensa/src/common/xtensa_testset.c +++ b/arch/xtensa/src/common/xtensa_testset.c @@ -77,14 +77,14 @@ static inline uint32_t xtensa_compareset(FAR volatile uint32_t *addr, * This function must be provided via the architecture-specific logic. * * Input Parameters: - * lock - The address of spinlock object. + * lock - A reference to the spinlock object. * * Returned Value: - * The spinlock is always locked upon return. The value of previous value - * of the spinlock variable is returned, either SP_LOCKED if the spinlock - * was previously locked (meaning that the test-and-set operation failed to + * The spinlock is always locked upon return. The previous value of the + * spinlock variable is returned, either SP_LOCKED if the spinlock was + * previously locked (meaning that the test-and-set operation failed to * obtain the lock) or SP_UNLOCKED if the spinlock was previously unlocked - * (meaning that we successfully obtained the lock) + * (meaning that we successfully obtained the lock). * ****************************************************************************/ diff --git a/include/nuttx/spinlock.h b/include/nuttx/spinlock.h index e930c05a03..f9bf00369c 100644 --- a/include/nuttx/spinlock.h +++ b/include/nuttx/spinlock.h @@ -45,7 +45,7 @@ typedef struct * SP_UNLOCKED - A definition of the unlocked state value (usually 0) * spinlock_t - The type of a spinlock memory object. * - * SP_LOCKED and SP_UNLOCKED must constants of type spinlock_t. + * SP_LOCKED and SP_UNLOCKED must be constants of type spinlock_t. */ #include @@ -96,14 +96,14 @@ typedef struct * This function must be provided via the architecture-specific logic. * * Input Parameters: - * lock - The address of spinlock object. + * lock - A reference to the spinlock object. * * Returned Value: - * The spinlock is always locked upon return. The value of previous value - * of the spinlock variable is returned, either SP_LOCKED if the spinlock - * as previously locked (meaning that the test-and-set operation failed to + * The spinlock is always locked upon return. The previous value of the + * spinlock variable is returned, either SP_LOCKED if the spinlock was + * previously locked (meaning that the test-and-set operation failed to * obtain the lock) or SP_UNLOCKED if the spinlock was previously unlocked - * (meaning that we successfully obtained the lock) + * (meaning that we successfully obtained the lock). * ****************************************************************************/ @@ -158,7 +158,7 @@ static inline spinlock_t up_testset(volatile FAR spinlock_t *lock) * * This implementation is non-reentrant and is prone to deadlocks in * the case that any logic on the same CPU attempts to take the lock - * more than one + * more than once. * * Input Parameters: * lock - A reference to the spinlock object to lock. @@ -361,7 +361,7 @@ void spin_clrbit(FAR volatile cpu_set_t *set, unsigned int cpu, * If the argument lock is not specified (i.e. NULL), * disable local interrupts and take the global spinlock (g_irq_spin) * if the call counter (g_irq_spin_count[cpu]) equals to 0. Then the - * counter on the CPU is increment to allow nested call and return + * counter on the CPU is incremented to allow nested calls and return * the interrupt state. * * If the argument lock is specified, @@ -403,7 +403,7 @@ irqstate_t spin_lock_irqsave(spinlock_t *lock); * restore the interrupt state as it was prior to the previous call to * spin_lock_irqsave(NULL). * - * If the argument lock is specified, release the the lock and + * If the argument lock is specified, release the lock and * restore the interrupt state as it was prior to the previous call to * spin_lock_irqsave(lock). *