Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> latch spining... in user mode or kernel mode ?

latch spining... in user mode or kernel mode ?

From: danisment <danisment_at_yahoo.com>
Date: 16 Nov 2001 04:16:12 -0800
Message-ID: <2c78cfac.0111160416.2c1d0d5e@posting.google.com>


Hi,

I want to know how spinning is implemented on CPU . is it in kernel mode, or user mode ?

can we say following pseudo code is correct ?

private int i = 0;
while (i < _SPIN_COUNT)
  {
    if (test_and_set(latch) == true) return true; // latch is acquired here...

    i++;
  }

Danisment Gazi Unal
http://www.unal-bilisim.com Received on Fri Nov 16 2001 - 06:16:12 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US