From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31456 invoked by alias); 7 Apr 2008 16:31:06 -0000 Received: (qmail 31447 invoked by uid 22791); 7 Apr 2008 16:31:05 -0000 X-Spam-Check-By: sourceware.org Received: from anchor-post-37.mail.demon.net (HELO anchor-post-37.mail.demon.net) (194.217.242.87) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 07 Apr 2008 16:30:37 +0000 Received: from calivar.demon.co.uk ([83.104.54.243] helo=xl5.calivar.com) by anchor-post-37.mail.demon.net with esmtp (Exim 4.68) id 1JiuEm-0000lo-O6; Mon, 07 Apr 2008 16:30:30 +0000 Received: from xl5.calivar.com (localhost [127.0.0.1]) by xl5.calivar.com (Postfix) with ESMTP id 28982138762; Mon, 7 Apr 2008 17:30:27 +0100 (BST) To: "Zhichao Hong" Cc: ecos-discuss@ecos.sourceware.org References: <3fea10110804070755x1ac37586v79010a8b4116f457@mail.gmail.com> <3fea10110804070901q2704793bq2788821fa55c11a5@mail.gmail.com> From: Nick Garnett Original-Sender: nickg@ecoscentric.com Date: Mon, 07 Apr 2008 16:36:00 -0000 In-Reply-To: <3fea10110804070901q2704793bq2788821fa55c11a5@mail.gmail.com> Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Mailing-List: contact ecos-discuss-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@ecos.sourceware.org Subject: Re: [ECOS] pthread_kill and signal lost or pending? X-SW-Source: 2008-04/txt/msg00117.txt.bz2 "Zhichao Hong" writes: > Nick, > > Thank you for you quick response! Is the sigaction and sigqueue in > eCos process wise or thread wise? If sigqueue is called, is it for > the whole process which is always 0 in eCos get the signal? sigqueue() only delivers to the whole process. So you have to select which thread gets the signal by manipulating the signal masks. Signal handlers are global, as POSIX requires. Assuming anything about which thread a signal handler is run in is not good practice. If you want to restrict signal delivery to a particular thread, it is often more sensible to use sigwait(). eCos only allows a pid value of 0 for any of the signal functions since there is notionally only a single process. -- Nick Garnett eCos Kernel Architect eCosCentric Limited http://www.eCosCentric.com The eCos experts Barnwell House, Barnwell Drive, Cambridge, UK. Tel: +44 1223 245571 Registered in England and Wales: Reg No 4422071. ** Visit us at ESC Silicon Valley ** ** April 15-17 2008, Booth 3012, San Jose McEnery Convention Center ** -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss