[x265-commits] [x265] threadpool: more bitmasks must be sleepbitmap_t
Steve Borho
steve at borho.org
Sat Mar 21 07:29:34 CET 2015
details: http://hg.videolan.org/x265/rev/887ac5e457e0
branches:
changeset: 9847:887ac5e457e0
user: Steve Borho <steve at borho.org>
date: Sat Mar 21 01:27:07 2015 -0500
description:
threadpool: more bitmasks must be sleepbitmap_t
diffstat:
source/common/threadpool.cpp | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (39 lines):
diff -r 3955fd395063 -r 887ac5e457e0 source/common/threadpool.cpp
--- a/source/common/threadpool.cpp Fri Mar 20 16:42:19 2015 -0500
+++ b/source/common/threadpool.cpp Sat Mar 21 01:27:07 2015 -0500
@@ -97,7 +97,7 @@ void WorkerThread::threadMain()
m_pool.setCurrentThreadAffinity();
- uint32_t idBit = 1 << m_id;
+ sleepbitmap_t idBit = (sleepbitmap_t)1 << m_id;
m_curJobProvider = m_pool.m_jpTable[0];
m_bondMaster = NULL;
@@ -165,7 +165,7 @@ void JobProvider::tryWakeOne()
WorkerThread& worker = m_pool->m_workers[id];
if (worker.m_curJobProvider != this) /* poaching */
{
- uint32_t bit = 1 << id;
+ sleepbitmap_t bit = (sleepbitmap_t)1 << id;
SLEEPBITMAP_AND(&worker.m_curJobProvider->m_ownerBitmap, ~bit);
worker.m_curJobProvider = this;
SLEEPBITMAP_OR(&worker.m_curJobProvider->m_ownerBitmap, bit);
@@ -182,7 +182,7 @@ int ThreadPool::tryAcquireSleepingThread
{
SLEEPBITMAP_CTZ(id, masked);
- uint32_t bit = 1 << id;
+ sleepbitmap_t bit = (sleepbitmap_t)1 << id;
if (SLEEPBITMAP_AND(&m_sleepBitmap, ~bit) & bit)
return (int)id;
@@ -194,7 +194,7 @@ int ThreadPool::tryAcquireSleepingThread
{
SLEEPBITMAP_CTZ(id, masked);
- uint32_t bit = 1 << id;
+ sleepbitmap_t bit = (sleepbitmap_t)1 << id;
if (SLEEPBITMAP_AND(&m_sleepBitmap, ~bit) & bit)
return (int)id;
More information about the x265-commits
mailing list