Commit Graph

6104 Commits

Author SHA1 Message Date
dongjiuzhu1
14f8a6c2dd fs: support openat/fchmodat/mkfifoat/fstatat/...at api
Refs to:
https://linux.die.net/man/2/openat

Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2023-02-07 03:45:38 +08:00
Xiang Xiao
65a04c66a2 libc: Define _assert/__assert to avoid 3rd libary redefine them
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-02-06 15:04:30 +01:00
Stuart Ianna
a2a542562f fs: Implment link as a normal function instead macro
so "using ::link;" can pass the compiling. This change also
simplify the implementation of the hard link in the future.
2023-02-04 18:31:23 -03:00
chao an
02a9e76f73 misc/mutex: fix assertion if nxmutex_reset() before nxmutex_unlock()
sim/rpserver

NuttShell (NSH) NuttX-12.0.0
server> cu
_assert: Current Version: NuttX server 12.0.0 3ead669e7a-dirty Feb  2 2023 23:53:48 sim
_assert: Assertion failed : at file: libs/libc/misc/lib_mutex.c:303 task: cu 0x5662fff4

Signed-off-by: chao an <anchao@xiaomi.com>
2023-02-04 02:13:15 +08:00
haopengxiang
8845e6bb38 sensor: Report more gps info
Signed-off-by: haopengxiang <haopengxiang@xiaomi.com>
2023-02-02 22:49:27 +08:00
nietingting
2395c0f157 sensor: fix miwear sensor bb
Signed-off-by: nietingting <nietingting@xiaomi.com>
2023-02-02 22:49:27 +08:00
yangjiukui
1bcfb7af39 sensor: Enable ambient light sensor report ir strength
Signed-off-by: yangjiukui <yangjiukui@xiaomi.com>
2023-02-02 22:49:27 +08:00
xiatian6
70c6803db6 sensor: Add the calibration status flag
Signed-off-by: xiatian6 <xiatian6@xiaomi.com>
2023-02-02 22:49:27 +08:00
jinxudong
709da0fae4 fix: sensor: update hall data type
update hall data type to int32_t

Signed-off-by: jinxudong <jinxudong@xiaomi.com>
2023-02-02 22:49:27 +08:00
futerigele
7e7d4ab744 touch: Add ioctl to enable/disable gesture
Signed-off-by: futerigele <futerigele@xiaomi.com>
2023-02-02 22:48:00 +08:00
anjiahao
555c4fede3 spinlock: Move spinlock_init to public macros
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2023-02-02 22:47:34 +08:00
chao an
dff2192c75 misc/assert: remove const string from assert expression
Signed-off-by: chao an <anchao@xiaomi.com>
2023-02-02 15:08:47 +08:00
chao an
4c8d244fae sched/getpid: replace syscall getpid/tid/ppid() to kernel version
NuttX kernel should not use the syscall functions, especially after
enabling CONFIG_SCHED_INSTRUMENTATION_SYSCALL, all system functions
will be traced to backend, which will impact system performance.

Signed-off-by: chao an <anchao@xiaomi.com>
2023-02-02 10:33:01 +08:00
chao an
c24dc389e4 sched/task: add kernel interface nxsched_* gettid/getpid/getppid
add new interface to implement getpid()/gettid()/getppid() for kernel version.

Signed-off-by: chao an <anchao@xiaomi.com>
2023-02-02 10:33:01 +08:00
chao an
c9981036a5 nuttx/mutex: move mutex implement to libc
Signed-off-by: chao an <anchao@xiaomi.com>
2023-02-02 10:33:01 +08:00
Xiang Xiao
d92dc45a80 vfs: Suppoprt F_DUPFD_CLOEXEC and MSG_CMSG_CLOEXEC
https://pubs.opengroup.org/onlinepubs/9699919799/functions/fcntl.html
https://linux.die.net/man/2/recvmsg

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-02-02 01:00:10 +02:00
anjiahao
8a80c6ab28 assert:add a Kconfig option to limit binfile size
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2023-02-02 01:58:43 +08:00
Gustavo Henrique Nihei
e6b204f438 nuttx: Use MIN/MAX definitions from "sys/param.h"
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2023-02-01 23:47:44 +08:00
Gustavo Henrique Nihei
079e2b8c7c include: Add MIN/MAX definition to sys/param.h
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2023-02-01 23:47:44 +08:00
liangdongdong
1a22487abd Charge: Add cut-off current interface
Signed-off-by: liangdongdong<liangdongdong@xiaomi.com>
2023-02-01 09:51:31 -03:00
weizhifang
1d225aa7c3 Charge: Add shipmode into battery_ioctl.h
which is used to let battery charger enter into shipmode

Signed-off-by: weizhifang <weizhifang@xiaomi.com>
2023-02-01 09:51:31 -03:00
luojun1
8a5dc0ba12 Force sockaddr_storage to the desired alignment
First configure nuttx to support ipv4 and ipv6 dual stack,
then start two simulators and run Iperf ipv4 udp speed test,
unaligned access exception to sockaddr_in occours.

The root cause is that struct sockaddr_storage isn't set to
the desired alignment.

Signed-off-by: luojun1 <luojun1@xiaomi.com>
2023-02-01 09:46:21 -03:00
chao an
cdfca12ab6 sched/waitpid: rename nx_waitpid() to nxsched_waitpid()
Signed-off-by: chao an <anchao@xiaomi.com>
2023-02-01 20:40:41 +08:00
Xiang Xiao
9f027208d4 fs: Add model field to geometry and mtd_geometry_s
the model is very useful to track the device info

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-01-31 11:50:28 -03:00
Jukka Laitinen
4dd8187afe include/nuttx/clock.h: Change ?SEC2TICK macros to round up and fix nxstyle errors
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2023-01-31 22:42:29 +08:00
Xiang Xiao
3904fd775a sched: Remove the unused TCB_FLAG_SCHED_OTHER
after https://github.com/apache/nuttx/pull/8330

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-01-31 16:16:25 +02:00
Xiang Xiao
55679aec5f drivers/camera: Support the private data for imgsensor and imgdata
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-01-31 08:04:39 +01:00
Zhe Weng
d3dd349649 net: Implement shutdown() for usrsock
Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2023-01-31 11:15:01 +08:00
Zhe Weng
8819eeaf15 net: Implement shutdown() interface and tcp shutdown
Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2023-01-31 11:15:01 +08:00
lilei19
1d8af7e105 add holder for mutex
Signed-off-by: lilei19 <lilei19@xiaomi.com>
2023-01-31 12:08:05 +09:00
helei8
4b4004b874 drivers/mmcsd: Add MMC_IOC_CMD ioctl
Signed-off-by: helei8 <helei8@xiaomi.com>
2023-01-30 14:09:23 -03:00
Zhe Weng
be89bcc044 mm/iob: Support negative offset when copyin/out.
Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2023-01-31 00:39:15 +08:00
Xuxingliang
7c9b362705 sensors/ioctl: add common cmd for accelerators
Signed-off-by: Xuxingliang <xuxingliang@xiaomi.com>
2023-01-30 12:03:26 +08:00
anjiahao
3cfd8a350b sys/queue.h: remove CONFIG_ALLOW_MIT_COMPONENTS
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2023-01-30 11:26:04 +08:00
rajvinder kaur
2b30f17607 stm32h7: socket CAN error handling. 2023-01-30 11:22:49 +08:00
Oleksandr Oryshchenko
28f92e8238 [MTD/SmartFS] Extract register_driver call to own function 2023-01-30 11:09:40 +08:00
Xiang Xiao
631a8da1e2 sched: Map SCHED_OTHER to SCHED_FIFO or SCHED_RR
this behaviour is explicitly specified here:
https://pubs.opengroup.org/onlinepubs/009695399/functions/xsh_chap02_08.html
and map SCHED_NORMAL to SCHED_OTHER like Linux:
https://man7.org/linux/man-pages/man7/sched.7.html

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-01-30 03:01:03 +02:00
dongjiuzhu1
224f53fe02 lib/math32.h: support LOG2_CEIL/LOG2_FLOOR function at compile time
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2023-01-29 17:29:19 -03:00
genghuihui
63387a4a50 feature:add audio AUDIOIOC_SETPARAMTER ioctl command
add AUDIOIOC_SETPARAMTER iotcl command in include/nuttx/audio/audio.h

Signed-off-by: genghuihui <genghuihui@xiaomi.com>
2023-01-29 14:40:40 +08:00
zhanghongyu
e0c97ca742 dns: packed dns_header_s and dns_question_s
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2023-01-29 14:35:01 +08:00
dongjiuzhu1
cd3d3c272a net/route.h: add RTF_XX flags and rt_dev member
refs:
https://students.mimuw.edu.pl/SO/Linux/Kod/include/linux/route.h.html
https://nxmnpg.lemoda.net/9/rtentry

Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2023-01-29 14:29:52 +08:00
梁超众
5012195bde support ipv4 ToS and ipv6 TrafficClass
Signed-off-by: 梁超众 <liangchaozhong@xiaomi.com>
2023-01-29 13:43:44 +08:00
zhangchengqi
76bdfcc9d9 include/nuttx/timers/pwm: Add user provided argument in struct pwm_info_s
Here is a case how to use arg:
If application need do the ADC conversion as the same frequency and phase
of PWM, he can pass a semaphore as arg and then PWM driver will post the
semaphore in he start point of every period.

Signed-off-by: zhangchengqi <zhangchengqi@xiaomi.com>
2023-01-28 19:55:46 +02:00
xueyanhong
be90b8a385 motor: Add calibration and selftest
Signed-off-by: xueyanhong <xueyanhong@xiaomi.com>
2023-01-28 19:54:35 +02:00
xueyanhong
b88160084e motor: Add pattern control mode
Signed-off-by: xueyanhong <xueyanhong@xiaomi.com>
2023-01-28 19:54:35 +02:00
chao an
94db8a9414 wireless/ieee80211: update ieee80211 header
Signed-off-by: chao an <anchao@xiaomi.com>
2023-01-29 00:34:26 +08:00
dongjiuzhu1
f325ed7180 sys/epool.h: add EPOLLET (edge-triggered) flag to fix compile break
dbus/dbus/dbus-pollable-set-epoll.c:258:18: error: ‘EPOLLET’ undeclared
(first use in this function); did you mean ‘EPOLLERR’?
  258 |   event.events = EPOLLET;
      |                  ^~~~~~~
      |                  EPOLLERR

Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2023-01-27 15:30:55 -03:00
dongjiuzhu1
937bb44c45 signal: add marco _NSIG
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2023-01-27 13:21:49 -03:00
yintao
739be67744 sched: Add SIGFPE, SIGILL and SIGSEGV definition
Signed-off-by: yintao <yintao@xiaomi.com>
2023-01-27 13:21:49 -03:00
Ville Juven
42d0e356c2 arch/addrenv: Change group_addrenv_t to arch_addrenv_t
This is preparation for moving address environments out of the group
structure into the tcb.

Why move ? Because the group is destroyed very early in the exit phase,
but the MMU mappings are needed until the context switch to the next
process is complete. Otherwise the MMU will lose its mappings and the
system will crash.
2023-01-27 23:17:01 +08:00