Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!feeder.erje.net!news2.arglkargh.de!news.musoftware.de!wum.musoftware.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Rainer Weikusat Newsgroups: comp.programming.threads,comp.unix.programmer Subject: Re: Safe accesses of global arrays in signal handlers? Date: Thu, 27 Sep 2012 13:23:10 +0100 Lines: 14 Message-ID: <87y5jvzmc1.fsf@sapphire.mobileactivedefense.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: individual.net DViFk2WbSe6XgT+6QwmS4wW2mjvS/L8PiXXSjvqkxJPg/kyxfoDik6Q51xNpZT8Cw= Cancel-Lock: sha1:ALa6Z+IJ/47AEFf1QRpUVlvHSW8= sha1:pgkiJouUs/TVxGaR30EypmrCgoQ= User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) Xref: csiph.com comp.programming.threads:1097 comp.unix.programmer:3346 Markus Elfring writes: >> The recommended way to handle signals is to block all relevant async >> signals in all threads, then have a single thread which does nothing but >> poll signals using sigwaitinfo() then handle them (e.g. by notifying >> condition variables, appending information to a queue, etc). > > Do you know any other solutions which can work without such an initial signal > blockage like it is needed in the suggested approach for the handling of > real-time systems? Judgeing from you initial post, you're targetting a hypothetical computer without any known properties and the example code you provided is also incomplete (it lacks information about any actual data types). Consequently, no one can answer this question.