From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S263646AbTKQTHZ (ORCPT ); Mon, 17 Nov 2003 14:07:25 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S263650AbTKQTHZ (ORCPT ); Mon, 17 Nov 2003 14:07:25 -0500 Received: from cpe-24-221-190-179.ca.sprintbbd.net ([24.221.190.179]:5764 "EHLO myware.akkadia.org") by vger.kernel.org with ESMTP id S263646AbTKQTHX (ORCPT ); Mon, 17 Nov 2003 14:07:23 -0500 Message-ID: <3FB91C54.5020905@redhat.com> Date: Mon, 17 Nov 2003 11:07:00 -0800 From: Ulrich Drepper Organization: Red Hat, Inc. User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20030925 Thunderbird/0.3 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Krzysztof Benedyczak CC: Jamie Lokier , linux-kernel@vger.kernel.org, Manfred Spraul , Michal Wronski Subject: Re: [PATCH] POSIX message queues - syscalls & SIGEV_THREAD References: <20031117064832.GA16597@mail.shareable.org> In-Reply-To: X-Enigmail-Version: 0.81.7.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Krzysztof Benedyczak wrote: > In userspace we can assign one futex to > every such a queue and pass it to kernel in mq_notify syscall. Then we can > use FUTEX_FD to get file descriptors of all futexes and wait on them with > poll(). On the kernel side it notification have to be triggered we change > futex value and do FUTEX_WAKE. Yes, this would be possible if FUTEX_FD wouldn't be useless as it is implemented today (see the futex paper I announced here recently). The thing which makes FUTEX_WAIT work is the current value of the futex which is passed to the kernel and based on which the userlevel code made it decisions. This part doesn't exist in case of using FUTEX_FD. The main recent I suggested using futexes for the notification is that it is flexible. For now, we can use simple waiting by creating the thread ahead of time. This could change later when there is a reliable multi-futex wait operation. - -- ➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖ -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (GNU/Linux) iD8DBQE/uRxU2ijCOnn/RHQRArcGAJ921MfetyPy1ciyYE2C7SG6nm0RLQCfbbwh AUFbyDBmQJGAd1Vk+20TaTc= =o+cD -----END PGP SIGNATURE-----