From owner-freebsd-hackers@FreeBSD.ORG Thu Dec 22 06:16:20 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B7E56106564A for ; Thu, 22 Dec 2011 06:16:20 +0000 (UTC) (envelope-from sushanth_rai@yahoo.com) Received: from nm24.access.bullet.mail.sp2.yahoo.com (nm24.access.bullet.mail.sp2.yahoo.com [98.139.44.151]) by mx1.freebsd.org (Postfix) with SMTP id 8EF058FC0A for ; Thu, 22 Dec 2011 06:16:20 +0000 (UTC) Received: from [98.139.44.99] by nm24.access.bullet.mail.sp2.yahoo.com with NNFMP; 22 Dec 2011 06:03:33 -0000 Received: from [98.139.44.90] by tm4.access.bullet.mail.sp2.yahoo.com with NNFMP; 22 Dec 2011 06:03:33 -0000 Received: from [127.0.0.1] by omp1027.access.mail.sp2.yahoo.com with NNFMP; 22 Dec 2011 06:03:33 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 212026.83351.bm@omp1027.access.mail.sp2.yahoo.com Received: (qmail 55465 invoked by uid 60001); 22 Dec 2011 06:03:32 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1324533812; bh=7LKyWHzKHxwVL9piKeJaf2Eyf4dv3pO8QnNvE6DDt4A=; h=X-YMail-OSG:Received:X-Mailer:Message-ID:Date:From:Subject:To:MIME-Version:Content-Type; b=v0Khk0F1emjBrMZbvLcVjcQjN2g2GFqstTCj8a3ANdngYlCD7Yq+8/Ctmxw2qywG7IVOIb81nkJtYAJ/S5Pzun1rZq0EX3O0W6la77m/bGaXSw7W74O+ewVaiL09SpudMTVFD+SflD4XnpQESZhOmxYHPu38vY4zYfRvxphTUVk= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Mailer:Message-ID:Date:From:Subject:To:MIME-Version:Content-Type; b=B7ixmc1QGySA7MULnWBV4ElhAiXNaCKLJAFz3H7a1/qa4zLhcw42/wrej+kHojc9MHB1i/JlKhmswprqyv/quEBuH+BIZrqkQT/XAcRuTiYKZpIZkFclmI26heYdKhJ+Nt+LSgyUGVXqMwf1pBP2vdmFLAsbke6joj5gMw7nbrw=; X-YMail-OSG: OQZJG48VM1mtwDh517F58MdLRV..ZIGH0oIxAAuXySRjssc xXyZyUnm8HVrpbLkadHmwQEZWOvb9b4hHGqmO7xPNQ6EaQbouS_mKUWp.9uJ 0ZAOVe.fTSu.M.cyQNcsISzIsb1SBai22BnZji9eQgBxOV12KsjjxGxXpBj0 WSAde_comiYVTXX8_H1O6QUfB3X7E9FpaSh3Sflu7WA7.Kukd3Ln_tolySSU RFmxp.z0xemJH8pukPn_9YlcAmwVIEj6Gm0T04EVvWf8xLnLRUzX2RLsiZrp qXRaJRSiR.4aTTEgHY.zmpLCfWVyPEZrYnfOy6P1KBpk6cSKZZ7MWTgZSTbq EoUr0_0_0F0zs06VLCD183lLYJUplahbW4nUMtygoPocuhPfi9ZsbyOoVf8e fRNZB28.AMg9FXLepsbIa2HsulvP_znfQB2eNae9BHhsqAFatXnlDFv6R9jh zCY59g.g- Received: from [76.211.234.138] by web180006.mail.gq1.yahoo.com via HTTP; Wed, 21 Dec 2011 22:03:31 PST X-Mailer: YahooMailClassic/15.0.4 YahooMailWebService/0.8.115.331698 Message-ID: <1324533811.54730.YahooMailClassic@web180006.mail.gq1.yahoo.com> Date: Wed, 21 Dec 2011 22:03:31 -0800 (PST) From: Sushanth Rai To: freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailman-Approved-At: Thu, 22 Dec 2011 06:26:55 +0000 Subject: Using kevent for signalling user app from kernel X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Dec 2011 06:16:20 -0000 Hi, I'm planning to use kqueue/kevent mechanism to notify a user application from the kernel. Basically I set up a file descriptor for read event from the user application by calling kevent(). Now, I would like to wake-up the process from within the kernel. The wake-up will happen due to one of the internal events (not due to data being available to read). I have access to the process structure and vnode corresponding to file descriptor. Is there a mechanism available from the kernel to trigger a wakeup and clear the kernel break notify message ? Thanks, Sushanth