Skip to content

Commit

Permalink
sched:fix windows sim build error
Browse files Browse the repository at this point in the history
nuttx\sched\signal\sig_timedwait.c(253,13): error C2059: syntax error:'<parameter-list>'
nuttx\sched\signal\sig_timedwait.c(321,44): error C2182: '$S1': illegal use of type 'void'
nuttx\sched\signal\sig_timedwait.c(321,50): error C2059: syntax error:':'

nuttx\sched\tls\tls_initinfo.c(68,39): error C2036: 'void *': unknown size
nuttx\sched\sched\sched_get_tls.c(76,44): error C2036: 'void *': unkown size

Signed-off-by: xuxin19 <[email protected]>
  • Loading branch information
xuxin930 authored and xiaoxiang781216 committed Aug 14, 2024
1 parent 363cd1c commit b3f1871
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
3 changes: 2 additions & 1 deletion sched/sched/sched_get_tls.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,5 +73,6 @@ FAR char **nxsched_get_stackargs(FAR struct tcb_s *tcb)
{
/* The args data follows the TLS data */

return (FAR char**)(tcb->stack_alloc_ptr + nxsched_get_tls(tcb)->tl_size);
return (FAR char**)((FAR char *)tcb->stack_alloc_ptr +
nxsched_get_tls(tcb)->tl_size);
}
4 changes: 2 additions & 2 deletions sched/signal/sig_timedwait.c
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ int nxsig_timedwait(FAR const sigset_t *set, FAR struct siginfo *info,
irqstate_t flags;
sclock_t waitticks;
bool switch_needed;
siginfo_t sinfo;
siginfo_t unbinfo;
int ret;

DEBUGASSERT(set != NULL);
Expand Down Expand Up @@ -318,7 +318,7 @@ int nxsig_timedwait(FAR const sigset_t *set, FAR struct siginfo *info,
}
#endif

rtcb->sigunbinfo = (info == NULL) ? &sinfo : info;
rtcb->sigunbinfo = (info == NULL) ? &unbinfo : info;

/* Check if we should wait for the timeout */

Expand Down
3 changes: 2 additions & 1 deletion sched/tls/tls_initinfo.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ int tls_init_info(FAR struct tcb_s *tcb)

/* Derive tl_size w/o arch knowledge */

info->tl_size = tcb->stack_base_ptr - tcb->stack_alloc_ptr;
info->tl_size =
(FAR char *)tcb->stack_base_ptr - (FAR char *)tcb->stack_alloc_ptr;

/* Attach per-task info in group to TLS */

Expand Down

0 comments on commit b3f1871

Please sign in to comment.