ligd
fc50e57a26
pthread_mutx: remove unused critical_secton lock
...
Caused the 'nlocks' are remove from mutex, so
here don't need do critical_secton lock like nxmutex_lock
Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-09-15 17:32:33 +08:00
Alin Jerpelea
eb9030c891
sched: migrate to SPDX identifier
...
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-09-12 01:10:14 +08:00
yinshengkai
d7f02a8cb6
sched: change pthread_mutex implementation from sem to mutex
...
Since pthread_mutex is implemented by sem, it is impossible to see in ps who holds the lock and causes the wait.
Replace sem with mutex implementation to solve the above problems
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2024-09-06 09:42:53 +08:00
yinshengkai
a40a802f9b
sched/pthread: repalce sched_lock to enter_critical_section
...
After RR is enabled, an interrupt occurs during this period and the task cannot be switched
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-04-24 01:54:44 +08:00
chao an
4c8d244fae
sched/getpid: replace syscall getpid/tid/ppid() to kernel version
...
NuttX kernel should not use the syscall functions, especially after
enabling CONFIG_SCHED_INSTRUMENTATION_SYSCALL, all system functions
will be traced to backend, which will impact system performance.
Signed-off-by: chao an <anchao@xiaomi.com>
2023-02-02 10:33:01 +08:00
Marco Casaroli
7ee8d38fda
Remove intr
param from pthread_mutex_take
2022-12-08 03:13:44 +08:00
Marco Casaroli
11cc232de5
pthread_mutex_timedlock
never returns EINTR
...
According to posix spec, this function should never return `EINTR`.
This fixes the call to `pthread_mutex_take` so it keeps retrying the
lock and doesn't return `EINTR`
2022-12-07 21:08:23 +08:00
qinwei1
8021dfece6
sched/task/task_getpid: getpid should return process id not thread id
...
Summary:
implement the right semantics:
1. getpid should return the main thread id
2. gettid should return the current thread id
Refer to:
https://github.com/apache/incubator-nuttx/issues/2499
https://github.com/apache/incubator-nuttx/pull/2518
Signed-off-by: qinwei1 <qinwei1@xiaomi.com>
2022-11-17 17:58:08 +08:00
Gustavo Henrique Nihei
1416afc6b6
sched: Remove "0x" prefix preceding "%p" specifier on format string
...
The "p" format specifier already prepends the pointer address with
"0x" when printing.
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2022-06-30 22:08:58 +03:00
Petro Karashchenko
68902d8732
pid_t: unify usage of special task IDs
...
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-03-22 21:22:32 +08:00
Nathan Hartman
878c347bb6
sched: Fix typos in comments
...
sched/pthread/pthread_mutextimedlock.c:
sched/pthread/pthread_mutextrylock.c:
* Fix typos in comments. No functional change.
2021-12-21 11:07:23 -06:00
Alin Jerpelea
8935ac4cc3
sched: Author Gregory Nutt: update licenses to Apache
...
Gregory Nutt has submitted the SGA and we can mograte the licenses
to Apache.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-02-09 01:21:53 -08:00
Gregory Nutt
a4218e2144
include/nuttx/sched.h: Make naming of all internal names consistent:
...
1. Add internal scheduler functions should begin with nxsched_, not sched_
2. Follow the consistent naming patter of https://cwiki.apache.org/confluence/display/NUTTX/Naming+of+OS+Internal+Functions
2020-05-09 14:19:08 -03:00
Xiang Xiao
cde88cabcc
Run codespell -w with the latest dictonary again
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-02-23 22:27:46 +01:00
Gregory Nutt
0951151c33
libs/libc/pthread, syscall/, and include/sys/syscall.h: Support for pthread_mutex_timedlock() was added recently, however no new system call was added for the API make is usable only in the FLAT build. With a pthread_mutex_timedlock() system call, there is no reason for a pthread_mutex_lock() system call since it is now nothing more than an wrapper around pthread_mutex_timedlock(), passing NULL for the time value. The pthread_mutex_lock() syscall was removed and the pthread_mutex_lock() implemented was moved from /sched/pthread to where it now belows in libs/libc/pthread.
2019-02-25 18:19:13 -06:00