public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Arka Sharma <arka.sw1988@gmail.com>
To: edk2-devel@lists.01.org
Subject: Closing events and releasing resources in notify function
Date: Fri, 24 Mar 2017 11:52:34 +0530	[thread overview]
Message-ID: <CAPO=kN0VmZcnqSDQfsEc8AKDazQ+QZNZ+PzNcTTXkrzJfrLJXw@mail.gmail.com> (raw)

Hi,

Is it ok to close the event and release the resource allocated to be
sent as context inside the notify function. May be something like this

VOID
EFIAPI
NotifyRoutine (
       EFI_EVENT Event,
       VOID  *Context
)
{
   //
   // Perform intended task
   //
   FreePool (Context);
   gBS->CloseEvent (Event);
}

In the above example Context was allocated before creating the event
and passed as a parameter to CreateEvent().

Regards,
Arka


             reply	other threads:[~2017-03-24  6:22 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-24  6:22 Arka Sharma [this message]
2017-03-24  6:37 ` Closing events and releasing resources in notify function Andrew Fish
2017-03-24  7:07   ` Arka Sharma
2017-03-24  7:08     ` Andrew Fish

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-list 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='CAPO=kN0VmZcnqSDQfsEc8AKDazQ+QZNZ+PzNcTTXkrzJfrLJXw@mail.gmail.com' \
    --to=devel@edk2.groups.io \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox