segger: rm spin_lock_irqsave(NULL) in drivers/segger/config/SEGGER_RTT_Conf.h
Signed-off-by: hujun5 <hujun5@xiaomi.com>
This commit is contained in:
parent
cfd0cc0d1a
commit
8fd4bea2ba
2 changed files with 16 additions and 2 deletions
|
@ -33,6 +33,14 @@
|
||||||
# include <nuttx/spinlock.h>
|
# include <nuttx/spinlock.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Public Data
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
#ifndef __ASSEMBLY__
|
||||||
|
extern spinlock_t g_segger_lock;
|
||||||
|
#endif
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Pre-processor Definitions
|
* Pre-processor Definitions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
@ -81,11 +89,11 @@
|
||||||
|
|
||||||
/* Lock RTT (nestable) (i.e. disable interrupts) */
|
/* Lock RTT (nestable) (i.e. disable interrupts) */
|
||||||
|
|
||||||
#define SEGGER_RTT_LOCK() irqstate_t __flags = spin_lock_irqsave(NULL)
|
#define SEGGER_RTT_LOCK() irqstate_t __flags = spin_lock_irqsave_wo_note(&g_segger_lock)
|
||||||
|
|
||||||
/* Unlock RTT (nestable) (i.e. enable previous interrupt lock state) */
|
/* Unlock RTT (nestable) (i.e. enable previous interrupt lock state) */
|
||||||
|
|
||||||
#define SEGGER_RTT_UNLOCK() spin_unlock_irqrestore(NULL, __flags)
|
#define SEGGER_RTT_UNLOCK() spin_unlock_irqrestore_wo_note(&g_segger_lock, __flags)
|
||||||
|
|
||||||
/* Disable RTT SEGGER_RTT_WriteSkipNoLock */
|
/* Disable RTT SEGGER_RTT_WriteSkipNoLock */
|
||||||
|
|
||||||
|
|
|
@ -158,6 +158,12 @@ static struct note_sysview_driver_s g_note_sysview_driver =
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Public Data
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
spinlock_t g_segger_lock = SP_UNLOCKED;
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Private Functions
|
* Private Functions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
Loading…
Reference in a new issue