Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.programming.threads > #980

Re: Using sigsetjmp/siglongjmp from multithreaded application

From Michael Podolsky <michael.podolsky.69@gmail.com>
Newsgroups comp.programming.threads
Subject Re: Using sigsetjmp/siglongjmp from multithreaded application
Date 2012-07-24 15:48 -0700
Organization http://groups.google.com
Message-ID <76eebccd-6e5a-46d6-8fe4-de236cb714c2@s1g2000vbj.googlegroups.com> (permalink)
References <be95cec9-1c3a-492a-a3bb-a58f409b648e@googlegroups.com> <500a55dc$0$6565$9b4e6d93@newsspool4.arcor-online.net> <117c6d30-1866-49a6-994f-6c987609dd90@m8g2000yqo.googlegroups.com> <500f0c85$0$6570$9b4e6d93@newsspool4.arcor-online.net>

Show all headers | View raw


On Jul 24, 4:58 pm, Marcel Müller <news.5.ma...@spamgourmet.com>
wrote:

> Oh, I wonder if semaphores are possible at all without CAS. AFAIK
> without CAS (or something similar) you are restricted to one CPU core.

I actually have one core. Even if you have many cores, you can
implement
the kernel and all the things around having a spinlock.

> Hmm, the basic instruction of a spin-lock is CAS, isn't it?

No it is not. For instance, for i86, "lock xchg" is enough. Just have
a zero value for non-locked spinlock and exchange it with 1 when you
attempt locking. Then analyze the old value. ))

Thanks,
Michael

Back to comp.programming.threads | Previous | NextPrevious in thread | Find similar


Thread

Using sigsetjmp/siglongjmp from multithreaded application Michael Podolsky <michael.podolsky.69@gmail.com> - 2012-07-20 14:42 -0700
  Re: Using sigsetjmp/siglongjmp from multithreaded application "Ersek, Laszlo" <lacos@caesar.elte.hu> - 2012-07-21 03:32 +0200
    Re: Using sigsetjmp/siglongjmp from multithreaded application "Ersek, Laszlo" <lacos@caesar.elte.hu> - 2012-07-21 04:05 +0200
      Re: Using sigsetjmp/siglongjmp from multithreaded application Michael Podolsky <michael.podolsky.69@gmail.com> - 2012-07-24 10:22 -0700
        Re: Using sigsetjmp/siglongjmp from multithreaded application "Ersek, Laszlo" <lacos@caesar.elte.hu> - 2012-07-25 03:28 +0200
  Re: Using sigsetjmp/siglongjmp from multithreaded application Marcel Müller <news.5.maazl@spamgourmet.com> - 2012-07-21 09:10 +0200
    Re: Using sigsetjmp/siglongjmp from multithreaded application Michael Podolsky <michael.podolsky.69@gmail.com> - 2012-07-24 10:34 -0700
      Re: Using sigsetjmp/siglongjmp from multithreaded application Marcel Müller <news.5.maazl@spamgourmet.com> - 2012-07-24 22:58 +0200
        Re: Using sigsetjmp/siglongjmp from multithreaded application Drazen Kacar <dave@fly.srk.fer.hr> - 2012-07-24 21:23 +0000
        Re: Using sigsetjmp/siglongjmp from multithreaded application Michael Podolsky <michael.podolsky.69@gmail.com> - 2012-07-24 15:48 -0700

csiph-web