1. separate command catagory of bt/pktradio from wireless ioctl
2. Remove commoand count limit to support vendor command
Signed-off-by: chao an <anchao@xiaomi.com>
Situation:
Assume we have 2 cpus, and busy run task0.
CPU0 CPU1
task0 -> task1 task2 -> task0
1. remove task0 form runninglist
2. take task1 as new tcb
3. add task0 to blocklist
4. clear spinlock
4.1 remove task2 form runninglist
4.2 take task0 as new tcb
4.3 add task2 to blocklist
4.4 use svc ISR swith to task0
4.5 crash
5. use svc ISR swith to task1
Fix:
Move clear spinlock to the end of svc ISR
Signed-off-by: ligd <liguiding1@xiaomi.com>
Seperate usrsock device driver with usrsock core function layer
to make it more flexiable to adopt other kind of usrsock interface driver
Signed-off-by: liangchaozhong <liangchaozhong@xiaomi.com>
in struct work_s:
union
{
struct
{
struct dq_entry_s dq; /* Implements a double linked list */
clock_t qtime; /* Time work queued */
} s;
struct wdog_s timer; /* Delay expiry timer */
}
while we use WDOG_ISACTIVE(&work->timer) to decide use dq or timer,
that is error, wd_cancel() maybe modify this area, dq_rem() also can
modify this area.
So we can't use the WDOG_ISACTIVE(&work->timer) to take as the judgement,
when there is a union.
Fix:
swap the order in struct wdog_s, move the arg to the second 32bit
Signed-off-by: ligd <liguiding1@xiaomi.com>
- Add check in roundx() functions for infinite or NaN cases
- Add block to avoid style warnings
- Define long double constants and macros for infinity and nan
- Correct return syntax to match NuttX style
- Make c89 compliant
- Fix definitions of INFINITY_L/NAN_L
* include/nuttx/lib/math.h - match standard naming conventions
- Rename isinf_l to isinfl
- Rename isinf_f to isinff
- Add finite()
- Add finitel()
- Add finitef()
- Define isnanl and isnanf
- Define isfinite() so that it uses the appropriate macro
* libs/libc/math/lib_asinf.c
libs/libc/math/lib_asinl.c
libs/libc/math/lib_roundf.c
libs/libc/math/lib_roundl.c
libs/libc/math/lib_sqrtf.c
libs/libc/math/lib_sqrtl.c
- Use renamed macros
- Use correct NAN_x or INFINIT_x macro on returns
This IOCTL (QEIOC_GETINDEX) allows the application to get the actual
encoder position, the index last position and the index count with
one IOCTL call if supported by architecture specific level.
The position, index and count is passed to application level through
qe_index_s structure.
Signed-off-by: Michal Lenc <michallenc@seznam.cz>
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>
1.Forward nxsched_process_cpuload to nxsched_process_cpuload_ticks directly
2.Define the dummy nxsched_process_cpuload_ticks when CPULOAD isn't enabled
3.Remove the weak attribute from nxsched_process_cpuload_ticks
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This patch fixes unbuffered mode so it actually works.
Also, patch contains fixes for possible bugs that could result in
deadlock or system hang in certain situations.
Signed-off-by: Michał Łyszczek <michal.lyszczek@bofc.pl>
D:\code\incubator-nuttx\include\nuttx/net/netdev.h(275,3):
error C2016: C requires that a struct or union has at least one member
[D:\code\incubator-nuttx\vs20222\boards\board.vcxproj]
Compiler error C2016: C requires that a struct or union has at least one member
Reference:
https://docs.microsoft.com/en-us/cpp/error-messages/compiler-errors-1/compiler-errors-c2001-through-c2099?view=msvc-170
Signed-off-by: xiangdong6 <xiangdong6@xiaomi.com>
Signed-off-by: chao.an <anchao@xiaomi.com>
since it is impossible to track producer and consumer
correctly if TCP/IP stack pass IOB directly to netdev
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
The commit 664d45dcba updated the
behavior of the framebuffer's putarea callback enabling it to be
used to draw a particular area of the display. Previously, putarea
was only used to draw the entire area of the display. Any different
area was drawn, row by row, by putrun. Also, before checking for
which callback to call, the framebuffer driver adjusted the buffer
reference that was going to be used for calling the driver's callback
to point to the init of the relevant data. After that commit, the
framebuffer's buffer reference passed to the driver's putarea now
contains the data to draw the entire display. Unlike the previous
version of that implementation, only the putrun's callback buffer
was being referenced from the address that contains the data that
actually is being drawn.
This commit fixes it by adjusting the reference for the run buffer
passed to the putrun/putarea callback. It always starts from the
beginning of the relevant data that is actually being drawn. That is
necessary because lcddev (which uses the same LCD display driver
callbacks) actually don't allocate a buffer containing the data to
draw the whole display, so the same putarea implementation of the
LCD drivers would'n be able to work for both lcddev and framebuffer.
Also it's necessary to pass the stride argument to the LCD drivers
in order to enable them to do partial writes by calculating the
buffer offset while sending row-by-row. The stride is equal the
width multiplied by the bytes per pixel (may add some padding)
for framebuffer and is equal to the lenght of the row being drawn
(multiplied by the same BPP) for lcddev.
Why this approach?
Other possible approaches would be:
1) modify lcddev driver to translate received buffer data to a
buffer similar to the framebuffer. That wouldn't be efficient
considering memory allocation.
2) Create a new callback function. While possible, it'd be confusing
to create a different callback to draw the whole screen and another
to draw only an area of the screen. Also, these callbacks would
differ themselves only from the way the buffer is filled.
3) Simply reverting 664d45dcba would
break the usage of the putarea callback to draw an area of the
display, which would also be inefficient.
This approach is based on the Zephyr's implementation of the ST7789
driver: the buffer starts from the beginiing of the region that would
be drawn. The display device driver's putarea implementation should
check if the operation refers to a full screen/full row and implement
(if possible) a single operation to send the data to be drawn more
efficiently.
Finally, this approach requires that the drivers which implement
the putarea callback and expects the entire framebuffer buffer
to be modified. They don't need to calculate where the data begins
as the new buffer represents the data from the address that is
actually being drawn. This includes adjusting the LCD drivers
GC9A01 and ST7789 and the driver for APA102-based LED matrix display.