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:
hujun5
2024-11-03 13:37:40 +08:00
committed by Xiang Xiao
parent 1bb01d40fd
commit a1bb967941
2 changed files with 4 additions and 11 deletions
+4 -4
View File
@@ -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
-7
View File
@@ -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
****************************************************************************/