All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai-core] xnregistry_fetch & friends
@ 2008-08-25 20:19 Jan Kiszka
  2008-08-25 22:11 ` Philippe Gerum
  0 siblings, 1 reply; 14+ messages in thread
From: Jan Kiszka @ 2008-08-25 20:19 UTC (permalink / raw)
  To: xenomai-core

[-- Attachment #1: Type: text/plain, Size: 849 bytes --]

Hi,

trying to select a sane kernel-side looking scheme for fast native
mutexes, I had a closer look at the registry usage in that skin (and
many others). The typical pattern is

object = xnregistry_fetch(handle);
perform_operation(object);

There is no lock around those two, both services do nklock acquisition
only internally. So this is a bit racy against concurrent object
destruction and memory releasing / object reconstruction. Well, I guess
the rational is: we test against object magics and the underlying memory
is normally not vanishing (immediately) on destruction, right? Remains
just object reconstruction. Not a real-life issue?

But then I wonder

 a) why xnregistry_fetch uses nklock at all (even for totally uncritical
    XNOBJECT_SELF!)

 b) what the ideas/plans on unused xnregistry_put/get are.

Jan


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 257 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2008-08-26 13:38 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-25 20:19 [Xenomai-core] xnregistry_fetch & friends Jan Kiszka
2008-08-25 22:11 ` Philippe Gerum
2008-08-25 22:58   ` Jan Kiszka
2008-08-26  8:06     ` Philippe Gerum
2008-08-26  8:27       ` Jan Kiszka
2008-08-26  8:41         ` Philippe Gerum
2008-08-26  8:52           ` Jan Kiszka
2008-08-26  9:09             ` Philippe Gerum
2008-08-26 12:49             ` Gilles Chanteperdrix
2008-08-26 13:08               ` Jan Kiszka
2008-08-26 13:13                 ` Gilles Chanteperdrix
2008-08-26 13:18                   ` Gilles Chanteperdrix
2008-08-26 13:32                     ` Jan Kiszka
2008-08-26 13:38                       ` Gilles Chanteperdrix

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.