casaroli commented on code in PR #20130:
URL: https://github.com/apache/nuttx/pull/20130#discussion_r4013182907
##########
sched/timer/timer_create.c:
##########
@@ -196,6 +200,24 @@ int timer_create(clockid_t clockid, FAR struct sigevent
*evp,
/* Yes, copy the entire struct sigevent content */
memcpy(&ret->pt_event, evp, sizeof(struct sigevent));
+
+#if defined(CONFIG_FDPIC) && defined(CONFIG_SIG_EVTHREAD)
+ /* Resolve the callback and take the data base here, where
+ * this still runs in the module's context. The callback
+ * fires later on a worker that carries neither. The function
+ * shares a union with the thread ID, so only a SIGEV_THREAD
+ * event has one to resolve.
+ */
+
+ if ((evp->sigev_notify & SIGEV_THREAD) != 0)
+ {
+ ret->pt_event.sigev_notify_function =
+ (sigev_notify_function_t)fdpic_callback(
+ (FAR void *)evp->sigev_notify_function);
+ }
+
+ ret->pt_work.got = fdpic_base();
Review Comment:
done
--
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]