All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
To: Jan Kiszka <jan.kiszka@domain.hid>
Cc: xenomai@xenomai.org, Steve Deiters <SteveDeiters@domain.hid>,
	"Mauerer, Wolfgang" <wolfgang.mauerer@domain.hid>,
	Andreas Glatz <AndreasGlatz@domain.hid>
Subject: Re: [Xenomai-help] Question about getting system time
Date: Tue, 18 May 2010 09:59:16 +0200	[thread overview]
Message-ID: <4BF248D4.4050207@domain.hid> (raw)
In-Reply-To: <4BF23BF7.2010206@domain.hid>

Jan Kiszka wrote:
> Steve Deiters wrote:
>> I guess that is my point though.  Not being all too familiar with the
>> inner workings of Linux or glibc, how am I supposed to know which
>> services are not emitting a syscall?  I accept that I will lose
>> determinism in calling these services, but I find it odd that it may
>> allow the system to deadlock.
>>
>> If nothing else the syscall-less services should be listed and noted as
>> unsafe.  I am new to most of this, but I have went through most of the
>> documentation and, unless I have overlooked it, found nothing mentioning
>> this.
> 
> Key services that do not reliably trigger syscalls:
> 
>  - gettimeofday
>  - clock_gettime (unless the POSIX skin is in use)
>  - malloc
>  - free
> 
> There are no guarantees either, but this list turned out to be fairly
> complete while porting a large (x86) application from plain Linux to
> Xenomai. Only gettimeofday (and, conditionally, clock_gettime) suffer
> from the live-lock problem.
> 
> For runtime checks, enable T_WARNSW / PTHREAD_WARNSW for your RT
> threads, additionally link against librtdk, --wrap the above services,
> and assert_nrt() will trigger a SIGDEBUG when they are used from a RT
> thread (just like normal syscalls will do).
> 
> There should be a few more services in the glibc that trigger malloc
> internally without issuing a syscall. When you come across one (check
> the man pages), additions to xenomai/src/rtdk/assert_context.c are welcome.

Should not we make things more automatic? Integrate rtdk into libxenomai
and forcibly do the wrapping? I am also thinking about modifying
rt_print to make it possible to use it as a drop-in replacement of
printf, and wrap it when using the posix skin.

-- 
					    Gilles.


  reply	other threads:[~2010-05-18  7:59 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-13 22:14 [Xenomai-help] Question about getting system time Abhijit Majumdar
2010-05-14  5:44 ` Gilles Chanteperdrix
2010-05-14 10:34 ` Andreas Glatz
2010-05-14 10:42   ` Gilles Chanteperdrix
2010-05-17 16:27     ` Steve Deiters
2010-05-17 16:52       ` Jan Kiszka
2010-05-17 17:05         ` Steve Deiters
2010-05-17 17:13           ` Jan Kiszka
2010-05-17 18:02             ` Josh Karch
2010-05-17 18:23               ` Jan Kiszka
2010-05-17 18:51               ` Thomas Lockhart
2010-05-17 22:48             ` Steve Deiters
2010-05-17 23:50               ` Gilles Chanteperdrix
2010-05-17 23:53               ` Gilles Chanteperdrix
2010-05-18  0:23                 ` Steve Deiters
2010-05-18  7:04                   ` Jan Kiszka
2010-05-18  7:59                     ` Gilles Chanteperdrix [this message]
2010-05-18  8:38           ` Wolfgang Mauerer
2010-05-18 10:11             ` Gilles Chanteperdrix
2010-05-18 12:11               ` Wolfgang Mauerer
2010-05-18 12:41                 ` Gilles Chanteperdrix
2010-05-18 14:58                   ` [Xenomai-core] " Wolfgang Mauerer
2010-05-18 15:07                     ` Gilles Chanteperdrix
2010-05-18 18:41                     ` Gilles Chanteperdrix
2010-05-18 20:23                       ` Wolfgang Mauerer
2010-05-18 21:19                         ` Gilles Chanteperdrix
2010-05-18 22:09                           ` Jan Kiszka
2010-05-18 22:24                             ` Gilles Chanteperdrix
2010-05-18 23:02                               ` Jan Kiszka
2010-05-19  5:49                                 ` Gilles Chanteperdrix
2010-05-19  7:11                                   ` Jan Kiszka
2010-05-21  8:55                                     ` Gilles Chanteperdrix
2010-05-27 15:35                                       ` Wolfgang Mauerer
2010-05-19 19:16                                   ` Daniele Nicolodi
2010-05-19 20:55                                     ` Gilles Chanteperdrix

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4BF248D4.4050207@domain.hid \
    --to=gilles.chanteperdrix@xenomai.org \
    --cc=AndreasGlatz@domain.hid \
    --cc=SteveDeiters@domain.hid \
    --cc=jan.kiszka@domain.hid \
    --cc=wolfgang.mauerer@domain.hid \
    --cc=xenomai@xenomai.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.