All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@domain.hid>
To: Wolfgang Grandegger <wg@domain.hid>
Cc: xenomai-core <xenomai@xenomai.org>
Subject: Re: [Xenomai-core] Re: RT-CAN tx_sem
Date: Sun, 18 Feb 2007 21:37:03 +0100	[thread overview]
Message-ID: <45D8B8EF.3020204@domain.hid> (raw)
In-Reply-To: <45D8AEB3.4020909@domain.hid>

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

Wolfgang Grandegger wrote:
> Jan Kiszka wrote:
>> Jan Kiszka wrote:
>>> I thought about this issue again and found the reason for my vague bad
>>> feeling: re-init is not atomic, thus racy. But also the test+sem_init
>>> pattern I suggested is not save.
>>>
>>> I guess we need to enhance rtdm_XXX_init in this regard to make the
>>> RT-CAN use case an officially allowed one. /me is planning to spend more
>>> thoughts on this the next days.
>>
>> OK, done, rtdm_{event,sem,mutex}_init are now protected by the nklock in
>> trunk. This should make the in-place re-initialisation of RTDM IPC
>> objects race-free and allow to use them in RT-CAN as originally
>> intended. I think I will back-port that pieces also to v2.3.x later.
>>
>> What patch should now go in to avoid double init/destroy and fix
>> rtcan_virt?
> 
> Attached. Thanks.
> 

Just applied to trunk.

To avoid lock nesting where possible, I reordered some code in
rtcan_raw_sendmsg. Please re-check if I messed anything up. Then I could
commit to stable, too.

Jan


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

  reply	other threads:[~2007-02-18 20:37 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-14 18:30 [Xenomai-core] RT-CAN tx_sem Jan Kiszka
2007-02-15  8:37 ` [Xenomai-core] " Wolfgang Grandegger
2007-02-15 13:25 ` Wolfgang Grandegger
2007-02-15 13:36   ` Jan Kiszka
2007-02-15 13:54     ` Wolfgang Grandegger
2007-02-15 14:29       ` Jan Kiszka
2007-02-15 16:45         ` Wolfgang Grandegger
2007-02-17 10:19           ` Jan Kiszka
2007-02-18 18:31             ` Jan Kiszka
2007-02-18 19:53               ` Wolfgang Grandegger
2007-02-18 20:37                 ` Jan Kiszka [this message]
2007-02-19 14:04                   ` Wolfgang Grandegger
2007-02-19 14:15                     ` Jan Kiszka
2007-02-19 14:48                       ` Wolfgang Grandegger
2007-02-15 14:01     ` Sebastian Smolorz

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=45D8B8EF.3020204@domain.hid \
    --to=jan.kiszka@domain.hid \
    --cc=wg@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.