fix: status error
This commit is contained in:
parent
4b03091501
commit
936c7f93e5
|
@ -1323,13 +1323,13 @@ bool setReportThreadWait() {
|
||||||
bool setReportThreadRunning() {
|
bool setReportThreadRunning() {
|
||||||
CrashStatus status =
|
CrashStatus status =
|
||||||
atomic_val_compare_exchange_8(&gCrashBasicInfo.status, CRASH_LOG_WRITER_WAIT, CRASH_LOG_WRITER_RUNNING);
|
atomic_val_compare_exchange_8(&gCrashBasicInfo.status, CRASH_LOG_WRITER_WAIT, CRASH_LOG_WRITER_RUNNING);
|
||||||
if (status == CRASH_LOG_WRITER_RUNNING) {
|
if (status == CRASH_LOG_WRITER_WAIT) {
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
static void writeCrashLogToFileInNewThead() {
|
static void checkWriteCrashLogToFileInNewThead() {
|
||||||
if (setReportThreadRunning()) {
|
if (setReportThreadRunning()) {
|
||||||
char *pMsg = NULL;
|
char *pMsg = NULL;
|
||||||
const char *flags = "UTL FATAL ";
|
const char *flags = "UTL FATAL ";
|
||||||
|
@ -1351,7 +1351,7 @@ static void writeCrashLogToFileInNewThead() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void checkAndPrepareCrashInfo() {
|
void checkAndPrepareCrashInfo() {
|
||||||
return writeCrashLogToFileInNewThead();
|
return checkWriteCrashLogToFileInNewThead();
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t initCrashLogWriter() {
|
int32_t initCrashLogWriter() {
|
||||||
|
|
Loading…
Reference in New Issue