X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=qemu-lock.h;h=65ca0843265452297de9645025248365662cd52d;hb=96df67d1c3928704cd76d0b2e76372ef18658e85;hp=26661baae33f192f20329f88ec80c7fc5fc1b7b6;hpb=e58ffeb322e2ef88cc23e9505366418bf793316d;p=qemu.git
diff --git a/qemu-lock.h b/qemu-lock.h
index 26661baae..65ca08432 100644
--- a/qemu-lock.h
+++ b/qemu-lock.h
@@ -12,8 +12,7 @@
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA
+ * License along with this library; if not, see
*/
/* Locking primitives. Most of this code should be redundant -
@@ -24,7 +23,7 @@
likely to release it soon. In environments where you have more threads
than physical CPUs (the extreme case being a single CPU host) a spinlock
simply wastes CPU until the OS decides to preempt it. */
-#if defined(USE_NPTL)
+#if defined(CONFIG_USE_NPTL)
#include
#define spin_lock pthread_mutex_lock
@@ -225,11 +224,6 @@ static inline void spin_unlock(spinlock_t *lock)
{
resetlock(lock);
}
-
-static inline int spin_trylock(spinlock_t *lock)
-{
- return !testandset(lock);
-}
#else
static inline void spin_lock(spinlock_t *lock)
{
@@ -238,11 +232,6 @@ static inline void spin_lock(spinlock_t *lock)
static inline void spin_unlock(spinlock_t *lock)
{
}
-
-static inline int spin_trylock(spinlock_t *lock)
-{
- return 1;
-}
#endif
#endif