yinshengkai
da4e2671f5
trace: Add kernel tracepoint support
...
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-03-04 12:57:48 +08:00
Huang Qi
68384e9db4
drivers/serial: Echo input in driver layer
...
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2023-03-03 11:37:41 +08:00
Huang Qi
dfc70b1ddb
libc/stdio: Implement lib_get_stream
...
Use lib_get_stream() to fetch stdin/stdout/stderr,
since is more easy to works with other language by function call
than export native C structure memory layout.
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2023-03-02 09:56:57 +01:00
Xiang Xiao
92b2f1bd3d
fs: Undefine CONFIG_FS_LARGEFILE if compiler doesn't support long long
...
to simplify the large file check in many place
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-03-02 09:37:58 +01:00
Huang Qi
c4156ba4e5
lib.h: Remove forward declaration for streamlist
...
Since <nuttx/fs/fs.h> included already.
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2023-03-02 13:32:44 +08:00
yinshengkai
67461175fe
note: support note filtering at runtime
...
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-03-01 22:09:41 +08:00
huxiandong
266455f01c
mtd: Extend isbad and markbad func for mtd_dev_s
...
Signed-off-by: huxiandong <huxiandong@xiaomi.com>
2023-03-01 10:06:56 -03:00
Huang Qi
b96035885a
stdio: Implement simple buffered out stream for vdprintf
...
Improve performance for raw fd based printf like operation.
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2023-03-01 13:08:59 +09:00
YAMAMOTO Takashi
892ecb4e40
Make 64-bit time_t unsigned
...
* 32-bit time_t should be unsigned because otherwise it wraps too
soon. (in 2038)
* 64-bit time_t should be unsigned because it should be consistent
within NuttX.
* While signed time_t seems more popular among other OSes, the
consisitency within NuttX outweighs, IMO.
2023-02-27 23:55:52 +08:00
Xiang Xiao
2c5f653bfd
Remove the tail spaces from all files except Documentation
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-02-26 13:24:24 -08:00
wangbowen6
d77b53957c
sched/env: add tg_envc in task_group_s to avoid some loops in code
...
this commit optimize the env api speed
Signed-off-by: wangbowen6 <wangbowen6@xiaomi.com>
2023-02-25 23:10:37 +02:00
yinshengkai
f9f0ab8dc4
drivers: add note driver backend for recording scheduling information
...
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-02-25 18:39:27 +08:00
chenrun1
4f3c73fb45
libc/lib_bzero:Add bzero prototype.
...
Implement the bzero function as an alternative to macro expansion.
2023-02-25 08:07:07 +02:00
pengyiqiang
621bf54efc
drivers/video/fb: fix poll event lost
...
Signed-off-by: pengyiqiang <pengyiqiang@xiaomi.com>
2023-02-24 22:21:09 +08:00
lilei19
38f64f559d
change strcpy to strlcpy
...
Signed-off-by: lilei19 <lilei19@xiaomi.com>
2023-02-24 12:15:40 +08:00
chenrun1
e6227e1943
include/signal.h:Expanding SIGNAL to be consistent with Linux
2023-02-24 04:07:10 +08:00
chenrun1
5430de72f8
libc/lib_rawmemchr.c:Add rawmemchr methon.
2023-02-24 04:06:04 +08:00
yinshengkai
cb594a4c9c
include: add branch prediction for assert
...
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-02-23 22:35:33 +08:00
yinshengkai
ecdaeddfcd
include: add likely and unlikely for branch prediction
...
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-02-23 22:35:33 +08:00
yinshengkai
55ce5d0511
note: remove SCHED_INSTRUMENTATION_HIRES
...
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-02-23 22:30:07 +08:00
wangbowen6
7a4bd09e48
execinfo.h: include nuttx/sched.h instead sched.h
...
beacause _SCHED_GETTID is in nuttx/sched.h, when use dump_stack()
compile error log:
unqlite.c:51256: undefined reference to `_SCHED_GETTID'
Signed-off-by: wangbowen6 <wangbowen6@xiaomi.com>
2023-02-23 14:24:32 +08:00
Xiang Xiao
c54c9395a5
Revert "drivrs/mtd/filemtd.c: add block device MTD interface. Block MTD interface allows using block device directly as MTD instead of having to use file-system in between. NOTE that this provides the opposite capability of FTL which will let you use an MTD interface directly as a block device."
...
since filemtd can handle not only char device, but also block device.
This reverts commit 5ef548677a
.
2023-02-22 16:38:29 +08:00
chao an
ee1e1108a7
drivers/note: fix build break by note rename change
...
Regression by:
| commit ee24396d77
| Author: Xiang Xiao <xiaoxiang@xiaomi.com>
| Date: Tue Feb 14 01:11:48 2023 +0800
|
| drivers/note: Change DRIVER_NOTExxx to DRIVERS_NOTExxx
|
| follow other driver config style
|
| Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Signed-off-by: chao an <anchao@xiaomi.com>
2023-02-20 16:19:57 +08:00
Fotis Panagiotopoulos
9b4d784307
Improvements in sockets allocation.
2023-02-20 09:06:46 +08:00
Fotis Panagiotopoulos
f207072121
Improvements in usrsock connections allocation.
2023-02-20 09:06:46 +08:00
Fotis Panagiotopoulos
7f3591b9cc
Improvements in UDP connections allocation.
2023-02-20 09:06:46 +08:00
Fotis Panagiotopoulos
8f9dfe0be1
Improvements in TCP connections allocation.
2023-02-20 09:06:46 +08:00
Xiang Xiao
fa3e0faffc
fs: Map FD_SETSIZE to OPEN_MAX instead hardcoding 256
...
and change the default value of LIBC_OPEN_MAX to 256.
Here has more discussion:
https://www.mail-archive.com/dev@nuttx.apache.org/msg09095.html
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-02-19 19:17:20 +02:00
Oreh
9902f39d92
Add MTD loop driver (use filemtd)
2023-02-19 19:46:48 +08:00
Michal Lenc
333707e101
pwm: add PWM overwrite under CONFIG_PWM_OVERWRITE option
...
Generic drivers shoud not use architecture related config options like
CONFIG_SAMV7_PWM. This commit adds PWM pin overwrite under generic
configuration option CONFIG_PWM_OVERWRITE.
Now the overwrite can be used on other architectures as well or can be
completely disabled for SAMv7.
Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2023-02-19 00:16:41 +08:00
crafcat7
ad3def0e15
sys/resource.h:Added ru_maxrss type
2023-02-18 06:59:16 +02:00
TimJTi
f629b6063c
Correct inconsistencies
2023-02-18 11:03:38 +08:00
lilei19
77f6319268
sync ps/assert output
2023-02-17 23:35:44 +08:00
Ville Juven
2cdba4a0a2
task/task_cancelpt: Kill the child if it is not in a cancel point
...
Do not allow a deferred cancellation if the group is exiting, it is too
dangerous to allow the threads to execute any user space code after the
exit has started.
If the cancelled thread is not inside a cancellation point, just kill it
immediately via asynchronous cancellation. This will create far less
problems than allowing it to continue running user code.
2023-02-17 22:57:36 +08:00
Fotis Panagiotopoulos
85ceb7920e
Typo fixes.
2023-02-17 11:17:11 -03:00
crafcat7
33b22f51da
libc/lib_memcpy.c: Add mempcpy method.
...
Signed-off-by: crafcat7 <chenrun1@xiaomi.com>
2023-02-17 15:15:19 +08:00
Ville Juven
905cba3ee3
group/tg_info/argv: Make utility function to read argv as string
...
This creates a generic and safe way to read a process argument vector
as string from any context.
2023-02-17 01:27:16 +08:00
SPRESENSE
277e0b941a
include/sys/socket.h: Add SOCK_CTRL to socket type
...
SOCK_CTRL is added to provide special control over network drivers
and daemons. Currently, SOCK_DGRAM and SOCK_STREAM perform this control,
but these use socket resources. In the case of usersocket in particular,
this is a waste of the device's limited socket resources.
2023-02-16 12:13:01 +09:00
Xiang Xiao
6920fffb00
limits.h: Map _POSIX_[S]SIZE_M[AX|IN] to [U]LONG_M[AX|IN]
...
correct SIZE_MAX and SSIZE_MAX/SSIZE_MIN definition
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-02-15 17:47:51 +01:00
SPRESENSE
a9fb20039e
utsname: Expand the buffer for version information slightly
...
The version information basically uses 20 characters for date and time,
which is small enough to specify an arbitrary version string. Therefore,
increase the buffer a little.
2023-02-14 22:35:43 +08:00
Xiang Xiao
a3a1883787
fs: Don't guard rename with CONFIG_DISABLE_MOUNTPOINT
...
since the pseudo root fs support rename too
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-02-14 11:24:37 +08:00
Xiang Xiao
4009cb1970
fs: Don't guard ftruncate with CONFIG_DISABLE_MOUNTPOINT
...
since ftruncate depends on file_operations not mountpt_operations
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-02-14 11:24:37 +08:00
Xiang Xiao
a05f9aaa85
fs: Don't guard fsync with CONFIG_DISABLE_MOUNTPOINT
...
since the driver can also support fsync by implementing BIOC_FLUSH
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-02-14 11:24:37 +08:00
Xiang Xiao
dc2e9b8771
libc: Move memfd related stuff to sys/mman.h
...
follow the freebsd definition:
https://github.com/freebsd/freebsd-src/blob/master/sys/sys/mman.h#L207-L228
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-02-13 16:00:37 +01:00
Xiang Xiao
0ef073573a
net: Remove protocol argument from si_setup callback
...
since the implementor could get the same value from socket::s_proto
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-02-13 22:41:19 +08:00
anjiahao
4ced3c9642
mempool:fix bug when use MM_BACKTRACE
...
caculate blk address when mempool_multiple_free
have a bug. need a real blocksize to caulate the
memory address.
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2023-02-13 15:47:17 +08:00
Xiang Xiao
84059a949c
Revert "lib/math32.h: support LOG2_CEIL/LOG2_FLOOR function at compile time"
...
avoid the duplicated FLSxx and LOG2xx macro
This reverts commit 224f53fe02
.
2023-02-13 09:30:25 +02:00
Takeyoshi Kikuchi
6447064d81
netinet: in.h: add support for Nimlang compatibility.
...
Without this POSIX-compatible definition, support for nativesockets module in Nimlang is problematic.
.nimcache/(snip)@spure@snativesockets.nim.c: In function 'toInt__pureZnativesockets_69':
.nimcache/(snip): error: 'IPPROTO_ICMPV6' undeclared (first use in this function); did you mean 'IPPROTO_ICMP6'?
291 | result = IPPROTO_ICMPV6;
| ^~~~~~~~~~~~~~
| IPPROTO_ICMP6
Signed-off-by: Takeyoshi Kikuchi <kikuchi@centurysys.co.jp>
2023-02-13 09:28:52 +08:00
TimJTi
98e47a1770
FUSB302
...
Update fusb302.c
Update fusb302.c
2023-02-12 16:48:44 +08:00
David Sidrane
ac50b3a473
ioexpander/gpio:Add gpio_pin_register_byname
2023-02-11 18:31:40 +08:00