zephyr/lib/posix
Christopher Friedt 0d7ef2297b posix: mutex: use k_mutex instead of posix_mutex
The internal representation of `pthread_mutex_t`,
`struct posix_mutex`, is basically a clone of `struct k_mutex`
but without the benefit of being able to use all of the
existing `k_mutex_*()` suite of functions.

The first step in the right direction was switching
the external representation of `pthread_mutex_t` to a simple
`int`. Let's take the next step in the right direction, which
is getting rid of `struct posix_mutex`.

The only significant difference between `struct k_mutex` and
`struct posix_mutex` is that the latter needs a `type` field.

Since there were a fixed number of `struct posix_mutex`, we
can just externalize the `type` field and reuse
`struct k_mutex` as-is.

For now, let's keep this change as a simple type
substitution. Eventually, we should be able to fully switch
to Zephyr API internally.

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
2023-06-09 12:27:04 -04:00
..
getopt iterable_sections: move to specific header 2023-05-22 10:42:30 +02:00
clock.c posix: clock: fix seconds calculation 2023-01-04 21:12:58 +01:00
CMakeLists.txt lib: posix: move fnmatch from lib/util to lib/posix 2023-03-03 17:40:14 +09:00
eventfd.c posix: eventfd: deprecate non-public EFD macros 2023-06-02 18:45:46 -04:00
fnmatch.c posix: fnmatch: correct (many) compliance issues 2023-03-03 17:40:14 +09:00
fs.c posix: fs: avoid adding open() alias with newlib and picolibc 2023-01-23 09:57:31 -08:00
Kconfig posix: pthread: reimplement pthread_barrier using zephyr objects 2023-06-09 12:27:04 -04:00
mqueue.c posix: mqueue: do not typedef mq_attr 2023-01-23 09:57:31 -08:00
nanosleep.c sys: util: migrate all files to DIV_ROUND_UP 2023-04-11 12:00:37 +02:00
perror.c lib: posix: add perror() implementation 2022-07-04 22:53:36 +02:00
posix_internal.h posix: mutex: use k_mutex instead of posix_mutex 2023-06-09 12:27:04 -04:00
pthread.c posix: sched: add support for SCHED_OTHER 2023-04-29 13:14:40 -07:00
pthread_barrier.c posix: pthread: reimplement pthread_barrier using zephyr objects 2023-06-09 12:27:04 -04:00
pthread_common.c lib: migrate includes to <zephyr/...> 2022-05-06 19:58:09 +02:00
pthread_cond.c posix: mutex: use k_mutex instead of posix_mutex 2023-06-09 12:27:04 -04:00
pthread_key.c posix: key: abstract pthread_key_t as uint32_t 2022-11-24 04:19:01 +09:00
pthread_mutex.c posix: mutex: use k_mutex instead of posix_mutex 2023-06-09 12:27:04 -04:00
pthread_rwlock.c lib: migrate includes to <zephyr/...> 2022-05-06 19:58:09 +02:00
pthread_sched.c posix: sched: add support for SCHED_OTHER 2023-04-29 13:14:40 -07:00
pthread_sched.h posix: sched: add support for SCHED_OTHER 2023-04-29 13:14:40 -07:00
semaphore.c lib: posix: semaphore: use consistent timebase in sem_timedwait 2022-06-24 20:12:05 +02:00
sleep.c lib: posix: update usleep() to follow the POSIX spec 2022-11-24 19:31:33 -05:00
timer.c posix: Kconfig for timer_create wait time 2022-12-27 15:34:13 +01:00