pussuw commented on code in PR #15563:
URL: https://github.com/apache/nuttx/pull/15563#discussion_r1916604161
##########
arch/risc-v/src/common/riscv_initialstate.c:
##########
@@ -153,6 +153,8 @@ void up_initial_state(struct tcb_s *tcb)
#ifdef CONFIG_SCHED_THREAD_LOCAL
xcp->regs[REG_TP] = (uintptr_t)tcb->stack_alloc_ptr +
sizeof(struct tls_info_s);
+#else
+ xcp->regs[REG_TP] = (uintptr_t)tcb;
Review Comment:
This is not necessary, just set tcb -> tp directly when a context switch
occurs.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]