From owner-freebsd-net@FreeBSD.ORG Wed Oct 20 21:04:30 2004 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8DA8116A4CE for ; Wed, 20 Oct 2004 21:04:30 +0000 (GMT) Received: from mail.vicor-nb.com (bigwoop.vicor-nb.com [208.206.78.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7517843D1D for ; Wed, 20 Oct 2004 21:04:30 +0000 (GMT) (envelope-from julian@elischer.org) Received: from elischer.org (julian.vicor-nb.com [208.206.78.97]) by mail.vicor-nb.com (Postfix) with ESMTP id 5EA2C7A41E; Wed, 20 Oct 2004 14:04:30 -0700 (PDT) Message-ID: <4176D2DE.1020308@elischer.org> Date: Wed, 20 Oct 2004 14:04:30 -0700 From: Julian Elischer User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.3.1) Gecko/20030516 X-Accept-Language: en, hu MIME-Version: 1.0 To: Garrett Wollman References: <41757F72.A36AD263@freebsd.org> <74506.1098231543@monkeys.com> <200410201553.i9KFreme014552@khavrinen.lcs.mit.edu> In-Reply-To: <200410201553.i9KFreme014552@khavrinen.lcs.mit.edu> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit cc: freebsd-net@freebsd.org cc: "Ronald F. Guilmette" Subject: Re: aio_connect ? X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Oct 2004 21:04:30 -0000 Garrett Wollman wrote: >< said: > > > >>That's it for now... just aio_connect() and aio_accept(). If I think of >>something else, I'll let you know. >> >> > >[lots of Big Picture(R) stuff elided] > >This is certainly an interesting model of program design. However, >some caution is advised. Here are the most significant issues: > >- FreeBSD doesn't really support POSIX real-time signals, and I >don't know whether the AIO code implements the signal mechanism at >all. (I believe it's conditional in the specification on AIO && RTS.) > >- There's very little you can safely do in a signal handler other than >post a "complete" flag (of type volatile sig_atomic_t) somewhere, or >call a small number of POSIX-specified functions. > >- Even worse, the POSIX committee just discovered that the behavior of >asynchronous signals is (thanks to changes in C99) now almost >completely undefined. It is unlikely that this will be fixed any time >soon. > >You are, on the whole, much safer (with respect to POSIX's ability to >define the semantics of the operations you want) implementing your >asynchronous operations using threads. FreeBSD does not support the >RTS "start a new thread for signal delivery" mechanism, but with KSE >it should be fairly easy to dispatch a message to the UTS telling it >to do so. > KSE threading does this by default.. If you make N threads, you will see N +1 threads. one of which will be in ksesig state. > >-GAWollman > >_______________________________________________ >freebsd-net@freebsd.org mailing list >http://lists.freebsd.org/mailman/listinfo/freebsd-net >To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" > >