mirror of
https://github.com/apache/nuttx.git
synced 2026-05-22 13:52:22 +08:00
remove nxsched_lock_irq/nxsched_unlock_irq
reason: nxsched_lock_irq has the same functionality as sched_lock Signed-off-by: hujun5 <hujun5@xiaomi.com>
This commit is contained in:
@@ -212,13 +212,13 @@ static void uart_poll_notify(FAR uart_dev_t *dev, unsigned int min,
|
||||
DEBUGASSERT(max > min && max - min <= CONFIG_SERIAL_NPOLLWAITERS);
|
||||
|
||||
flags = enter_critical_section();
|
||||
nxsched_lock_irq();
|
||||
sched_lock();
|
||||
|
||||
/* Notify the fds in range dev->fds[min] - dev->fds[max] */
|
||||
|
||||
poll_notify(&dev->fds[min], max - min, eventset);
|
||||
|
||||
nxsched_unlock_irq();
|
||||
sched_unlock();
|
||||
leave_critical_section(flags);
|
||||
}
|
||||
|
||||
@@ -2148,7 +2148,7 @@ void uart_connected(FAR uart_dev_t *dev, bool connected)
|
||||
*/
|
||||
|
||||
flags = enter_critical_section();
|
||||
nxsched_lock_irq();
|
||||
sched_lock();
|
||||
dev->disconnected = !connected;
|
||||
if (!connected)
|
||||
{
|
||||
@@ -2169,7 +2169,7 @@ void uart_connected(FAR uart_dev_t *dev, bool connected)
|
||||
uart_wakeup(&dev->recvsem);
|
||||
}
|
||||
|
||||
nxsched_unlock_irq();
|
||||
sched_unlock();
|
||||
leave_critical_section(flags);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -242,13 +242,6 @@
|
||||
# define this_cpu() (0)
|
||||
#endif
|
||||
|
||||
/* Task Switching Interfaces (non-standard).
|
||||
* These two macros can be called in interrupt context.
|
||||
*/
|
||||
|
||||
#define nxsched_lock_irq() (up_interrupt_context() ? OK : sched_lock())
|
||||
#define nxsched_unlock_irq() (up_interrupt_context() ? OK : sched_unlock())
|
||||
|
||||
/****************************************************************************
|
||||
* Public Type Definitions
|
||||
****************************************************************************/
|
||||
|
||||
Reference in New Issue
Block a user