History

Unify ifdef conditions related to threading code

The two different variants of the threadlib basically are win32 and unix - use _WIN32 to check for this consistently, instead of occasionally using __GNUC__ to enable the unix codepath. (__GNUC__ is also defined on mingw, which still is a windows platform and should use the _WIN32 code.)

Martin Storsjö committed 12 years ago

Commit e0951591 parent c7d98a86 files · +19 −25Browse files

Showing the changes to codec/encoder/core/src/encoder_ext.cpp (1 of 6 files). Show all

Unified · Split

codec/encoder/core/src/encoder_ext.cpp+2−2
@@ -2171,7 +2171,7 @@ void WelsUninitEncoderExt (sWelsEncCtx** ppCtx) { · 2170 unmodified lines
21712171 WelsMultipleEventsWaitAllBlocking (iThreadCount, & (*ppCtx)->pSliceThreading->pFinSliceCodingEvent[0]);
21722172
21732173 }
2174−#elif defined(__GNUC__)
2174+#else
21752175 while (iThreadIdx < iThreadCount) {
21762176 int res = 0;
21772177 if ((*ppCtx)->pSliceThreading->pThreadHandles[iThreadIdx]) {
@@ -3300,7 +3300,7 @@ int32_t WelsEncoderEncodeExt (sWelsEncCtx* pCtx, SFrameBSInfo * pFbi, const SSou · 1122 unmodified lines
33003300 } else {
33013301 WelsSleep (1);
33023302 }
3303−#else//__GNUC__
3303+#else
33043304 // TODO for pthread platforms
33053305 // alternate implementation using blocking due non-blocking with timeout mode not support at wels thread lib, tune back if available
33063306 WelsMultipleEventsWaitAllBlocking (iNumThreadsRunning, &pCtx->pSliceThreading->pSliceCodedEvent[0]);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t