discussion forum



message

Name: Stephan Keil
eMail: Stephan.Keil@gmx.de
Date: June 16, 2003 at 06:41:05
Subject: Re: Hyperthreading and 'lock' prefix
In Reply To: Re: Hyperthreading and 'lock' prefix by
Oliver on June 15, 2003 at 08:47:23
Text: | I've developed a simple Win32-program that finds out this when it runs on
| a HT-enabled uniprocessor-machine:
| http://520032173347-0001.bei.t-online.de/HtLock.cpp
| The program starts two threads which keep modifying a single DWORD with
| an unlocked cmpxchg. One threads increments the lower 16 bits of this
| DWORD while the other increments the upper 16 bits. If one thread sees
| that his 16-bit-part is different from what it set previously to this
| value, the unlocked cmpxchg isn't HT-safe.

I have written a similar program (which uses inc/dec) which can
unerringly distinguish between a single processor and multiple
processors. Unfortunately I have currently no system with a HT processor.
Have you tried your program on a HT system?

Stephan




post a followup message
(Be nice... or be blocked. Be technical... or be erased.)

Name: optional link title:
eMail: optional link URL:
Subject: optional image URL:
  Insert line breaks by hand when only about one inch remains at the right side. Otherwise your message will be unreadable.
Text:
 

  Note: The above eMail form fields may look unaligned if you are using a browser other than Netscape Navigator version 3.0.



currently posted followup messages
(You may have to press the RELOAD button of your browser.)




main page