Skip to content

Commit cde0bbb

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 <wangchengdong@lixiang.com>
1 parent e947c70 commit cde0bbb

3 files changed

Lines changed: 5 additions & 2 deletions

File tree

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/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)