and move common math funtions to math32.h:
div_round_up
div_round_closest
is_power_of_2
roundup_pow_of_two
rounddown_pow_of_two
Signed-off-by: lipengfei28 <lipengfei28@xiaomi.com>
Summary:
1.Modified the i_crefs from int16_t to atomic_int
2.Modified the i_crefs add, delete, read, and initialize interfaces to atomic operations
The purpose of this change is to avoid deadlock in cross-core scenarios, where A Core blocks B Core’s request for a write operation to A Core when A Core requests a read operation to B Core.
Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
This commit added ifdef macro to sigwork_s. When CONFIG_SIG_EVTHREAD is
not defined, the struct sigwork_s will be empty struct, which is helpful
to reduce bss size.
Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
the detailed warning info are:
CC: syslog/vsyslog.c "pthread/pthread_create.c", line 443: warning #1931-D: operand of sizeof is
not a type, variable, or dereferenced pointer expression
ptcb->cmn.timeslice = MSEC2TICK(CONFIG_RR_INTERVAL);
^
CC: dirent/lib_closedir.c "sched/sched_profil.c", line 81: warning #1931-D: operand of sizeof is not a
type, variable, or dereferenced pointer expression
wd_start(&prof->timer, PROFTICK, profil_timer_handler, arg);
^
"sched/sched_profil.c", line 142: warning #1931-D: operand of sizeof is not a
type, variable, or dereferenced pointer expression
wd_start(&prof->timer, PROFTICK, profil_timer_handler, (wdparm_t)prof);
^
CC: common/arm_modifyreg8.c "sched/sched_setscheduler.c", line 165: warning #1931-D: operand of sizeof is
not a type, variable, or dereferenced pointer expression
tcb->timeslice = MSEC2TICK(CONFIG_RR_INTERVAL);
^
CC: misc/lib_utsname.c "sched/sched_unlock.c", line 275: warning #1931-D: operand of sizeof is not a
type, variable, or dereferenced pointer expression
rtcb->timeslice = MSEC2TICK(CONFIG_RR_INTERVAL);
^
"sched/sched_roundrobin.c", line 119: warning #1931-D: operand of sizeof is
not a type, variable, or dereferenced pointer expression
tcb->timeslice = MSEC2TICK(CONFIG_RR_INTERVAL);
^
CC: armv7-m/arm_fpuconfig.c cxarm: Error: No files. Try -help.
CC: misc/lib_crc8ccitt.c cxarm: Error: No files. Try -help.
cxarm: Error: No files. Try -help.
CC: getprime_main.c cxarm: Error: No files. Try -help.
cxarm: Error: No files. Try -help.
CC: misc/lib_log2ceil.c cxarm: Error: No files. Try -help.
CC: task/task_start.c "task/task_setup.c", line 423: warning #1931-D: operand of sizeof is not a
type, variable, or dereferenced pointer expression
tcb->timeslice = MSEC2TICK(CONFIG_RR_INTERVAL);
^
Signed-off-by: guoshichao <guoshichao@xiaomi.com>
Supports the flush operation of the sensor.
The application can initiate a flush action through ioctl SNIOC_FLUSH
to trigger flush, and the call will be returned immediately.
Using SNIOC_GET_EVENTS to clear flush event,
However, the flush implementation is asynchronous, when all the flush
data is push to upper circbuffer, the POLLPRI event(FLUSH_COMPLETED)
will be reported.
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
When there is an actual physical sensor, the driver must implement the get info interface. The upper layer can obtain the actual physical sensor information through SNIOC_GET_INFO.
SNIOC_SET_INFO can only set the information of the local virtual sensor, which means it is bound to the local advertisement. Remote subscribers cannot set the information.
Usage:
struct sensor_device_info dev_info;
orb_ioctl(fd, SNIOC_GET_INFO, (unsigned long)(uintptr_t)&dev_info);
or:
ret = orb_set_info(fd, &dev_info);
ret = orb_get_info(fd, &dev_info);
Signed-off-by: likun17 <likun17@xiaomi.com>
"~/nuttx/include/nuttx/sched.h", line 631: warning #193-D:
zero used for undefined preprocessing identifier
"CONFIG_SCHED_CRITMONITOR_MAXTIME_THREAD"
#if CONFIG_SCHED_CRITMONITOR_MAXTIME_THREAD >= 0
^
"~/nuttx/include/nuttx/sched.h", line 637: warning #193-D:
zero used for undefined preprocessing identifier
"CONFIG_SCHED_CRITMONITOR_MAXTIME_PREEMPTION"
#if CONFIG_SCHED_CRITMONITOR_MAXTIME_PREEMPTION >= 0
^
"~/nuttx/include/nuttx/sched.h", line 642: warning #193-D:
zero used for undefined preprocessing identifier
"CONFIG_SCHED_CRITMONITOR_MAXTIME_CSECTION"
#if CONFIG_SCHED_CRITMONITOR_MAXTIME_CSECTION >= 0
^
"~/nuttx/include/nuttx/sched.h", line 789: warning #193-D:
zero used for undefined preprocessing identifier
"CONFIG_SCHED_CRITMONITOR_MAXTIME_PREEMPTION"
#if CONFIG_SCHED_CRITMONITOR_MAXTIME_PREEMPTION >= 0
^
"~/nuttx/include/nuttx/sched.h", line 793: warning #193-D:
zero used for undefined preprocessing identifier
"CONFIG_SCHED_CRITMONITOR_MAXTIME_CSECTION"
#if CONFIG_SCHED_CRITMONITOR_MAXTIME_CSECTION >= 0
^
"~/nuttx/include/nuttx/sched.h", line 631: warning #193-D:
zero used for undefined preprocessing identifier
"CONFIG_SCHED_CRITMONITOR_MAXTIME_THREAD"
#if CONFIG_SCHED_CRITMONITOR_MAXTIME_THREAD >= 0
^
"~/nuttx/include/nuttx/sched.h", line 637: warning #193-D:
zero used for undefined preprocessing identifier
"CONFIG_SCHED_CRITMONITOR_MAXTIME_PREEMPTION"
#if CONFIG_SCHED_CRITMONITOR_MAXTIME_PREEMPTION >= 0
^
"~/nuttx/include/nuttx/sched.h", line 642: warning #193-D:
zero used for undefined preprocessing identifier
"CONFIG_SCHED_CRITMONITOR_MAXTIME_CSECTION"
#if CONFIG_SCHED_CRITMONITOR_MAXTIME_CSECTION >= 0
^
"~/nuttx/include/nuttx/sched.h", line 789: warning #193-D:
zero used for undefined preprocessing identifier
"CONFIG_SCHED_CRITMONITOR_MAXTIME_PREEMPTION"
#if CONFIG_SCHED_CRITMONITOR_MAXTIME_PREEMPTION >= 0
^
"~/nuttx/include/nuttx/sched.h", line 793: warning #193-D:
zero used for undefined preprocessing identifier
"CONFIG_SCHED_CRITMONITOR_MAXTIME_CSECTION"
#if CONFIG_SCHED_CRITMONITOR_MAXTIME_CSECTION >= 0
Signed-off-by: yanghuatao <yanghuatao@xiaomi.com>
There will be a large performance loss after SCHED_CRITMONITOR is enabled.
By isolating thread running time-related functions, CPU load can be run with less overhead.
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
Signed-off-by: buxiasen <buxiasen@xiaomi.com>
Compilation error:
Kasan/book. c: In the function '__hwasanloaded 16_noabort':
Kasan/book. c: 76:5: Warning: 'builtin-turn_dedress' contains only 2 bytes of address
kasan_check_report(addr, size, false, return_address(0)); \
^
Kasan/book. c: 423:1: Note: in expansion of macro 'DEFINE-HWASAN_LOAD-STORE'
DEFINE_HWASAN_LOAD_STORE(16)
^
Kasan/book. c: In the function '__hwasan_store16_noabort':
Kasan/book. c: 80:5: Warning: 'builtin-turn_dedress' contains only 2 bytes of address
kasan_check_report(addr, size, true, return_address(0)); \
^
Kasan/book. c: 423:1: Note: in expansion of macro 'DEFINE-HWASAN_LOAD-STORE'
DEFINE_HWASAN_LOAD_STORE(16)
^
CC: hello. min c hello. min c: In the function 'hello. min':
Hello. main. c: 39:3: Warning: 'builtin-turn_dedress' contains only 2 bytes of address
printf("Hello, World: %p!!\n", return_address(0));
Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
1. Use always_inline_function instead of inline, inline does not take effect
2. Activate Kasan acceleration by 1/7
Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
Summary:
1.Added msync callback in struct mm_map_entry_s
2.Added msync API in fs_msync.c
3.Added static msync_rammap for rammap.
Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
detail: Add g_ prefix to can_dlc_to_len and len_to_can_dlc to
follow NuttX coding style conventions for global symbols,
improving code readability and maintainability.
Signed-off-by: zhaohaiyang1 <zhaohaiyang1@xiaomi.com>
This patch added support for SIGEV_THREAD_ID and sigev_notify_thread_id.
Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
Signed-off-by: ligd <liguiding1@xiaomi.com>
Return 1 to indicate the work was not cancelled.
Because it is currently being processed by work thread,
but wait for it to finish.
Signed-off-by: ligd <liguiding1@xiaomi.com>
The new API is defined by GNU and implemented in other LibCs, such as
Musl.
This also modifies API of obstack_blank_fast and obstack_1grow_fast.
These are defined as returning void and thus return value here is
incompatibility with other implementations.