| $ gcc -c "-O3" -Wall -isystem include -D__NuttX__ -D__KERNEL__ -I fs -I sched fs/mmap/fs_mmap.c -o fs_mmap.o
| include/sys/mman.h: In function ‘mmap’:
| fs/mmap/fs_mmap.c:259:13: warning: ‘mapped’ may be used uninitialized in this function [-Wmaybe-uninitialized]
| 259 | FAR void *mapped;
| | ^~~~~~
Signed-off-by: chao an <anchao@xiaomi.com>
/usr/bin/ld: nuttx.rel: in function `mallinfo_task':
nuttx/mm/umm_heap/umm_mallinfo.c:67: undefined reference to `mm_mallinfo_task'
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
Restore some openocd information which I occassionally need.
This is a partial revert of:
```
commit 58a5e0744b
Author: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
Date: Mon Jul 26 21:43:42 2021 +0200
Documentation/esp32: Remove the rest of the OpenOCD text.
This information there is outdated and some of its content should be in
the board documentation and not the chip.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
```
rptun/rptun_ping.c: In function 'rptun_ping':
rptun/rptun_ping.c:171:20: error: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'time_t' {aka 'long long int'} [-Werror=format=]
171 | syslog(LOG_INFO, "avg: s %" PRIu32 ", ns %ld\n", ts.tv_sec, ts.tv_nsec);
| ^~~~~~~~~~ ~~~~~~~~~
| |
|
Signed-off-by: ligd <liguiding1@xiaomi.com>
in user space
Use the flag (COP_FLAG_UPDATE)structure member to mark
whether it is just input data.
like this:
can do manys times,just input data
....
cryp.ses = session.ses;
cryp.op = COP_ENCRYPT;
cryp.src = (caddr_t) s;
cryp.len = len;
cryp.flags = COP_FLAG_UPDATE;
cryp.dst = 0;
cryp.mac = (caddr_t) out;
cryp.iv = 0;
if (ioctl(cryptodev_fd, CIOCCRYPT, &cryp) == -1)
{
warn("CIOCCRYPT");
goto err;
}
can do manys times like frist...
then,the last time
Don't use any flay structure member to mark
this is last time,need get final result
....
cryp.ses = session.ses;
cryp.op = COP_ENCRYPT;
cryp.src = (caddr_t) s;
cryp.len = len;
cryp.flags = 0;
cryp.dst = 0;
cryp.mac = (caddr_t) out;
cryp.iv = 0;
if (ioctl(cryptodev_fd, CIOCCRYPT, &cryp) == -1)
{
warn("CIOCCRYPT");
goto err;
}
....
that will get last result.
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
There are many small memory block in NuttX system, eg: struct tcb_s,
struct inode, etc, and several disadvantages about them:
1.Their frequent allocate and free cause the system memory fragmentation.
2.Since each memory block has an overhead, the utilization of small memory
blocks is relatively low, which will cause memory waste.
So we can use mempool to alloc smallo block, to improve alloc speed
and utilization, to reduce fragmentation.
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
do simple copy to instead of memset and memcpy operation because
they have been instrumented, if you access the posion area,
the system will crash.
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
When invalidate address is not aligned with cache line,
must align address and flush the cache line.
Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>