wangbowen6
25bfd437fe
fs_epoll: support extend the epoll dynamicly.
...
1. epoll_ctl(EPOLL_CTL_ADD) support extend the epoll
events dynamicly;
2. enhance the epoll performance by moving some poll setup
and teardown process to the EPOLL_CTL_ADD/DEL/MOD;
Signed-off-by: wangbowen6 <wangbowen6@xiaomi.com>
2022-11-22 21:08:56 +08:00
Andrés Sánchez Pascual
9f029194e1
sys: boardctl: Add more reset causes to enum
...
Signed-off-by: Andrés Sánchez Pascual <tito97_sp@hotmail.com>
2022-11-13 21:26:31 -03:00
Michael Jung
b401db5ca4
prctl syscall is present unconditionally
...
I had a link problem regarding prctl while CONFIG_TASK_NAME_SIZE was
defined 0 and building in protected mode. Turns out in monolithic
build prctl is present no matter what CONFIG_TASK_NAME_SIZE, but in
protected mode build its only present if CONFIG_TASK_NAME_SIZE > 0.
So, bring protected mode build in sync with the monolithic one.
Signed-off-by: Michael Jung <michael.jung@secore.ly>
2022-11-09 01:21:16 +08:00
Xiang Xiao
19bded4738
fs: Remove the unused nx_pipe to prefer file_pipe for kernel
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-10-27 23:14:25 +02:00
Petro Karashchenko
2fd7e18a16
include/sys: fix style issues in queue.h
...
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-10-24 12:59:24 +08:00
chao an
205c8934a3
sched/msgq: add support of System V message queue
...
https://man.openbsd.org/msgget.2
Signed-off-by: chao an <anchao@xiaomi.com>
2022-10-22 12:58:11 +08:00
Xiang Xiao
6b31918b42
Remove the unnecessary cast for main_t, NULL and argv
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-10-18 08:51:45 +02:00
Xiang Xiao
78f6a02bc8
boards: Remove the duplicated prototype of CONFIG_INIT_ENTRYPOINT
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-10-16 19:02:44 +02:00
wangbowen6
e9ccab2db3
fs/poll: using callback mechanism to implement poll notification
...
Signed-off-by: wangbowen6 <wangbowen6@xiaomi.com>
2022-10-03 00:00:56 +08:00
wangbowen6
344c8be049
poll: add poll_notify() api and call it in all drivers
...
Signed-off-by: wangbowen6 <wangbowen6@xiaomi.com>
2022-09-26 12:06:32 +08:00
chao.an
9cb17841d8
net/sockopt: move BINDTODEVICE to socket level
...
rename the UDP_BINDTODEVICE to SO_BINDTODEVICE to follow the linux
style to be compatible with non-UDP protocol binding requirements
Signed-off-by: chao.an <anchao@xiaomi.com>
2022-08-25 17:56:52 +08:00
Duane Skelton
df4b8adacf
Added extern C {} wrapper consistent with other headers in include/sys
2022-08-16 12:04:01 +08:00
anjiahao
beb9144141
include:add sys/queue.h support form openbsd
...
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2022-08-16 12:03:45 +08:00
Jiuzhu Dong
aeec797511
syscall: remove directory syscall
...
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-08-10 13:33:08 +08:00
Xiang Xiao
fa2e1897ea
libc: Implement memfd on top of tmpfs
...
https://man7.org/linux/man-pages/man2/memfd_create.2.html
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-08-09 22:13:09 +03:00
Jiuzhu Dong
978530f5f6
fs/ioctl: add BLKSSZGET cmd to get block sector size
...
refer to:
https://sites.uclouvain.be/SystInfo/usr/include/sys/mount.h.html
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-07-22 09:07:57 +03:00
Jiuzhu Dong
008cb0d31a
sys/sysmacros.h: support sysmacros header
...
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-07-22 11:10:08 +08:00
anjiahao
2b65b46946
boardctl:add reset subreason restore factory
...
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2022-07-21 20:48:56 +08:00
Masayuki Ishikawa
d96c87f666
syscall: Add socketpair to syscall.csv
...
Summary:
- This commit adds socketpair to syscall.csv
Impact:
- None
Testing:
- Tested with adb (not merged net)
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2022-07-15 13:31:58 +08:00
Ville Juven
ba4277bb13
syscall: Remove exit() call gate
...
exit() is a userspace function, no need for call gate
2022-06-20 14:14:28 +03:00
Juha Niskanen
449cf4d076
getrandom: fix comment contradicting code
...
Signed-off-by: Juha Niskanen <juha.niskanen@haltian.com>
2022-06-15 11:18:04 -03:00
chao.an
644283c8ff
libc/ipc: add ftok(3) support
...
https://man.openbsd.org/ftok.3
Signed-off-by: chao.an <anchao@xiaomi.com>
2022-06-09 18:19:48 +03:00
chao.an
795884dbf1
sys/ipc: correct definition value of IPC_*
...
the definition of MSG_NOERROR and IPC_NOWAIT should not be aligned
------------------------------------------------------------------
MSGOP(2)
NAME
msgrcv, msgsnd - System V message queue operations
...
EXAMPLE
The program below demonstrates the use of msgsnd() and msgrcv().
...
if (msgrcv(qid, (void *) &msg, sizeof(msg.mtext), msgtype,
MSG_NOERROR | IPC_NOWAIT) == -1) {
...
Signed-off-by: chao.an <anchao@xiaomi.com>
2022-06-09 18:19:48 +03:00
Xiang Xiao
f1236da21c
fs: Make the binary(no process) mode as the default
...
POSIX require file system shouldn't enable the \r and \n conversion by default
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-06-07 20:22:26 +03:00
Ville Juven
a54c3d13f9
sched: Remove SCHED_ATEXIT / SCHED_ONEXIT
...
Remove the kernel side implementations altogether. These will be
replaced by user land implementations.
2022-05-25 15:28:43 +08:00
Ville Juven
5bcd1dbb64
sched: Remove task_restart in case of CONFIG_BUILD_KERNEL
...
Same treatment as task_delete, this is not usable in kernel build
either.
2022-05-12 22:08:19 +08:00
Ville Juven
b1d92159fa
sched: Remove task_delete in case of CONFIG_BUILD_KERNEL
...
Deleting a task from another task's context will not do, so shut
this gate down for BUILD_KERNEL. In this case if a task wants another
task to terminate, it must ask the other task to politely kill itself.
Note: kthreads still need this, also, the kernel can delete a task
without asking.
2022-05-12 03:27:25 +08:00
YAMAMOTO Takashi
ded4fd33c1
Implement preadv and pwritev
2022-04-28 13:40:25 +08:00
Xiang Xiao
55b5561fdb
sched/task: Implement execle and execve
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-04-22 10:40:31 +03:00
Ville Juven
d6ef4849a9
syscall: Add call gate for get_environ_ptr
...
Now that the environment strings are stored as an array of strings,
they can be passed from the application via char **environ, which
is really defined as a function call to get_environ_ptr().
This works as is for flat build, but protected mode and kernel mode
require a call gate, which is added here.
2022-04-21 18:38:37 +08:00
Jiuzhu Dong
d535943a69
fs/epoll: change type of eventset from uint8_t to uint32_t
...
to support EPOLLONESHOT and so on.
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-04-07 12:14:06 +08:00
田昕
4071f460b2
boards/boardctl:common boardctl to read reset cause.
...
Signed-off-by: 田昕 <tianxin7@xiaomi.com>
2022-03-30 09:59:10 +03:00
Xiang Xiao
c8ea7a95a3
libc: Implement getrandom on top of "/dev/[u]random"
...
https://man7.org/linux/man-pages/man2/getrandom.2.html
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-03-25 13:48:33 +02:00
Xiang Xiao
0f2f48f8ba
sys/type.h: Change pid_t from int16_t to int
...
to fix the following warning:
include/unistd.h:302:9: error: incompatible redeclaration of library function 'vfork' [-Werror,-Wincompatible-library-redeclaration]
pid_t vfork(void);
^
include/unistd.h:302:9: note: 'vfork' is a builtin with type 'int (void)'
and change 32768 to INT_MAX to match the type change
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-03-21 15:48:33 +02:00
chao.an
ea42981cc6
syscall/names: export the syscall name in STUB module
...
Signed-off-by: chao.an <anchao@xiaomi.com>
2022-03-14 21:37:53 +02:00
Xiang Xiao
44bd3212d4
arch: Remove SYS_RESERVED from Kconfg
...
let's arch define the correct value instead
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-02-27 22:54:13 +08:00
Huang Qi
e516c6247e
sched: Implement task local storage
...
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2022-02-23 22:05:02 +08:00
Xiang Xiao
47e38eb70f
binfmt: Decouple builtin from binfs file system
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-02-14 09:35:35 -03:00
Huang Qi
c0a0de97ce
Revert "libc: Call pthread_exit in user-space by up_pthread_exit"
...
This reverts commit f4a0b7aedd
.
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2022-02-09 21:21:43 +08:00
Xiang Xiao
0000e61da6
task: Always implement posix_spawnp as macro
...
Since there is no benefit to implement it as
function when CONFIG_LIBC_ENVPATH equals y
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-02-09 20:09:11 +08:00
Xiang Xiao
ab3b0d0162
sched: Implement sysinfo function
...
specify here:
https://man7.org/linux/man-pages/man2/sysinfo.2.html
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-02-08 10:27:38 +08:00
Xiang Xiao
77792a1598
sched: Define CONFIG_SMP_NCPUS to 1 in no SMP case
...
to simplify the SMP related code logic
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-01-20 23:21:21 +08:00
Jiuzhu Dong
6ec006ee02
socket: extend socket_storage for rpmsg_socket addrinfo
...
rexecd.c: In function 'rexecd_main':
rexecd.c:191:9: warning: array subscript 18 is outside array bounds of 'struct sockaddr_storage[1]' [-Warray-bounds]
191 | snprintf(((FAR struct sockaddr_rpmsg *)&addr)->rp_name,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
192 | RPMSG_SOCKET_NAME_SIZE, "%d", REXECD_PORT);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
rexecd.c:142:27: note: while referencing 'addr'
142 | struct sockaddr_storage addr;
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-01-05 02:05:49 +08:00
Xiang Xiao
902d2197b0
vnc: Decouple VNC server from NX graphic stack
...
since VNC server is very useful even without NX:
1.Replace nxgl_coord_t with fb_coord_t
2.Replace nxgl_rect_s with fb_area_s
3.Remove nxgl_xxx function call
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-01-03 11:19:32 +08:00
Xiang Xiao
86684105f9
serial: Move tcdrain implementation from drivers/serial to libc
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-12-29 08:11:08 -03:00
Xiang Xiao
dd942f0b04
sched/backtrace: Dump the complete stack regardless the depth
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-12-29 12:09:54 +08:00
Petro Karashchenko
d445282566
fs/vfs: Add file descriptor based timers support
...
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2021-12-20 04:00:20 -06:00
Xiang Xiao
c562263205
net: Move if_nametoindex and if_indextoname to libc
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-12-19 10:08:57 -06:00
Xiang Xiao
54e1c27e43
eventfd: Typedef eventfd_t to uint64_t on the supported platform
...
to compliant with Linux implementation as much as possible
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-12-19 01:41:11 -06:00
Xiang Xiao
f9c1117c88
eventfd: Remove the unused and private eventfd_get_minor
...
since it isn't defined by Linux kernel too
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-12-19 01:41:11 -06:00