From owner-freebsd-stable Sat Aug 17 2:31:52 2002 Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1B11437B400; Sat, 17 Aug 2002 02:31:50 -0700 (PDT) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id D953343E75; Sat, 17 Aug 2002 02:31:49 -0700 (PDT) (envelope-from mux@freebsd.org) Received: by elvis.mu.org (Postfix, from userid 1920) id AFF4FAE027; Sat, 17 Aug 2002 02:31:49 -0700 (PDT) Date: Sat, 17 Aug 2002 02:31:49 -0700 From: Maxime Henrion To: Terry Lambert Cc: stable@freebsd.org, jlemon@freebsd.org Subject: Re: PATCH2: Better kqueue patches Message-ID: <20020817093149.GL14155@elvis.mu.org> References: <3D5E0E57.3CCF4F70@mindspring.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3D5E0E57.3CCF4F70@mindspring.com> User-Agent: Mutt/1.3.27i Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Terry Lambert wrote: > OK, these patches still add support for System V message queue > integration into kqueue. They also fix the problems I noted > before, by adding a third parameter to KNOTE(), and fixing up > the kn_fop->f_event() functions to take a third parameter. > > This fixes the message queue ID > 65536 problem, and also fixes > the event/hint mux problem with signal and proc notes (particularly, > it allows for more than 20 bits of PID, if that's ever considered > desirable at some point). > > It also adds support for a virtual event, if the System V message > queue was not empty when the filter is first attached, to avoid > the need to do the poll-after-attach, and to poll on reads to avoid > the potential race condition (you would still need this for multiple > readers on the same queue, though... obviously). > > I think this code is OK to commit, if someone want to review it and > commit it. > > Context diffs vs. -STABLE attached. If you want to get this committed, it would probably help if you could generate diffs against -CURRENT. Also, not being a sysV nor a kqueue expert, your patch looks very nice. Just one small nit: malloc() with the M_WAITOK flag can't return NULL, so it's useless to test the pointer against NULL. Cheers, Maxime To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message