ext/oxt/spin_lock.hpp in passenger-2.2.15 vs ext/oxt/spin_lock.hpp in passenger-3.0.0.pre1
- old
+ new
@@ -1,10 +1,10 @@
/*
* OXT - OS eXtensions for boosT
* Provides important functionality necessary for writing robust server software.
*
- * Copyright (c) 2008 Phusion
+ * Copyright (c) 2010 Phusion
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
@@ -38,10 +38,12 @@
#define OXT_GCC_VERSION (__GNUC__ * 10000 \
+ __GNUC_MINOR__ * 100 \
+ __GNUC_PATCH_LEVEL__)
#endif
-#if (OXT_GCC_VERSION > 40100 && defined(__i386__)) || defined(IN_DOXYGEN)
+#if defined(__APPLE__)
+ #include "detail/spin_lock_darwin.hpp"
+#elif (OXT_GCC_VERSION > 40100 && (defined(__i386__) || defined(__x86_64__))) || defined(IN_DOXYGEN)
// GCC 4.0 doesn't support __sync instructions while GCC 4.2
// does. I'm not sure whether support for it started in 4.1 or
// 4.2, so the above version check may have to be changed later.
#include "detail/spin_lock_gcc_x86.hpp"
#elif !defined(WIN32) && !defined(OXT_NO_PTHREAD_SPINLOCKS)