Date: Tue, 11 Jan 2000 01:41:42 -0500 From: "Mikhail Evstiounin" <evstiounin@adelphia.net> To: "Laurence Berland" <stuyman@confusion.net>, <freebsd-questions@FreeBSD.ORG> Subject: Re: Giving a sighandler more information Message-ID: <010c01bf5bfe$f0ac2ea0$d3353018@evstiouninadelphia.net.pit.adelphia.net>
next in thread | raw e-mail | index | archive | help
-----Original Message-----
From: Laurence Berland <stuyman@confusion.net>
To: freebsd-questions@FreeBSD.ORG <freebsd-questions@FreeBSD.ORG>
Date: Monday, January 10, 2000 10:22 PM
Subject: Re: Giving a sighandler more information
>
>
>Oliver Fromme wrote:
>
>>
>> I'm afraid there is no other way than using global variables.
>> Be sure to declare them as ``volatile sig_atomic_t''.
>>
>What does this do as compared to declaring them normally?
>
about volatile - quote from "C++ programming Language, third edition" by
Bjarne Stroustrup:
-----------------------------
A volatile specifier is a hint to a compiler that an object may change its
value in ways
not specified by the language so that aggresive optimiation must be avoided.
For
example, a real time clock might be declared:
extern const volatile clock;
------------------------------
I don't think that for regular sighandler you need to declare a variable
with specifier
"volatile". Usually, if you are in handler, you can mask all other signals
which can
change your global variable and you don't need sig_atomic_t, but it's safe
to use it
(in my mind).
>--
>Laurence Berland, Stuyvesant HS Debate
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
>Windows 98: n.
> useless extension to a minor patch release for
> 32-bit extensions and a graphical shell for a
> 16-bit patch to an 8-bit operating system
> originally coded for a 4-bit microprocessor,
> written by a 2-bit company that can't stand for
> 1 bit of competition.
>http://stuy.debate.net
>icq #7434346 aol imer E1101
>The above email Copyright (C) 1999 Laurence Berland
>All rights reserved
>
>
>To Unsubscribe: send mail to majordomo@FreeBSD.org
>with "unsubscribe freebsd-questions" in the body of the message
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?010c01bf5bfe$f0ac2ea0$d3353018>
