Commit graph

39529 commits

Author SHA1 Message Date
ligd
49389e2695 mm/net/sched: fix warnings
Change-Id: I92db0e2cb7ff9e63eef8086a7cc084f67045d69c
Signed-off-by: ligd <liguiding1@xiaomi.com>
2021-03-03 19:26:43 +08:00
mage1
15fc1cb23f mm: add kconfig option to control the memory manger strategy choice.
since will will porvide more the one  strategy in future.

Change-Id: I73b900c6571f9b71b8239dd72006bdd0a68ee64d
2021-03-03 15:04:27 +08:00
chao.an
60f7f71e6c net/tcp: fix invaild application preload
Change-Id: Ifebe4c2715ccfc0e11d8b45792d51912f110d92e
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-03-03 00:25:35 +08:00
mage1
465f98384b mm: Move mm_heap_s related stuff to private header file
since it will improve the modularity and reduce the inforamtion explosion

Change-Id: I085b36adb38993a979625a1f4c252d364a15afa1
2021-03-02 22:21:46 +08:00
Peter Bee
a2a31c735e net/socket: move si_send/recv into sendmsg/recvmsg
MIRTOS-272

Implement si_send/sendto/recvfrom with si_sendmsg/recvmsg, instead of
the other way round.

Change-Id: I7b858556996e0862df22807a6edf6d7cfe6518fc
Signed-off-by: Peter Bee <bijunda1@xiaomi.com>
2021-03-02 17:33:01 +08:00
chao.an
800421e231 net/tcp: cache the drop packet to avoid retransmit
Change-Id: Ia27ed17a7708df8481ac96d9a3a870b6ccef4d24
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-03-02 10:12:56 +08:00
chao.an
608f380aee binfmt/Makefile: remove the specified prefix from target variables
Change-Id: Ic79368950a543ab5c39e286e4b5d062529a83a3c
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-03-01 21:11:16 +08:00
chao.an
0a1ba622b1 make/clean: clean the OBJ directly if declare in subdirectory
Change-Id: I9b78e83f571f9e427a49af04e0b718d941f003e4
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-03-01 21:10:53 +08:00
chao.an
9c946e2af6 make/archive: replace the dependency to preprequisite list
Change-Id: Id63f3cd32906461a54cb016ef8078d4d922845e2
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-03-01 21:10:15 +08:00
chao.an
bbdf87247f tools/mkdeps: generate the full path dependencies
Change-Id: I60ff42c40ea8071ac86e6e06aafeb2a9f4ec3698
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-03-01 21:09:49 +08:00
chao.an
3a658ee32c mm/circbuf: fix compile warning
circbuf/circbuf.c:133:14: warning: 'len' may be used uninitialized in this function [-Wmaybe-uninitialized]
  133 |   circ->head = len;
      |   ~~~~~~~~~~~^~~~~
circbuf/circbuf.c:106:10: note: 'len' was declared here
  106 |   size_t len;
      |          ^~~

Change-Id: I60e42b88e98838f5654d84b70f109a4df5a7ff26
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-03-01 16:14:25 +08:00
ligd
43742ca827 debug tools: add heap & stack check in idle thread
N/A

Change-Id: Iba6f5cdffb1336697096c71fca86c9ece584225f
Signed-off-by: ligd <liguiding1@xiaomi.com>
2021-03-01 10:41:09 +08:00
chao.an
87de0294a0 mm/iob: add iob_free_queue() interface
Change-Id: Ic06d9725e6b7ff4aac554f735d4c88bdec519d18
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-02-26 21:58:25 +08:00
chao.an
af341ee4fc mm/iob: rename the iob_free_queue() to iob_destroy_queue()
make the semantics more precise

Change-Id: Ie3ac87d6a478cdd65e9129e708afc833f0a124b0
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-02-26 20:38:44 +08:00
liuhaitao
63829c6895 Revert "net/socket: delete config CONFIG_NSOCKET_DESCRIPTORS"
This reverts commit a0be36d9c2.
2021-02-26 10:24:26 +08:00
ligd
df76063a35 Revert "net: unify socket info file descriptor"
This reverts commit 27b332283e.
2021-02-26 10:21:02 +08:00
ligd
a25ad34d82 Revert "mm/umm_heap: move memory-related api from libc/stdlib to umm"
This reverts commit 187b6c0742.
2021-02-26 10:20:08 +08:00
Jiuzhu Dong
187b6c0742 mm/umm_heap: move memory-related api from libc/stdlib to umm
N/A

Change-Id: Ie10393fc8630016dbca27f3c327431fad3b375fb
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-02-25 16:54:05 +08:00
Jiuzhu Dong
27b332283e net: unify socket info file descriptor
N/A

Change-Id: I9bcd21564e6c97d3edbb38aed1748c114160ea36
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-02-25 16:53:58 +08:00
Jiuzhu Dong
a0be36d9c2 net/socket: delete config CONFIG_NSOCKET_DESCRIPTORS
N/A

Change-Id: I7d10ec460c351e4fbcdc19b3a8284dcb77073722
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-02-25 16:53:55 +08:00
Peter Bee
ad5c34bde1 boards/sim: add delay to allow kvdbd fully startup
N/A

This allows some persist.*.disable properties to work correctly.

Change-Id: Ie81f0d6da04b998175475be56b694768f8b2235b
Signed-off-by: Peter Bee <bijunda1@xiaomi.com>
2021-02-25 11:54:02 +08:00
Xiang Xiao
20a74de9a8 fs/lfs: lfs_file_sync() when littlefs_open
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Signed-off-by: ligd <liguiding1@xiaomi.com>
Change-Id: I8935f7aee414580174141f4b114b5faf03ffafd5
2021-02-24 18:35:53 +08:00
Xiang Xiao
ff25503236 fs/lfs: Remove semret temporary variable
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I2df74c7d42fac25c4b010e6b10c2af36f555c480
2021-02-24 18:31:11 +08:00
guowei15
e2dce4e2ec arm/setjmp.h:add c++ support
N/A

Change-Id: I619cc15570adeff10f3a9b69bf9a3cff83e625c1
Signed-off-by: guowei15 <guowei15@xiaomi.com>
2021-02-24 16:41:57 +08:00
guowei15
dee30cae27 arm/setjmp.h:fix return_function undefined
N/A

Change-Id: Ic72fd8053b88cf349922154696fd8c3163cd850a
Signed-off-by: guowei15 <guowei15@xiaomi.com>
2021-02-24 10:11:19 +08:00
Xiang Xiao
4b3b32478a pthread: Change the default name from <pthread> to <0xyyyyyyyy>
since it's very easy to identify thread through entry pointer

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-02-22 16:07:34 +08:00
Xiang Xiao
f2f39c7e44 fs/procfs: Avoid the duplicated 0x prefix in pthread cmdline
like this:
... <pthread> 0x0x341de68c
 by removing "0x" from format string

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-02-22 16:05:26 +08:00
Peter Bee
1cd87d6f97 fs/mmap: add fd validation to correct errno
MIRTOS-111

Errors EBADF correctly. This is only a quick fix, and a lot needs
to be done with mmap().

Change-Id: Ica88360972447fbdd7c6af3bf76d8eeba4747db2
Signed-off-by: Peter Bee <bijunda1@xiaomi.com>
2021-02-22 15:40:20 +08:00
chao.an
a77d103263 net/arp: add timeout to avoid infinite send wait
add timeout to avoid infinite send wait if the network device is unreachable

Change-Id: I839a5fe1fb64b7d6eee7ad28d93d2b27f067b915
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-02-22 10:37:58 +08:00
Peter Bee
3cc8acd454 boards/sim: add kvdb server start on boot
N/A

Works with kvdb server version

Change-Id: I763b39e80795201adb0138f3287e63c056d859fe
Signed-off-by: Peter Bee <bijunda1@xiaomi.com>
2021-02-20 16:11:37 +08:00
Jiuzhu Dong
d1f3707798 signal: set SIGRTMIN to SIGUSR1 because signo 0 don't catch.
MIRTOS-434

Change-Id: I600fed48d25e19c229aac899508b86ddfebb24f6
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-02-19 16:51:08 +08:00
Jiuzhu Dong
fc2b0eb037 multi-uorb test config
N/A

Change-Id: Ie43cbe28d87e9482dcd55ef23585b7865a095b4c
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-02-18 09:42:08 +08:00
Xiang Xiao
897270bcbf net/local: Add an option to specify the prefix of named pipe
N/A

to avoid the user create socket under the real filesystem
which isn't supported by nuttx VFS yet.

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Ib04c90e9c3c5a215bfda65515498d81e5f834895
2021-02-17 19:29:56 +08:00
Jiuzhu Dong
de92bc7fad driver/sensor: gets the capacity of the hardware fifo
N/A

to hold the number of events

Change-Id: I58a9ad07913c7b189e1fd229ab22e91e220e01f6
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-02-09 11:51:09 +08:00
Jiuzhu Dong
94f6836d14 driver/sensor: Fetch(with O_NONBLOCK) will directly return.
N/A

when sensor is disable.

Change-Id: I02c02aa447ee0b0d681082b4209ecd36e10f2547
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-02-09 11:50:50 +08:00
Jiuzhu Dong
f44a5eeb4a driver/sensor: replace lower->buffer_size with lower->buffer_number
N/A

more efficient

Change-Id: I0823b10248caf75e4dd6a5086ad230ba4a7298f6
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-02-09 11:50:30 +08:00
丁欣童
96f1076140 Perfect fakesensor driver.
N/A

1.Add semaphore to wake up thread.
2.Unified use container_of.
3.Modify interval unit in order to keep pace
  with set_interval() function.

Change-Id: I93ac931e9d004c98d3a5100d26fbdb97f420a9d3
Signed-off-by: 丁欣童 <dingxintong@xiaomi.com>
2021-02-08 14:10:29 +08:00
chao.an
2898b4a71a net/sendmsg: workaround to support multi-iov case
Change-Id: I66e538c2f3a13db2f84eec9a3f364cf21902c5d1
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-02-08 10:51:43 +08:00
chao.an
65b95eea6f net/tcp: dynamic calculation of available iobs
Change-Id: I4b0d01204af74f1692ae061914617dbb4e8698c0
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-02-08 10:47:43 +08:00
chao.an
6f39a980f5 mm/iob: add iob_get_queue_count() helper
Change-Id: I73cc9bc9c51b25c828cefef917df12d202ffa414
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-02-08 09:50:32 +08:00
丁欣童
4fa2a5b4d1 Add fakesensor driver.
N/A

This driver can read data from csv file.

Change-Id: Ibf7af0553441b5c05a4a4f3e6ed4786472771be1
Signed-off-by: 丁欣童 <dingxintong@xiaomi.com>
2021-02-07 17:17:23 +08:00
Jiuzhu Dong
9674f89d56 libc/valloc: support valloc
MIRTOS-424

Change-Id: Ieb425a77b0a8d758956996d201223a0050ae4920
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-02-07 15:03:36 +08:00
Xiang Xiao
554ebdf851 mtd/ftl: Don't call ferr if return value equals -ENOTTY
MIRTOS4BES-22

since -ENOTTY is an expected code to indicate IOCTL isn't supported

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I62cf58c514be696327ad769ab2f35099154bcb42
2021-02-05 11:17:59 +08:00
Jiuzhu Dong
0e05d49284 rptun: fix compile break when disable openamp
N/A

Change-Id: I63251524d94fae43bfb0a71c324d55bf91d363f8
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-02-04 22:10:24 +08:00
Jiuzhu Dong
f9e7a0fc01 builtin: execute app whose filename is longer than NAME_MAX
MIRTOS-360

Change-Id: I0d8ed47c0391e65467cc8a2f4f499b0fbfa8c122
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-02-04 15:58:27 +08:00
ligd
00a9bc79d1 sim/up_uart.c: fix losting uart data when user paste long cmd
N/A

Change-Id: I66c01c0789fc83ae8f6db522d61ff8ab63cd9211
Signed-off-by: ligd <liguiding1@xiaomi.com>
2021-02-03 13:41:15 +08:00
chao.an
78f48fff18 libs/libc/time/localtime: fix race condition
fix race condition on create the instance of lcl/gmt

Change-Id: I214cc5c544d680b7206552e3caee2b17a722a0c3
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-02-02 17:27:56 +08:00
Xu Xingliang
245112dcdf Update symbol link to miwear/configs.
N/A

Signed-off-by: Xu Xingliang <xuxingliang@xiaomi.com>
Change-Id: I05b76dd0986d59cde22ba4e89596054586cfbb72
2021-02-02 15:05:08 +08:00
chao.an
effa0e0b1a sched/notifier: fix invaild unique key
N/A

Change-Id: Ie63af2a24a0421239d40b580b841cbf5abae446f
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-01-29 20:42:38 +08:00
Xiang Xiao
5e77dea5af pthread/barrier: call sem_get_value instead of nxsem_get_value
N/A

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I65eef2c23f0b59627730a45577d158877c987b78
2021-01-29 20:01:19 +08:00