From owner-freebsd-hackers@FreeBSD.ORG Fri Jun 25 03:44:52 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F171416A4CE for ; Fri, 25 Jun 2004 03:44:52 +0000 (GMT) Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id A0E7643D45 for ; Fri, 25 Jun 2004 03:44:52 +0000 (GMT) (envelope-from robert@fledge.watson.org) Received: from fledge.watson.org (localhost [127.0.0.1]) by fledge.watson.org (8.12.11/8.12.11) with ESMTP id i5P3iQOM027438; Thu, 24 Jun 2004 23:44:26 -0400 (EDT) (envelope-from robert@fledge.watson.org) Received: from localhost (robert@localhost)i5P3iPWl027435; Thu, 24 Jun 2004 23:44:25 -0400 (EDT) (envelope-from robert@fledge.watson.org) Date: Thu, 24 Jun 2004 23:44:25 -0400 (EDT) From: Robert Watson X-Sender: robert@fledge.watson.org To: pradeep reddy punnam In-Reply-To: <20040622231613.25570.qmail@web53402.mail.yahoo.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-hackers@freebsd.org Subject: Re: regarding psignal() X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Jun 2004 03:44:53 -0000 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