!40 订正hilog、vm_syscall等文件中的typos
Merge pull request !40 from laokz/hilog
This commit is contained in:
commit
cefcb35aee
|
@ -71,7 +71,7 @@ STATIC VOID OsSemPendedTaskNamePrint(LosSemCB *semNode)
|
|||
PRINTK("Pended task list : ");
|
||||
for (i = 0; i < num; i++) {
|
||||
if (i == 0) {
|
||||
PRINTK("%s\n", nameArr[i]);
|
||||
PRINTK("\n%s", nameArr[i]);
|
||||
} else {
|
||||
PRINTK(", %s", nameArr[i]);
|
||||
}
|
||||
|
|
|
@ -83,7 +83,7 @@ LITE_OS_SEC_TEXT_MINOR VOID OsTaskMemClear(UINT32 taskID)
|
|||
}
|
||||
if (g_tskMemUsedInfo[taskID].memUsed != 0) {
|
||||
PRINT_WARN("mem used of task '%s' is:0x%x, not zero when task being deleted\n",
|
||||
OsCurrTaskGet()->taskName, g_tskMemUsedInfo[taskID].memUsed);
|
||||
OS_TCB_FROM_TID(taskID)->taskName, g_tskMemUsedInfo[taskID].memUsed);
|
||||
}
|
||||
g_tskMemUsedInfo[taskID].memUsed = 0;
|
||||
}
|
||||
|
@ -123,4 +123,4 @@ LITE_OS_SEC_TEXT_MINOR UINT32 OsTaskSlabUsage(UINT32 taskID)
|
|||
#if __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
#endif /* __cplusplus */
|
||||
#endif /* __cplusplus */
|
||||
|
|
|
@ -337,7 +337,7 @@ int OsTryShrinkMemory(size_t nPage)
|
|||
return nReclaimed;
|
||||
}
|
||||
#else
|
||||
int TryShrinkMemory(size_t nPage)
|
||||
int OsTryShrinkMemory(size_t nPage)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -179,11 +179,15 @@ VOID *LOS_DoBrk(VOID *addr)
|
|||
if (LOS_UnMMap(newBrk, (oldBrk - newBrk)) < 0) {
|
||||
return (void *)(UINTPTR)space->heapNow;
|
||||
}
|
||||
space->heapNow = (VADDR_T)(UINTPTR)addr;
|
||||
return addr;
|
||||
space->heapNow = (VADDR_T)(UINTPTR)alignAddr;
|
||||
return alignAddr;
|
||||
}
|
||||
|
||||
(VOID)LOS_MuxAcquire(&space->regionMux);
|
||||
if ((UINTPTR)alignAddr >= space->mapBase) {
|
||||
VM_ERR("Process heap memory space is insufficient");
|
||||
return (VOID *)-ENOMEM;
|
||||
}
|
||||
if (space->heapBase == space->heapNow) {
|
||||
region = LOS_RegionAlloc(space, space->heapBase, size,
|
||||
VM_MAP_REGION_FLAG_PERM_READ | VM_MAP_REGION_FLAG_PERM_WRITE |
|
||||
|
@ -197,11 +201,6 @@ VOID *LOS_DoBrk(VOID *addr)
|
|||
space->heap = region;
|
||||
}
|
||||
|
||||
if ((UINTPTR)alignAddr >= space->mapBase) {
|
||||
VM_ERR("Process heap memory space is insufficient");
|
||||
goto REGION_ALLOC_FAILED;
|
||||
}
|
||||
|
||||
space->heapNow = (VADDR_T)(UINTPTR)alignAddr;
|
||||
space->heap->range.size = size;
|
||||
ret = (VOID *)(UINTPTR)space->heapNow;
|
||||
|
|
|
@ -178,7 +178,7 @@ static ssize_t HiLogRead(FAR struct file *filep, char *buffer, size_t bufLen)
|
|||
}
|
||||
|
||||
if (bufLen < header.len + sizeof(header)) {
|
||||
dprintf("buffer too small,bufLen=%d, header.len=%d,%d\n", bufLen, header.len, header.hdrSize, header.nsec);
|
||||
dprintf("buffer too small,bufLen=%d, header.len=%d,%d\n", bufLen, header.len, header.hdrSize);
|
||||
retval = -ENOMEM;
|
||||
goto out;
|
||||
}
|
||||
|
@ -248,13 +248,14 @@ static void HiLogCoverOldLog(size_t bufLen)
|
|||
struct HiLogEntry header;
|
||||
size_t totalSize = bufLen + sizeof(struct HiLogEntry);
|
||||
|
||||
while (totalSize + g_hiLogDev.size >= HILOG_BUFFER) {
|
||||
while (totalSize + g_hiLogDev.size > HILOG_BUFFER) {
|
||||
retval = HiLogReadRingBuffer((unsigned char *)&header, sizeof(header));
|
||||
if (retval < 0) {
|
||||
break;
|
||||
}
|
||||
|
||||
HiLogBufferDec(sizeof(header) + header.len);
|
||||
HiLogBufferDec(sizeof(header));
|
||||
HiLogBufferDec(header.len);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -138,6 +138,7 @@ static UINT16 GetFreeVid(VOID)
|
|||
}
|
||||
|
||||
(void)memcpy_s(tmp, mapMaxNum * sizeof(UINT32), idMap->bitMap, (mapMaxNum - 1) * sizeof(UINT32));
|
||||
LOS_MemFree(m_aucSysMem0, idMap->bitMap);
|
||||
idMap->bitMap = tmp;
|
||||
idMap->mapCount = mapMaxNum;
|
||||
idMap->bitMap[i] = 1;
|
||||
|
|
|
@ -330,7 +330,7 @@ int SysClockNanoSleep(clockid_t clk, int flags, const struct timespec *req, stru
|
|||
{
|
||||
int ret;
|
||||
struct timespec sreq;
|
||||
struct timespec srem;
|
||||
struct timespec srem = {0};
|
||||
|
||||
if (!req || LOS_ArchCopyFromUser(&sreq, req, sizeof(struct timespec))) {
|
||||
errno = EFAULT;
|
||||
|
@ -354,7 +354,7 @@ int SysNanoSleep(const struct timespec *rqtp, struct timespec *rmtp)
|
|||
{
|
||||
int ret;
|
||||
struct timespec srqtp;
|
||||
struct timespec srmtp;
|
||||
struct timespec srmtp = {0};
|
||||
|
||||
if (!rqtp || LOS_ArchCopyFromUser(&srqtp, rqtp, sizeof(struct timespec))) {
|
||||
errno = EFAULT;
|
||||
|
@ -477,7 +477,7 @@ int SysClockNanoSleep64(clockid_t clk, int flags, const struct timespec64 *req,
|
|||
{
|
||||
int ret;
|
||||
struct timespec rq;
|
||||
struct timespec rm;
|
||||
struct timespec rm = {0};
|
||||
struct timespec64 sreq;
|
||||
struct timespec64 srem;
|
||||
|
||||
|
|
Loading…
Reference in New Issue