Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Sat, 7 Sep 2002 11:05:46 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Sat, 7 Sep 2002 11:05:46 -0400 Received: from smtpout.mac.com ([204.179.120.88]:53225 "EHLO smtpout.mac.com") by vger.kernel.org with ESMTP id ; Sat, 7 Sep 2002 11:05:02 -0400 Date: Sat, 7 Sep 2002 16:39:34 +0200 Subject: Re: [PATCH] POSIX message queues Content-Type: text/plain; charset=US-ASCII; format=flowed Mime-Version: 1.0 (Apple Message framework v482) Cc: linux-kernel@vger.kernel.org, Michal Wronski To: Krzysztof Benedyczak From: pwaechtler@mac.com In-Reply-To: Message-Id: Content-Transfer-Encoding: 7bit X-Mailer: Apple Mail (2.482) Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1446 Lines: 36 Am Samstag den, 31. August 2002, um 14:53, schrieb Krzysztof Benedyczak: > On Thu, 29 Aug 2002 pwaechtler@mac.com wrote: >> >> When implemented in kernel space, you have to create a thread with the >> brand new >> sys_clone_startup (or whatever name it gets) as notification >> (SIGEV_THREAD) - which >> is SCOPE_SYSTEM, no control about this and not always what is desired. > I don't fully understand it. Can you explain it in more details? > Yes, sounds weird. The app requests a SIGEV_THREAD for when a new message arrives. It stores the threads function pointer into the structure that is past into the kernel. If you do not provide some sort of demultiplexer in userspace, the kernel has to create the thread. But unlike fork() the thread is started asyncronously - no code in userspace is there to recognize that. With that the thread scheduler in userspace does not know about this thread. If you want to create a "userspace thread", scheduled by NGPTs scheduler, NGPT has to provide support for this. For this you would need a registry, so when the event is triggered (and a signal with siginfo_t sent to the thread group)- a new thread could be spawned by the NGPT scheduler itself. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/