This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new 6f1e99c9bd5 sched: assert if call timedwait from interrupt
6f1e99c9bd5 is described below
commit 6f1e99c9bd52aff0e02478edec0171aca7c064b3
Author: anjiahao <[email protected]>
AuthorDate: Fri Nov 15 11:36:10 2024 +0800
sched: assert if call timedwait from interrupt
Nuttx does not allow calling interfaces like TIME_WAIT in interrupts, so we
need to directly assert.
Signed-off-by: anjiahao <[email protected]>
---
sched/signal/sig_timedwait.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sched/signal/sig_timedwait.c b/sched/signal/sig_timedwait.c
index 19f9f400385..096bae1cbaf 100644
--- a/sched/signal/sig_timedwait.c
+++ b/sched/signal/sig_timedwait.c
@@ -340,7 +340,7 @@ int nxsig_timedwait(FAR const sigset_t *set, FAR struct
siginfo *info,
siginfo_t unbinfo;
int ret;
- DEBUGASSERT(set != NULL);
+ DEBUGASSERT(set != NULL && up_interrupt_context() == false);
/* Several operations must be performed below: We must determine if any
* signal is pending and, if not, wait for the signal. Since signals can