History

Convert tabs to spaces before comments

Martin Storsjö committed 11 years ago

Commit 78e0ec61 parent 3052b7a57 files · +278 −278Browse files

Showing the changes to codec/common/src/WelsThreadLib.cpp (1 of 57 files). Show all

Unified · Split

codec/common/src/WelsThreadLib.cpp+7−7
@@ -299,12 +299,12 @@ WELS_THREAD_ERROR_CODE WelsEventOpen (WELS_EVENT* p_event, const char* event_ · 298 unmodified lines
299}299}
300WELS_THREAD_ERROR_CODE WelsEventClose (WELS_EVENT* event, const char* event_name) {300WELS_THREAD_ERROR_CODE WelsEventClose (WELS_EVENT* event, const char* event_name) {
301#ifdef __APPLE__301#ifdef __APPLE__
302 WELS_THREAD_ERROR_CODE err = sem_close (*event); // match with sem_open302 WELS_THREAD_ERROR_CODE err = sem_close (*event); // match with sem_open
303 if (event_name)303 if (event_name)
304 sem_unlink (event_name);304 sem_unlink (event_name);
305 return err;305 return err;
306#else306#else
307 WELS_THREAD_ERROR_CODE err = sem_destroy (*event); // match with sem_init307 WELS_THREAD_ERROR_CODE err = sem_destroy (*event); // match with sem_init
308 free (*event);308 free (*event);
309 return err;309 return err;
310#endif310#endif
@@ -322,7 +322,7 @@ WELS_THREAD_ERROR_CODE WelsEventSignal (WELS_EVENT* event) { · 11 unmodified lines
322}322}
323 323
324WELS_THREAD_ERROR_CODE WelsEventWait (WELS_EVENT* event) {324WELS_THREAD_ERROR_CODE WelsEventWait (WELS_EVENT* event) {
325 return sem_wait (*event); // blocking until signaled325 return sem_wait (*event); // blocking until signaled
326}326}
327 327
328WELS_THREAD_ERROR_CODE WelsEventWaitWithTimeOut (WELS_EVENT* event, uint32_t dwMilliseconds) {328WELS_THREAD_ERROR_CODE WelsEventWaitWithTimeOut (WELS_EVENT* event, uint32_t dwMilliseconds) {
@@ -360,7 +360,7 @@ WELS_THREAD_ERROR_CODE WelsEventWaitWithTimeOut (WELS_EVENT* event, uint32_t · 31 unmodified lines
360WELS_THREAD_ERROR_CODE WelsMultipleEventsWaitSingleBlocking (uint32_t nCount,360WELS_THREAD_ERROR_CODE WelsMultipleEventsWaitSingleBlocking (uint32_t nCount,
361 WELS_EVENT* event_list, WELS_EVENT* master_event) {361 WELS_EVENT* event_list, WELS_EVENT* master_event) {
362 uint32_t nIdx = 0;362 uint32_t nIdx = 0;
363 uint32_t uiAccessTime = 2; // 2 us once363 uint32_t uiAccessTime = 2; // 2 us once
364 364
365 if (nCount == 0)365 if (nCount == 0)
366 return WELS_THREAD_ERROR_WAIT_FAILED;366 return WELS_THREAD_ERROR_WAIT_FAILED;
@@ -378,7 +378,7 @@ WELS_THREAD_ERROR_CODE WelsMultipleEventsWaitSingleBlocking (uint32_t nCount, · 11 unmodified lines
378 }378 }
379 379
380 while (1) {380 while (1) {
381 nIdx = 0; // access each event by order381 nIdx = 0; // access each event by order
382 while (nIdx < nCount) {382 while (nIdx < nCount) {
383 int32_t err = 0;383 int32_t err = 0;
384 int32_t wait_count = 0;384 int32_t wait_count = 0;
@@ -399,7 +399,7 @@ WELS_THREAD_ERROR_CODE WelsMultipleEventsWaitSingleBlocking (uint32_t nCount, · 14 unmodified lines
399 // we do need access next event next time399 // we do need access next event next time
400 ++ nIdx;400 ++ nIdx;
401 }401 }
402 usleep (1); // switch to working threads402 usleep (1); // switch to working threads
403 if (master_event != NULL) {403 if (master_event != NULL) {
404 // A master event was used and was signalled, but none of the events in the404 // A master event was used and was signalled, but none of the events in the
405 // list was found to be signalled, thus wait a little more when rechecking405 // list was found to be signalled, thus wait a little more when rechecking
@@ -423,7 +423,7 @@ WELS_THREAD_ERROR_CODE WelsMultipleEventsWaitAllBlocking (uint32_t nCount, · 17 unmodified lines
423 return WELS_THREAD_ERROR_WAIT_FAILED;423 return WELS_THREAD_ERROR_WAIT_FAILED;
424 424
425 while (1) {425 while (1) {
426 nIdx = 0; // access each event by order426 nIdx = 0; // access each event by order
427 while (nIdx < nCount) {427 while (nIdx < nCount) {
428 const uint32_t kuiBitwiseFlag = (1 << nIdx);428 const uint32_t kuiBitwiseFlag = (1 << nIdx);
429 429

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