mirror of
https://github.com/nyanmisaka/mpp.git
synced 2025-10-05 09:06:50 +08:00
[mpp_lock]: Add gcc atomic macro define
Change-Id: I3e94cc7be9a51f5d674a132c0a2e6f7afba61d34 Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
This commit is contained in:
@@ -25,6 +25,7 @@
|
||||
#include "mpp_env.h"
|
||||
#include "mpp_mem.h"
|
||||
#include "mpp_log.h"
|
||||
#include "mpp_lock.h"
|
||||
#include "mpp_time.h"
|
||||
#include "mpp_common.h"
|
||||
#include "mpp_buffer.h"
|
||||
@@ -403,7 +404,7 @@ void reader_stop(FileReader reader)
|
||||
{
|
||||
FileReaderImpl *impl = (FileReaderImpl*)reader;
|
||||
|
||||
if (__sync_bool_compare_and_swap(&impl->thd_stop, 0, 1))
|
||||
if (MPP_BOOL_CAS(&impl->thd_stop, 0, 1))
|
||||
pthread_join(impl->thd, NULL);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user