Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 24 Jun 2004 23:44:25 -0400 (EDT)
From:      Robert Watson <rwatson@freebsd.org>
To:        pradeep reddy punnam <prady_p@yahoo.com>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: regarding psignal()
Message-ID:  <Pine.NEB.3.96L.1040624234231.26400D-100000@fledge.watson.org>
In-Reply-To: <20040622231613.25570.qmail@web53402.mail.yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 22 Jun 2004, pradeep reddy punnam wrote:

> i am modifing my ../netinet/ip_input.c code so that kernel can inform a
> user process about the arrival of a packet, i want to use signaling
> mechanism for this , i know the pid of the process to which the signal
> should be send, i am looing for exact function that can help me in
> sending SIGIO to procss...  i tryed to use the kill and psignal
> functions but the system going panic when the packet arrives...may be my
> use of the fuctions is wrong...  somebody tell me what functions are
> suitable to call for such a situation....  thanking you... 

Hmmm.  I'm not sure how what you're trying to do differs from the existing
aio/sigio capabilities, but assuming those don't provide what you need,
I'd suggest looking at uipc_socket2.c:sowakeup().  This is the function
that generates a variety of wakeups on socket events, including select,
waking up processes in sbwait() blocked in sockets, SIGIO, upcalls to NFS
(and friends), AIO wakeups, and so on.  Lots of models to look at :-).

Robert N M Watson             FreeBSD Core Team, TrustedBSD Projects
robert@fledge.watson.org      Principal Research Scientist, McAfee Research



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.NEB.3.96L.1040624234231.26400D-100000>