Changeset View
Changeset View
Standalone View
Standalone View
src/lib/caching/kshareddatacache_p.h
Show First 20 Lines • Show All 160 Lines • ▼ Show 20 Line(s) | 131 | public: | |||
---|---|---|---|---|---|
161 | 161 | | |||
162 | void unlock() Q_DECL_OVERRIDE | 162 | void unlock() Q_DECL_OVERRIDE | ||
163 | { | 163 | { | ||
164 | m_spinlock.testAndSetRelease(1, 0); | 164 | m_spinlock.testAndSetRelease(1, 0); | ||
165 | } | 165 | } | ||
166 | 166 | | |||
167 | private: | 167 | private: | ||
168 | #ifdef Q_CC_GNU | 168 | #ifdef Q_CC_GNU | ||
169 | __attribute__((always_inline, gnu_inline, artificial)) | 169 | __attribute__((always_inline, gnu_inline | ||
170 | #if !defined(Q_CC_INTEL) && !defined(Q_CC_CLANG) | ||||
apol: No need to check twice for Q_CC_GNU | |||||
171 | , artificial | ||||
172 | #endif | ||||
173 | )) | ||||
170 | #endif | 174 | #endif | ||
171 | static inline void loopSpinPause() | 175 | static inline void loopSpinPause() | ||
172 | { | 176 | { | ||
173 | // TODO: Spinning might be better in multi-core systems... but that means | 177 | // TODO: Spinning might be better in multi-core systems... but that means | ||
174 | // figuring how to find numbers of CPUs in a cross-platform way. | 178 | // figuring how to find numbers of CPUs in a cross-platform way. | ||
175 | #ifdef _POSIX_PRIORITY_SCHEDULING | 179 | #ifdef _POSIX_PRIORITY_SCHEDULING | ||
176 | sched_yield(); | 180 | sched_yield(); | ||
177 | #else | 181 | #else | ||
▲ Show 20 Lines • Show All 321 Lines • Show Last 20 Lines |
No need to check twice for Q_CC_GNU