Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| b7d624208b | |||
| 87b8e6b0ad | |||
| 321018cee0 | |||
| b0c046f8ac | |||
| f2861ddfb4 | |||
| 48f5481c65 | |||
| b65897d517 | |||
| 6c4e4b16ab |
@@ -67,7 +67,6 @@ extern "C" {
|
||||
#define QUOTES_STATUS_CLOSE(qu) ((qu) == FALSE)
|
||||
#define QUOTES_STATUS_OPEN(qu) ((qu) == TRUE)
|
||||
|
||||
typedef size_t bool;
|
||||
|
||||
typedef struct {
|
||||
unsigned int consoleID;
|
||||
|
||||
@@ -617,9 +617,6 @@ LITE_OS_SEC_TEXT LosTaskCB *OsGetFreeTaskCB(VOID)
|
||||
if (LOS_ListEmpty(&g_losFreeTask)) {
|
||||
SCHEDULER_UNLOCK(intSave);
|
||||
PRINT_ERR("No idle TCB in the system!\n");
|
||||
#ifdef LOSCFG_DEBUG_VERSION
|
||||
(VOID)OsShellCmdTskInfoGet(OS_ALL_TASK_MASK, NULL, OS_PROCESS_INFO_ALL);
|
||||
#endif
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
@@ -238,7 +238,7 @@ static void HiLogHeadInit(struct HiLogEntry *header, size_t len)
|
||||
|
||||
ret = clock_gettime(CLOCK_REALTIME, &now);
|
||||
if (ret != 0) {
|
||||
dprintf("In %s line %d,clock_gettime fail", __FUNCTION__, __LINE__);
|
||||
dprintf("In %s line %d,clock_gettime fail\n", __FUNCTION__, __LINE__);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -255,7 +255,9 @@ static void HiLogCoverOldLog(size_t bufLen)
|
||||
int retval;
|
||||
struct HiLogEntry header;
|
||||
size_t totalSize = bufLen + sizeof(struct HiLogEntry);
|
||||
int dropLogLines = 0;
|
||||
static int dropLogLines = 0;
|
||||
static int isLastTimeFull = 0;
|
||||
int isThisTimeFull = 0;
|
||||
|
||||
while (totalSize + g_hiLogDev.size > HILOG_BUFFER) {
|
||||
retval = HiLogReadRingBuffer((unsigned char *)&header, sizeof(header));
|
||||
@@ -264,11 +266,18 @@ static void HiLogCoverOldLog(size_t bufLen)
|
||||
}
|
||||
|
||||
dropLogLines++;
|
||||
isThisTimeFull = 1;
|
||||
isLastTimeFull = 1;
|
||||
HiLogBufferDec(sizeof(header));
|
||||
HiLogBufferDec(header.len);
|
||||
}
|
||||
if (dropLogLines > 0) {
|
||||
dprintf("hilog ringbuffer full, drop %d line(s) log", dropLogLines);
|
||||
if (isLastTimeFull == 1 && isThisTimeFull == 0) {
|
||||
/* so we can only print one log if hilog ring buffer is full in a short time */
|
||||
if (dropLogLines > 0) {
|
||||
dprintf("hilog ringbuffer full, drop %d line(s) log\n", dropLogLines);
|
||||
}
|
||||
isLastTimeFull = 0;
|
||||
dropLogLines = 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -330,7 +339,7 @@ static void HiLogDeviceInit(void)
|
||||
{
|
||||
g_hiLogDev.buffer = LOS_MemAlloc((VOID *)OS_SYS_MEM_ADDR, HILOG_BUFFER);
|
||||
if (g_hiLogDev.buffer == NULL) {
|
||||
dprintf("In %s line %d,LOS_MemAlloc fail", __FUNCTION__, __LINE__);
|
||||
dprintf("In %s line %d,LOS_MemAlloc fail\n", __FUNCTION__, __LINE__);
|
||||
}
|
||||
|
||||
init_waitqueue_head(&g_hiLogDev.wq);
|
||||
|
||||
@@ -119,7 +119,10 @@ static int GetFullpathNull(int fd, const char *path, char **filePath)
|
||||
if (ret < 0) {
|
||||
return -get_errno();
|
||||
}
|
||||
fullPath = file->f_path;
|
||||
fullPath = strdup(file->f_path);
|
||||
if (fullPath == NULL) {
|
||||
ret = -ENOMEM;
|
||||
}
|
||||
} else {
|
||||
ret = GetFullpath(fd, path, &fullPath);
|
||||
if (ret < 0) {
|
||||
|
||||
@@ -35,6 +35,7 @@ local_flags = [
|
||||
"-fbuiltin",
|
||||
"-Wno-narrowing",
|
||||
"-fPIE",
|
||||
"-Wno-error",
|
||||
]
|
||||
if (LOSCFG_USER_TEST_SMP == "enable" ||
|
||||
(LOSCFG_USER_TEST_SMP == "default" && board_name == "hispark_taurus")) {
|
||||
|
||||
Reference in New Issue
Block a user