AW: question about posix timer expiration
Gabriel.Moyano at dlr.de
Gabriel.Moyano at dlr.de
Fri May 21 09:44:33 UTC 2021
Hi Chris,
Did you compile ptpd with kqueue only? I’ve tried with posix timer, which are implemented in rtems, but it seems that the handler with siginfo_t is not called correctly. I’ve managed to get it working using a workaround but I’ll continue with kqueue, thx!.
Regards,
Gabriel
Von: Chris Johns <chrisj at rtems.org>
Gesendet: Mittwoch, 19. Mai 2021 10:30
An: Moyano Heredia, Victor Gabriel <Gabriel.Moyano at dlr.de>
Cc: devel at rtems.org
Betreff: Re: question about posix timer expiration
On 18 May 2021, at 10:02 pm, Gabriel.Moyano at dlr.de<mailto:Gabriel.Moyano at dlr.de> wrote:
From further investigation I’ve found that when a timer expires, _POSIX_Timer_TSR() is called and this uses pthread_kill() to send a signal. Shouldn’t ptimer->inf.sigev_value be used here in order to create a siginfo_t object with the right value?
Did anyone have to deal with this while using posix timers?
Thanks!
Von: devel <devel-bounces at rtems.org<mailto:devel-bounces at rtems.org>> Im Auftrag von Gabriel.Moyano at dlr.de<mailto:Gabriel.Moyano at dlr.de>
Gesendet: Mittwoch, 12. Mai 2021 14:37
An: devel at rtems.org<mailto:devel at rtems.org>
Betreff: question about posix timer expiration
Hello everyone,
Currently I am trying to get running ptpd on rtems (following the Chris’ work, thx btw).
Ptpd uses posix timers and when a timer expires a handler with this signature void(int sig, siginfo_t *info, void *ucontext) is called.
Is this on libbsd? If it is I would have expected kqueue being used so I am not sure where this is happening.
Chris
Unfortunately (*info) doesn’t have the right values, eg. info->si_code should be SI_TIMER but it is SI_USER and also info->si_signo should be the same as sig but it’s not.
Diving into the code I’ve found where the handler is called (also where *info is created). This is done in the function _POSIX_signals_Check_signal() in the file psignalunblockthread.c. It doesn’t seems that info is updated with the values (I guess) should take from object ptimer, which was created by create_timer().
My question is: is this handler fully supported? Or maybe I’m missing something else.
Thanks in advance,
Gabriel
——————————————————————————
Deutsches Zentrum für Luft- und Raumfahrt e.V. (DLR)
Institute for Software Technology | SC-OSS | Lilienthalplatz 7 | 38108 Braunschweig | Germany
Gabriel Moyano | Research Scientist in Onboard Software Systems group
gabriel.moyano at dlr.de<mailto:gabriel.moyano at dlr.de>
DLR.de<http://www.dlr.de/>
_______________________________________________
devel mailing list
devel at rtems.org<mailto:devel at rtems.org>
http://lists.rtems.org/mailman/listinfo/devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20210521/782802d7/attachment-0001.html>
More information about the devel
mailing list