* [Xenomai-help] syslog safe?
@ 2006-04-25 17:40 Kent Borg
2006-04-25 17:52 ` Philippe Gerum
0 siblings, 1 reply; 4+ messages in thread
From: Kent Borg @ 2006-04-25 17:40 UTC (permalink / raw)
To: xenomai
Is syslog() safe to call from real time userland code? (If not, what
is the right way to do such output?)
Thanks,
-kb
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Xenomai-help] syslog safe?
2006-04-25 17:40 [Xenomai-help] syslog safe? Kent Borg
@ 2006-04-25 17:52 ` Philippe Gerum
2006-04-25 18:37 ` Kent Borg
0 siblings, 1 reply; 4+ messages in thread
From: Philippe Gerum @ 2006-04-25 17:52 UTC (permalink / raw)
To: Kent Borg; +Cc: xenomai
Kent Borg wrote:
> Is syslog() safe to call from real time userland code? (If not, what
> is the right way to do such output?)
No problem using it, but it will trigger an automatic switch to
secondary mode in order to issue the right Linux syscalls. The thread
will switch back to primary automatically again as soon as a (usually
blocking) Xenomai syscall is issued.
--
Philippe.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Xenomai-help] syslog safe?
2006-04-25 17:52 ` Philippe Gerum
@ 2006-04-25 18:37 ` Kent Borg
2006-04-25 20:58 ` Philippe Gerum
0 siblings, 1 reply; 4+ messages in thread
From: Kent Borg @ 2006-04-25 18:37 UTC (permalink / raw)
To: Philippe Gerum; +Cc: xenomai
On Tue, Apr 25, 2006 at 07:52:48PM +0200, Philippe Gerum wrote:
> No problem using it, but it will trigger an automatic switch to
> secondary mode in order to issue the right Linux syscalls. The thread
> will switch back to primary automatically again as soon as a (usually
> blocking) Xenomai syscall is issued.
And, looking at strace output, it appears that is a syslog() is too
low a priority to be logged it doesn't make a system call and so will
not drop us out of realtime.
Thanks,
-kb
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Xenomai-help] syslog safe?
2006-04-25 18:37 ` Kent Borg
@ 2006-04-25 20:58 ` Philippe Gerum
0 siblings, 0 replies; 4+ messages in thread
From: Philippe Gerum @ 2006-04-25 20:58 UTC (permalink / raw)
To: Kent Borg; +Cc: xenomai
Kent Borg wrote:
> On Tue, Apr 25, 2006 at 07:52:48PM +0200, Philippe Gerum wrote:
>
>>No problem using it, but it will trigger an automatic switch to
>>secondary mode in order to issue the right Linux syscalls. The thread
>>will switch back to primary automatically again as soon as a (usually
>>blocking) Xenomai syscall is issued.
>
>
> And, looking at strace output, it appears that is a syslog() is too
> low a priority to be logged it doesn't make a system call and so will
> not drop us out of realtime.
>
>
Do not trust strace there, it heavily relies on other glibc services,
like buffered I/O, which might issue syscalls under various conditions.
For instance, internal mutex locking might cause a syscall to deal with
any contended request, or malloc called indirectly might ask for
extending the caller's data segment, and so on. Additionally, some
syslog flags, like LOG_CONS, do cause file I/O.
--
Philippe.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2006-04-25 20:58 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-04-25 17:40 [Xenomai-help] syslog safe? Kent Borg
2006-04-25 17:52 ` Philippe Gerum
2006-04-25 18:37 ` Kent Borg
2006-04-25 20:58 ` Philippe Gerum
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.