All of lore.kernel.org
 help / color / mirror / Atom feed
From: Philippe Gerum <rpm@xenomai.org>
To: Russell Johnson <russell.johnson@kratosdefense.com>
Cc: xenomai@xenomai.org
Subject: Re: EVL Heap Clarification
Date: Wed, 15 Jun 2022 08:35:56 +0200	[thread overview]
Message-ID: <87o7yupdlo.fsf@xenomai.org> (raw)
In-Reply-To: <PH1P110MB10509BB57F61B3162A85688BE2AA9@PH1P110MB1050.NAMP110.PROD.OUTLOOK.COM>


Russell Johnson via Xenomai <xenomai@xenomai.org> writes:

> Am I correct in assuming that any dynamic allocation in an EVL thread needs
> to use the EVL heap in order to avoid in-band context switching?
>
>  
>
> There are 4 calls in particular that I am using from the EVL heap API:
> evl_init_heap (on startup), evl_alloc_block (may be called during realtime
> processing to expand a data structure), evl_free_block (on shutdown),
> evl_destroy_heap (on shutdown). The question is are all 4 of these calls
> expected to only ever be called by an EVL thread? Looking at the source
> code, I see that the alloc and free functions lock/unlock an EVL mutex so I
> assume those can only be called from an EVL thread? Though the error codes
> are not checked on those mutex calls, so if you call alloc or free from a
> Linux thread, they do not fail. Can init and destroy be called from a Linux
> thread? I was looking at the test code in libevl for heap-torture, and it
> appeared that all 4 of these functions were being called from an EVL
> attached thread.
>

Please check this documentation, the 3rd column gives the answer:
https://evlproject.org/core/user-api/function_index/#memory-heap-services

-- 
Philippe.


      reply	other threads:[~2022-06-15  6:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-14 22:39 EVL Heap Clarification Russell Johnson
2022-06-15  6:35 ` Philippe Gerum [this message]

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=87o7yupdlo.fsf@xenomai.org \
    --to=rpm@xenomai.org \
    --cc=russell.johnson@kratosdefense.com \
    --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.