repositories
/
deb_x265.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Imported Upstream version 1.4+222+hg5f9f7194267b
[deb_x265.git]
/
source
/
common
/
threading.cpp
diff --git
a/source/common/threading.cpp
b/source/common/threading.cpp
index cb50eb25719653292a90f93ede2cdc41436a55fa..1d888aebeba7e9adb3d43b48ab95572684cd1f61 100644
(file)
--- a/
source/common/threading.cpp
+++ b/
source/common/threading.cpp
@@
-1,6
+1,4
@@
/*****************************************************************************
/*****************************************************************************
- * x265: threading class and intrinsics
- *****************************************************************************
* Copyright (C) 2013 x265 project
*
* Authors: Steve Borho <steve@borho.org>
* Copyright (C) 2013 x265 project
*
* Authors: Steve Borho <steve@borho.org>
@@
-48,21
+46,21
@@
bool Thread::start()
{
DWORD threadId;
{
DWORD threadId;
- th
is->th
read = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)ThreadShim, this, 0, &threadId);
+ thread = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)ThreadShim, this, 0, &threadId);
return threadId > 0;
}
void Thread::stop()
{
return threadId > 0;
}
void Thread::stop()
{
- if (th
is->th
read)
- WaitForSingleObject(th
is->th
read, INFINITE);
+ if (thread)
+ WaitForSingleObject(thread, INFINITE);
}
Thread::~Thread()
{
}
Thread::~Thread()
{
- if (th
is->th
read)
- CloseHandle(th
is->th
read);
+ if (thread)
+ CloseHandle(thread);
}
#else /* POSIX / pthreads */
}
#else /* POSIX / pthreads */
@@
-79,10
+77,9
@@
static void *ThreadShim(void *opaque)
bool Thread::start()
{
bool Thread::start()
{
- if (pthread_create(&th
is->th
read, NULL, ThreadShim, this))
+ if (pthread_create(&thread, NULL, ThreadShim, this))
{
{
- this->thread = 0;
-
+ thread = 0;
return false;
}
return false;
}
@@
-91,8
+88,8
@@
bool Thread::start()
void Thread::stop()
{
void Thread::stop()
{
- if (th
is->th
read)
- pthread_join(th
is->th
read, NULL);
+ if (thread)
+ pthread_join(thread, NULL);
}
Thread::~Thread() {}
}
Thread::~Thread() {}
@@
-101,6
+98,7
@@
Thread::~Thread() {}
Thread::Thread()
{
Thread::Thread()
{
- th
is->th
read = 0;
+ thread = 0;
}
}
+
}
}