From owner-freebsd-arch Tue Jul 10 20:49:15 2001 Delivered-To: freebsd-arch@freebsd.org Received: from InterJet.elischer.org (c421509-a.pinol1.sfba.home.com [24.7.86.9]) by hub.freebsd.org (Postfix) with ESMTP id 88A5737B405 for ; Tue, 10 Jul 2001 20:49:07 -0700 (PDT) (envelope-from julian@elischer.org) Received: from elischer.org (InterJet.elischer.org [192.168.1.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id WAA56560; Tue, 10 Jul 2001 22:23:47 -0700 (PDT) Message-ID: <3B4BC829.C3879AF2@elischer.org> Date: Tue, 10 Jul 2001 20:29:46 -0700 From: Julian Elischer X-Mailer: Mozilla 4.7 [en] (X11; U; FreeBSD 5.0-CURRENT i386) X-Accept-Language: en, hu MIME-Version: 1.0 To: Daniel Eischen Cc: Jason Evans , arch@FreeBSD.ORG Subject: Re: help needed in threads.. (Signals) References: Content-Type: text/plain; charset=iso-8859-2 Content-Transfer-Encoding: 7bit Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Daniel Eischen wrote: > Ok so I think I have it 'kinda' worked out in my head.. there are some loose ends however that depend on how the interrupt masks etc are handled... In KSE mode: 1/ is there still a "per process" signal mask, and set of handler addresses? Or just separate ones per thread? 2/ are there separate handlers registerable per thread? (i.e. if thread A gets a SIGHUP call hangup() but if thread B gets a SIGHUP, call reload()) 3/ Is it possible that each thread has a mask but that the handlers are shared? (by mask I mean a block mask, and an IGN mask at least.) If all threads block an interrupt, does the process then block it? (or does it still get to the UTS? Does the UTS have to block it fo the whole process explicitly if it doesn't want to see it? If a thread is designated to take an interrupt and it is blocked in the kernel, then the same rules apply as for a current process. however is the fact that a syscall is restartable, a process wide setting or a thread-specific setting? To make sense I think the flags SA_NOCLDSTOP, SA_NOCLDWAIT are definitly per process. The SA_RESTART could have arguments each way, and similarly SA_ONSTACK ans SA_NODEFER and SA_RESETHAND might also be per thread. Certainly If you are nominating a thread to take each kind of interrupt then it makes no sense to have per-thread values for these. but if the threads declare their own interest, then they could have their own masks etc. In that case it makes sense to deliver the signal to ALL threads that express an interest in a particular signal. (I could imagine for example that two threads may want to know about the SIGHUP that indicates a restart of a daemon). Similarly a SIGTSTP should be sent to all threads in the default case because you want the entire program to suspend, Similarly you want SIGCONT to continue all threads. What semantics are we looking for? Julian. -- +------------------------------------+ ______ _ __ | __--_|\ Julian Elischer | \ U \/ / hard at work in | / \ julian@elischer.org +------>x USA \ a very strange | ( OZ ) \___ ___ | country ! +- X_.---._/ presently in San Francisco \_/ \\ v To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message