walnux/drivers/misc
dongjiuzhu1 cfd359141f fs/drivers: Avoid causing a busy loop in the program due to context switching induced by sem_post.
examples:
There are two threads involved: thread A with a priority of 100 and
thread B with a priority of 101. Here's how they interact:

When thread A releases a semaphore, thread B is scheduled to execute
some code and may reacquire the semaphore. If no other tasks are ready,
thread A will be scheduled to run.
This continuous process can lead to a busy loop.

Thread A:                                                   Thread B:

while (nxsem_get_value(&priv->wait, &semcount) >= 0 &&  <---
       semcount <= 0)                                      |  2)context switch
  {                                  1)contex switch       |
    nxsem_post(&priv->wait);         ------------->     run some code and nxsem_wait again
  }

Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2025-03-17 10:44:26 +01:00
..
addrenv.c drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
CMakeLists.txt drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
dev_ascii.c drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
dev_mem.c drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
dev_null.c drivers/iovec: revert vector io implement from loop/null/zero driver 2025-01-22 11:29:39 +08:00
dev_zero.c drivers/iovec: revert vector io implement from loop/null/zero driver 2025-01-22 11:29:39 +08:00
goldfish_pipe.c fs/drivers: Avoid causing a busy loop in the program due to context switching induced by sem_post. 2025-03-17 10:44:26 +01:00
Kconfig drivers/misc/Kconfig: change DEV_ZERO deafult to !DEFAULT_SMALL. 2024-12-30 22:22:29 +08:00
lwl_console.c drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
Make.defs drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
mkrd.c drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
optee.c drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
optee_msg.h Remove @ and % tag from all comments 2023-12-11 17:00:10 -03:00
ramdisk.c drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
rpmsgblk.c drivers/misc: fix typo memroy -> memory 2024-12-17 20:48:07 +08:00
rpmsgblk.h drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
rpmsgblk_server.c drivers/rpmsgblk_server: fix the syslog format warning 2025-03-03 07:37:13 +08:00
rpmsgdev.c nuttx: Support for rpmsgdev custom ioctl 2025-01-17 09:19:18 +08:00
rpmsgdev.h drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
rpmsgdev_server.c drivers/misc: fix rpmsg dev poll assert crash 2024-11-12 14:58:53 +08:00
rwbuffer.c bch: add BIOC_DISCARD ioctl that discards cached sector 2025-01-23 02:35:46 +08:00