Skip to content

Commit 16259f2

Browse files
committed
sched/signal: Fix build warning when signals are disabled
Fix a build warning that occurs when signal support is disabled. Signed-off-by: Chengdong Wang <[email protected]>
1 parent 0205080 commit 16259f2

File tree

4 files changed

+6
-3
lines changed

4 files changed

+6
-3
lines changed

fs/vfs/fs_epoll.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -724,7 +724,9 @@ int epoll_pwait(int epfd, FAR struct epoll_event *evs,
724724
{
725725
FAR struct file *filep;
726726
FAR epoll_head_t *eph;
727+
#ifndef CONFIG_DISABLE_SIGNALS
727728
sigset_t oldsigmask;
729+
#endif
728730
int ret;
729731

730732
eph = epoll_head_from_fd(epfd, &filep);

sched/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ config DISABLE_ENVIRON
4646

4747
config DISABLE_SIGNALS
4848
bool "Disable signal support"
49-
default n
49+
default DEFAULT_SMALL
5050
---help---
5151
Disabling the signal mechanism significantly reduces system footprint and complexity.
5252
It can also improve real-time performance during thread creation and context switching.

sched/pthread/pthread_exit.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,9 @@
6565
void nx_pthread_exit(FAR void *exit_value)
6666
{
6767
FAR struct tcb_s *tcb = this_task();
68+
#ifndef CONFIG_DISABLE_SIGNALS
6869
sigset_t set;
70+
#endif
6971
int status;
7072

7173
sinfo("exit_value=%p\n", exit_value);

sched/task/task_setup.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,6 @@ static int nxthread_setup_scheduler(FAR struct tcb_s *tcb, int priority,
403403
start_t start, CODE void *entry,
404404
uint8_t ttype)
405405
{
406-
FAR struct tcb_s *rtcb = this_task();
407406
irqstate_t flags;
408407
int ret;
409408

@@ -462,7 +461,7 @@ static int nxthread_setup_scheduler(FAR struct tcb_s *tcb, int priority,
462461
* inherit the signal mask of the parent thread.
463462
*/
464463

465-
tcb->sigprocmask = rtcb->sigprocmask;
464+
tcb->sigprocmask = this_task()->sigprocmask;
466465
#endif
467466

468467
/* Initialize the task state. It does not get a valid state

0 commit comments

Comments
 (0)