[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freebsd-hackers
Subject:    Re: regarding psignal()
From:       Robert Watson <rwatson () freebsd ! org>
Date:       2004-06-25 3:44:25
Message-ID: Pine.NEB.3.96L.1040624234231.26400D-100000 () fledge ! watson ! org
[Download RAW message or body]

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

_______________________________________________
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic