emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: why "in_sighandler"?


From: YAMAMOTO Mitsuharu
Subject: Re: why "in_sighandler"?
Date: Tue, 22 Aug 2006 09:22:24 +0900
User-agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.6 (Marutamachi) APEL/10.6 Emacs/22.0.50 (sparc-sun-solaris2.8) MULE/5.0 (SAKAKI)

>>>>> On Mon, 21 Aug 2006 13:32:30 +0200, Jan Djärv <address@hidden> said:

> A signal interrupts all threads on a uni-processor machine.

I can hardly believe that.  Can you give some references saying so?

The same quote from IEEE Std 1003.1 again:

  All functions not in the above table are considered to be unsafe
  with respect to signals. In the presence of signals, all functions
  defined by this volume of IEEE Std 1003.1-2001 shall behave as
  defined when called from or interrupted by a signal-catching
  function, with a single exception: when a signal interrupts an
  unsafe function and the signal-catching function calls an unsafe
  function, the behavior is undefined.

  http://www.opengroup.org/onlinepubs/009695399/functions/xsh_chap02_04.html

It says "interrupted by a signal-catching function".  And the
signal-catching function is executed on the thread that the signal is
delivered to.  Given no other notes, it is natural to interpret that a
signal only interrupts the function in the thread that the
signal-catching function is executed.

"Multithreading in the Solaris Environment" says:

  An asynchronous signal interrupts the signalled thread at some
  arbitrary point in its execution

  http://www.sun.com/software/whitepapers/solaris9/multithread.pdf
  (P13)

                                     YAMAMOTO Mitsuharu
                                address@hidden




reply via email to

[Prev in Thread] Current Thread [Next in Thread]