diff --git a/boards/arm/a1x/pcduino-a10/configs/nsh/defconfig b/boards/arm/a1x/pcduino-a10/configs/nsh/defconfig index 2fe5cb645e993..7565adfb0721e 100644 --- a/boards/arm/a1x/pcduino-a10/configs/nsh/defconfig +++ b/boards/arm/a1x/pcduino-a10/configs/nsh/defconfig @@ -27,7 +27,6 @@ CONFIG_FAT_LFN=y CONFIG_FS_FAT=y CONFIG_HAVE_CXX=y CONFIG_HAVE_CXXINITIALIZE=y -CONFIG_HOST_WINDOWS=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INTELHEX_BINARY=y CONFIG_NSH_BUILTIN_APPS=y @@ -39,6 +38,7 @@ CONFIG_RAM_START=0x4a000000 CONFIG_RAM_VSTART=0x4a000000 CONFIG_RAW_BINARY=y CONFIG_RR_INTERVAL=200 +CONFIG_SCHED_EVENTS=y CONFIG_SCHED_WAITPID=y CONFIG_START_DAY=31 CONFIG_START_MONTH=7 diff --git a/boards/risc-v/c906/smartl-c906/configs/nsh/defconfig b/boards/risc-v/c906/smartl-c906/configs/nsh/defconfig index 55ecddf057845..eb48db2c37c06 100644 --- a/boards/risc-v/c906/smartl-c906/configs/nsh/defconfig +++ b/boards/risc-v/c906/smartl-c906/configs/nsh/defconfig @@ -44,6 +44,7 @@ CONFIG_RAM_START=0x00300000 CONFIG_RAW_BINARY=y CONFIG_READLINE_CMD_HISTORY=y CONFIG_RR_INTERVAL=200 +CONFIG_SCHED_EVENTS=y CONFIG_SCHED_HPWORK=y CONFIG_SCHED_LPWORK=y CONFIG_SCHED_WAITPID=y diff --git a/sched/event/event_post.c b/sched/event/event_post.c index 03ae633142b95..3efc3f7d64dae 100644 --- a/sched/event/event_post.c +++ b/sched/event/event_post.c @@ -68,7 +68,7 @@ int nxevent_post(FAR nxevent_t *event, nxevent_mask_t events, dq_queue_t *waitlist; bool waitall; bool postall; - bool need_switch; + bool need_switch = false; if (event == NULL) { @@ -133,11 +133,11 @@ int nxevent_post(FAR nxevent_t *event, nxevent_mask_t events, break; } } + } - if (clear) - { - event->events &= ~clear; - } + if (clear != 0) + { + event->events &= ~clear; } if (need_switch)