From: Fawad Lateef <fawadlateef@gmail.com>
To: "ppunnam@kent.edu" <ppunnam@kent.edu>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: send_sigqueue problem..
Date: Thu, 3 Nov 2005 05:57:31 +0500 [thread overview]
Message-ID: <1e62d1370511021657m4bb6de33ofeca1422a4bd497f@mail.gmail.com> (raw)
In-Reply-To: <1932830193449a.193449a1932830@kent.edu>
On 11/3/05, ppunnam@kent.edu <ppunnam@kent.edu> wrote:
>
> i am trying to use the linux signaling to signal a user process from
> the kernel..
> i require a reliable(without any signal loss) and fast signaling
> mechanism.
> i tried to use the send_sigqueue to send the signals...here what i did
>
> 1) creted the sigqueue structure using the sigqueue_alloc()..
> 2) called the send_sigqueue() function...
> it worked fine for some time(around 1000 sig) but after that
> sigqueue_alloc failing..may be becuse of not enough memory available
> to allocate sigqueue..
Its obvious that if you allocate some-thing (like through
sigqueue_alloc) then you have to free that too (like through
sigqueue_free)
> i got few question about this..
>
> 1) does sigqueue structure need to be removed explisitly or it will be
> autometically cleared after the signal delivery (i did't used the
> sigqueue_free() becuse i dont know when the signal is deliverd).
yes, you have to remove the structure explicitly as you allocated it
by your-self ! And I think you can call sigqueue_free just after
calling send_sigqueue because the singals are delivered to the process
with the wake_up call and then you can remove your sigqueue structure
(I might be wrong as I am saying this by just going through the
send_sigqueue function, CMIIW)
> 2)there is any another way i can implement such a signaling mechanism.
>
I saw one simple way in signal.c file. send_sig function which sends
signal by-itself (means allocate sigqueue internally) see
http://lxr.linux.no/source/kernel/signal.c#L1249
--
Fawad Lateef
prev parent reply other threads:[~2005-11-03 0:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-02 22:11 ppunnam
2005-11-03 0:57 ` Fawad Lateef [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=1e62d1370511021657m4bb6de33ofeca1422a4bd497f@mail.gmail.com \
--to=fawadlateef@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=ppunnam@kent.edu \
/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
all inboxes | Powered by JetHome®