Apache OpenOffice (AOO) Bugzilla – Issue 70157
osl[in|de]crementInterlockedCount(): don't use "lock" prefix on single processor machines
Last modified: 2006-11-16 14:25:58 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.
Fixed in hr39
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.
HDE: required autotests passed.
HDE: No conspicuousness in m191