Issue 70157 - osl[in|de]crementInterlockedCount(): don't use "lock" prefix on single processor machines
Summary: osl[in|de]crementInterlockedCount(): don't use "lock" prefix on single proces...
Status: CLOSED FIXED
Alias: None
Product: porting
Classification: Code
Component: code (show other issues)
Version: current
Hardware: PC Windows, all
: P3 Trivial (vote)
Target Milestone: OOo 2.1
Assignee: helge.delfs
QA Contact: issues@porting
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-10-06 14:43 UTC by jens-heiner.rechtien
Modified: 2006-11-16 14:25 UTC (History)
2 users (show)

See Also:
Issue Type: ENHANCEMENT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description jens-heiner.rechtien 2006-10-06 14:43:15 UTC
The sal functions osl[in|de]crementInterlockedCount() use atomic operations to
increment and decrement a counter. On all x86 platforms this is done with a
"lock xadd" prefix. "Lock" means here to lock the bus, a quite expensive
operation on pre HyperThreading Intel processors and quite uncessary if there is
only one non HT, single core processor in the system (xadd with prefix is around
8 times slower than without prefix). The new implementation checks if we are on
a single processor single core non HT machine and leaves the "lock" prefix out
in this case.
Comment 1 jens-heiner.rechtien 2006-10-11 13:44:43 UTC
Fixed in hr39
Comment 2 jens-heiner.rechtien 2006-10-11 15:18:25 UTC
Please verify by automated tests on Windows. This should preferably be done on a
multiprocessor machine or one with a P IV processor with Hyper Threading.
Comment 3 helge.delfs 2006-10-13 09:29:42 UTC
HDE: required autotests passed.
Comment 4 helge.delfs 2006-11-16 14:25:58 UTC
HDE: No conspicuousness in m191