Browse Source

Fixed issue bgfx#1050.

Branimir Karadžić 8 years ago
parent
commit
609a40d9ea
4 changed files with 4 additions and 5 deletions
  1. 1 1
      include/bx/inline/spscqueue.inl
  2. 1 2
      include/bx/macros.h
  3. 1 1
      include/bx/semaphore.h
  4. 1 1
      src/semaphore.cpp

+ 1 - 1
include/bx/inline/spscqueue.inl

@@ -150,7 +150,7 @@ namespace bx
 	template<typename Ty>
 	inline Ty* SpScBlockingUnboundedQueueT<Ty>::pop(int32_t _msecs)
 	{
-		return (Ty*)m_queue.pop();
+		return (Ty*)m_queue.pop(_msecs);
 	}
 
 #endif // BX_CONFIG_SUPPORTS_THREADING

+ 1 - 2
include/bx/macros.h

@@ -101,8 +101,7 @@
 #	error "Unknown BX_COMPILER_?"
 #endif
 
-// #define BX_STATIC_ASSERT(_condition, ...) static_assert(_condition, "" __VA_ARGS__)
-#define BX_STATIC_ASSERT(_condition, ...) typedef char BX_CONCATENATE(BX_STATIC_ASSERT_, __LINE__)[1][(_condition)] BX_ATTRIBUTE(unused)
+#define BX_STATIC_ASSERT(_condition, ...) static_assert(_condition, "" __VA_ARGS__)
 
 ///
 #define BX_ALIGN_DECL_16(_decl) BX_ALIGN_DECL(16, _decl)

+ 1 - 1
include/bx/semaphore.h

@@ -34,7 +34,7 @@ namespace bx
 		bool wait(int32_t _msecs = -1);
 
 	private:
-		BX_ALIGN_DECL(16, uint8_t) m_internal[64];
+		BX_ALIGN_DECL(16, uint8_t) m_internal[128];
 	};
 
 } // namespace bx

+ 1 - 1
src/semaphore.cpp

@@ -146,7 +146,7 @@ namespace bx
 		{
 			result = pthread_cond_timedwait(&si->m_cond, &si->m_mutex, &ts);
 		}
-#		endif // BX_PLATFORM_NACL || BX_PLATFORM_OSX
+#		endif // BX_PLATFORM_
 		bool ok = 0 == result;
 
 		if (ok)