mirror of
https://github.com/bkaradzic/bx.git
synced 2026-10-16 22:05:45 +00:00
Added BX_CONFIG_SUPPORTS_THREADING.
This commit is contained in:
@@ -95,6 +95,7 @@ namespace bx
|
||||
Node* m_last;
|
||||
};
|
||||
|
||||
#if BX_CONFIG_SUPPORTS_THREADING
|
||||
template<typename Ty>
|
||||
class SpScUnboundedQueueMutex
|
||||
{
|
||||
@@ -147,13 +148,15 @@ namespace bx
|
||||
bx::LwMutex m_mutex;
|
||||
std::list<Ty*> m_queue;
|
||||
};
|
||||
#endif // BX_CONFIG_SUPPORTS_THREADING
|
||||
|
||||
#if BX_CONFIG_SPSCQUEUE_USE_MUTEX
|
||||
#if BX_CONFIG_SPSCQUEUE_USE_MUTEX && BX_CONFIG_SUPPORTS_THREADING
|
||||
# define SpScUnboundedQueue SpScUnboundedQueueMutex
|
||||
#else
|
||||
# define SpScUnboundedQueue SpScUnboundedQueueLf
|
||||
#endif // BX_CONFIG_SPSCQUEUE_USE_MUTEX
|
||||
|
||||
#if BX_CONFIG_SUPPORTS_THREADING
|
||||
template <typename Ty>
|
||||
class SpScBlockingUnboundedQueue
|
||||
{
|
||||
@@ -196,6 +199,7 @@ namespace bx
|
||||
Semaphore m_count;
|
||||
SpScUnboundedQueue<void> m_queue;
|
||||
};
|
||||
#endif // BX_CONFIG_SUPPORTS_THREADING
|
||||
|
||||
} // namespace bx
|
||||
|
||||
|
||||
Reference in New Issue
Block a user