Commit Graph

4897 Commits

Author SHA1 Message Date
Xiang Xiao 0d12e8bae5 libc/assert: Reference the expression in all case
to avoid the warning "defined but not used"

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I55b7c092d0f2e5882fc1784987657c10cdf2d90b
2021-04-06 14:47:51 +08:00
Xiang Xiao d7adcfd2b9 Refine UNUSED macro to avoid any side effect
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I35d858fc6fb2e0e24b993ab7dd2203c9dd35232a
2021-04-06 14:46:28 +08:00
chao.an 177635dda3 libc/execinfo: add dump_stack support
Change-Id: I8485bd36caf09341ce5a787ec8cce7883e46043d
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-03-31 17:57:15 +08:00
chao.an 3330b95042 libc/execinfo: add backtrace support
Change-Id: I2fa28fcfba359eb4e5118881f10cc194ebb6c298
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-03-31 17:17:07 +08:00
丁欣童 0e33818954 Add include header file <sys/types.h> to rpmsg.h.
N/A

When use netpacket/rpmsg.h,the compiler prompt that sa_family_t is not defined.

Signed-off-by: 丁欣童 <dingxintong@xiaomi.com>
Change-Id: Id2a0c51f992cca43917587423201ab27b92ed54f
2021-03-31 14:07:39 +08:00
Huang Qi 66516a8a7e sys/socket.h: Add "Socket"-level control message types
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
Change-Id: I05f8dd29501f6b06cdd278e0e416f210a98aa6b0
2021-03-31 12:08:25 +08:00
Xiang Xiao 0ec76c44ca sched/signal: Implement SA_NODEFER and SA_RESETHAND
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I9baa72b272c8877022cd94722824f393c7087721
2021-03-29 12:35:58 +08:00
Xiang Xiao fabe4d1d10 sys/stat.h: Add S_IREAD, S_IWRITE and S_IEXEC macro
to be more compatible with BSD libc

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I4067f8cac6c465a3f1b06906e2e274a660792d93
2021-03-29 12:35:58 +08:00
Xiang Xiao a6d4a69e1f serial: Don't comment out ws_[x|y]pixel field from winsize struct
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I3d2435c3950e8f60b50d9af8a54c65bd0d16f2e0
2021-03-29 12:35:58 +08:00
YAMAMOTO Takashi 31819fba12 netdb.h: Add NI_MAXHOST and NI_MAXSERV
* These are not parts of the standards as far as I know.
* These are provided by many platforms. (GLIBC, BSD, Windows, etc)
* These are convenient.
2021-03-26 22:01:13 +08:00
Jiuzhu Dong 35229a917b rtc/rpmsg: support server and client to set time each other
N/A

Change-Id: I5d13f424cb636a79a9fd98c275786771c213ddb8
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-03-22 12:16:58 +08:00
Jiuzhu Dong ccc6ddbafb limits.h: modify _POSIX_OPEN_MAX to 255
N/A

fix ltp/ltp/testcases/open_posix_testsuite/conformance/interfaces/mq_open/speculative/26-1.c:46:8: error: size of array 'queue' is negative
  mqd_t queue[_POSIX_OPEN_MAX + _POSIX_MQ_OPEN_MAX + 1];

Change-Id: I1185ea9f84752aaa0150689b5801d01c3f52c598
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-03-17 22:33:05 +08:00
Jiuzhu Dong 7a6a1c1f42 fs: allocate file/socket dynamically
MIRTOS-273

Change-Id: I8aea63eaf0275f47f21fc8d5482b51ffecd5c906
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-03-17 21:15:26 +08:00
Jiuzhu Dong 07a69b728c rpmsg/rtc: add server to response client request about getting time
N/A

Change-Id: I1380adcb8a4f489353666b98f7143fe171d7d798
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-03-16 15:16:12 +08:00
ligd d82e263654 select: fix asan report error
vfs/fs_select.c:116:25: runtime error: left shift of 1 by 31 places cannot be represented in type 'int'
vfs/fs_select.c:153:22: runtime error: left shift of 1 by 31 places cannot be represented in type 'int'

Change-Id: I2e32bb8a3db8ff5a5955b83b382ac2fa5756122c
Signed-off-by: ligd <liguiding1@xiaomi.com>
2021-03-15 21:27:12 +08:00
chao.an 001f549e2c net/if: remove the macro expansion of the public structure
This is a compatibility issue if different structures included
in the usrsock server/client scene, usrsock client has no habit
of actively choosing of config CONFIG_NETDEV_IFINDEX at most of the time

Change-Id: Ib18b0ee12c76de759f6e8a54375c3adcdc31353a
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-03-12 18:19:30 +08:00
丁欣童 099385fff1 vfs: Fix epoll cannot work under 64-bit operating system
by switching to the real file handle

Change-Id: I79ac337d1f2646e38eb10f67a67505dc2f8e8298
Signed-off-by: 丁欣童 <dingxintong@xiaomi.com>
2021-03-11 19:32:05 +08:00
Xiang Xiao 05abfac89b mm/heap: Move semaphore related declaration to private header
since other subsystem doesn't need call these function anymore

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Idfb217c412db62d9f17f427310b75bb78785dc50
2021-03-10 21:13:56 +08:00
丁欣童 c52a65890b drivers/sensor: fakesensor support batch.
N/A

Change-Id: I8377e359ceb111519c4da7d84c2e0dc3b7234ad3
Signed-off-by: 丁欣童 <dingxintong@xiaomi.com>
2021-03-08 16:02:19 +08:00
Xiang Xiao 5aa9333731 mtd/progmem: Add up_progmem_read callback guarded by ARCH_HAVE_PROGMEM_READ
since sometime platform code need do some special action during memcpy

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Id108ef4232376feab3e37e9b3aee9a7927a03bd4
2021-03-04 11:54:59 +08:00
dongjiuzhu1 bb65de6cae net: unify socket info file descriptor
MIRTOS-255

Change-Id: Iee680c8ac07fe87fb6e7900b4f792e0f1ff5036d
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-03-03 22:23:44 +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
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
ligd df76063a35 Revert "net: unify socket info file descriptor"
This reverts commit 27b332283e.
2021-02-26 10:21:02 +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 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 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 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
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
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
chao.an 96267fe88c wireless/bluetooth: add BT/BLE dual mode bridge driver
Change-Id: I692228fda27df1a4249f11474ff50a1049becf4b
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-01-14 23:30:48 +08:00
Xiang Xiao 32f3ddec8b fs: Remove fs_dupfd and fs_dupfd2 internal functions
let's call either nx_dup/nx_dup2 or file_dup/file_dup2
instead just like other fs api: xxx->nx_xxx->file_xxx

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I1aacfb9e25dc7b3fcb0345ff7b269b1953a01e5b
2021-01-13 17:40:52 +08:00
chao.an 043ed0e36b wireless/bluetooth: move H4_* definition to external
Change-Id: Ie67a566857c5ed825b6dddc33832f936b5755fbe
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-01-13 16:51:35 +08:00
Xiang Xiao 5bdf084aed bt_uart_shim: Correct the prototype of bt_uart_shim_getdevice
1.Add const to the path argument
2.Return the explicit type(struct btuart_lowerhalf_s *)

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-01-13 16:12:36 +08:00
Xiang Xiao 09be85dcba Fix nxstyle warning
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Idf0acfc238d8598084b5d5c42e0a5e0045d98490
2021-01-13 16:12:22 +08:00
Xiang Xiao 514f62c790 bluetooth: Fix the typo error in BT_GETUINT16 and BT_PUTUINT16
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-01-13 16:11:53 +08:00
Xiang Xiao a2c724bd27 bluetooth: Remove the unnecessary forward reference
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-01-13 16:10:41 +08:00
Xiang Xiao 0567d9e812 bluetooth: Fix typos in comment
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-01-13 16:10:24 +08:00
Xiang Xiao 18badb068e fs: Make nx_vxxx and file_vxxx as internal functions
these functions are the implementation detail and then
don't need expose to external

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Ief832391d5b42d1f1645907eb465631650490234
2021-01-13 14:02:24 +08:00
Xiang Xiao eba7216926 fs: Remove file_detach since it is unefficient to call open and file_detach
the kernel user should call file_open directly instead

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I5bf7f661006f5d43739bc8618abfb4b983fde78d
2021-01-12 11:03:36 +08:00
Xiang Xiao ac99898bc7 fs: Reimplement file_open to not depend on nx_open
on the other hand, open/nx_open call file_open instead

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I66990a77cdeb6ff18f7bf48a65bbc7b701dad552
2021-01-12 11:03:20 +08:00
ligd a5d6f1fc68 mqueue: add poll support
Change-Id: I7e908f6a6c00158c0946587dd79ae3dc5d279d37
Signed-off-by: ligd <liguiding1@xiaomi.com>
2021-01-12 10:34:43 +08:00
chao.an 60f03d2a92 wireless/bluetooth: add more hci event definitions
Change-Id: I35c034762335cf72f2d46ea383f0136361506e1e
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-01-11 10:18:11 +08:00
chao.an 8b671fd79c wireless/bluetooth: remove the host dependency
Change-Id: I2f7073731fdf920ea69d79462275468f83f2cc4c
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-01-11 10:18:01 +08:00