Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!newsfeed.CARNet.hr!.POSTED!not-for-mail From: Drazen Kacar Newsgroups: comp.programming.threads Subject: Re: Using sigsetjmp/siglongjmp from multithreaded application Date: Tue, 24 Jul 2012 21:23:29 +0000 (UTC) Organization: =?iso-8859-2?Q?=C8ardak?= ni na nebu, ni na zemlji Lines: 21 Message-ID: References: <500a55dc$0$6565$9b4e6d93@newsspool4.arcor-online.net> <117c6d30-1866-49a6-994f-6c987609dd90@m8g2000yqo.googlegroups.com> <500f0c85$0$6570$9b4e6d93@newsspool4.arcor-online.net> NNTP-Posting-Host: 161.53.74.66 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-2 Content-Transfer-Encoding: 8bit X-Trace: news1.carnet.hr 1343165009 28986 161.53.74.66 (24 Jul 2012 21:23:29 GMT) X-Complaints-To: abuse@CARNet.hr NNTP-Posting-Date: Tue, 24 Jul 2012 21:23:29 +0000 (UTC) User-Agent: slrn/pre1.0.0-18 (Linux) X-Face: 'UIE}WabGB0+U>p-#(hp<_+AD2{H],=qR*jHfm$/e]l0(kU3oOYc5lqG6gg>[\h^IOc{' siD6#!T&loIShgmYHz3#+*D38:|`~\BE,(W~Ol9BDfDwk'lKJ;Z{sY8E9(ME.E]'wvNO`$n#,;9Z` tOFcW/nHZq!BOSrM>V?C<5DTw=<${c{M2V+|)0jSUl&!+8%8nI BF(u:E>SZWM^e X-Attribution: Dave Mail-Copies-To: never Xref: csiph.com comp.programming.threads:979 Marcel Müller wrote: > On 24.07.2012 19:34, Michael Podolsky wrote: > >> Secondly you could use lock free data structures. > > > > Yep. I thought of it generally. Yet it looks a little overkill for > > such a task, and, besides, I have no CAS on my platform. > > Oh, I wonder if semaphores are possible at all without CAS. AFAIK > without CAS (or something similar) you are restricted to one CPU core. There are software algorithms for mutual exclusion which don't rely on read-modify-write instructions, like Dekker's or Lamport's algorithms. Dekker's doesn't work with non-sequential memory model, but processors which reorder memory access usually have read-modify-write instructions, so it's not an issue. -- .-. .-. Yes, I am an agent of Satan, but my duties are largely (_ \ / _) ceremonial. | | dave@fly.srk.fer.hr