nuttx/libs/libc/pthread
chao an 6ee9ec7656 build: add initial cmake build system
1. Update all CMakeLists.txt to adapt to new layout
2. Fix cmake build break
3. Update all new file license
4. Fully compatible with current compilation environment(use configure.sh or cmake as you choose)

------------------

How to test

From within nuttx/. Configure:

cmake -B build -DBOARD_CONFIG=sim/nsh -GNinja
cmake -B build -DBOARD_CONFIG=sim:nsh -GNinja
cmake -B build -DBOARD_CONFIG=sabre-6quad/smp -GNinja
cmake -B build -DBOARD_CONFIG=lm3s6965-ek/qemu-flat -GNinja

(or full path in custom board) :
cmake -B build -DBOARD_CONFIG=$PWD/boards/sim/sim/sim/configs/nsh -GNinja

This uses ninja generator (install with sudo apt install ninja-build). To build:

$ cmake --build build

menuconfig:

$ cmake --build build -t menuconfig

--------------------------

2. cmake/build: reformat the cmake style by cmake-format

https://github.com/cheshirekow/cmake_format

$ pip install cmakelang

$ for i in `find -name CMakeLists.txt`;do cmake-format $i -o $i;done
$ for i in `find -name *\.cmake`;do cmake-format $i -o $i;done

Co-authored-by: Matias N <matias@protobits.dev>
Signed-off-by: chao an <anchao@xiaomi.com>
2023-07-08 13:50:48 +08:00
..
CMakeLists.txt build: add initial cmake build system 2023-07-08 13:50:48 +08:00
Kconfig pthread/spinlock: Call up_testsest directly in the flat build 2022-05-20 09:51:53 -03:00
Make.defs sched/tls: remove PTHREAD_CLEANUP from Kconfig 2023-06-14 12:00:48 +08:00
pthread_atfork.c Fix compiler warnings (-Wunused-parameter) in various functions 2022-07-12 11:42:34 +08:00
pthread_attr_destroy.c libs: Remove "0x" prefix preceding "%p" specifier on format string 2022-06-30 22:08:58 +03:00
pthread_attr_getaffinity.c libs/libc/pthread: fix function name in comments 2023-04-07 12:28:45 -03:00
pthread_attr_getdetachstate.c sched/pthread: Implement pthread_attr_[get|set]detachstate 2020-08-20 10:46:14 +01:00
pthread_attr_getinheritsched.c libs: Remove "0x" prefix preceding "%p" specifier on format string 2022-06-30 22:08:58 +03:00
pthread_attr_getschedparam.c libs: Remove "0x" prefix preceding "%p" specifier on format string 2022-06-30 22:08:58 +03:00
pthread_attr_getschedpolicy.c libs: Remove "0x" prefix preceding "%p" specifier on format string 2022-06-30 22:08:58 +03:00
pthread_attr_getstack.c libc/pthread: Implement pthread_attr_[set|get]stackaddr 2023-01-24 13:53:02 -03:00
pthread_attr_getstackaddr.c libc/pthread: Implement pthread_attr_[set|get]stackaddr 2023-01-24 13:53:02 -03:00
pthread_attr_getstacksize.c libc/pthread: Implement pthread_attr_[set|get]stackaddr 2023-01-24 13:53:02 -03:00
pthread_attr_init.c libs: Remove "0x" prefix preceding "%p" specifier on format string 2022-06-30 22:08:58 +03:00
pthread_attr_setaffinity.c libs/libc/pthread: fix function name in comments 2023-04-07 12:28:45 -03:00
pthread_attr_setdetachstate.c sched/pthread: Implement pthread_attr_[get|set]detachstate 2020-08-20 10:46:14 +01:00
pthread_attr_setinheritsched.c nuttx:Correct code comment errors 2021-08-27 20:21:19 +02:00
pthread_attr_setschedparam.c libs: Remove "0x" prefix preceding "%p" specifier on format string 2022-06-30 22:08:58 +03:00
pthread_attr_setschedpolicy.c sched: Map SCHED_OTHER to SCHED_FIFO or SCHED_RR 2023-01-30 03:01:03 +02:00
pthread_attr_setstack.c libc/pthread: Implement pthread_attr_[set|get]stackaddr 2023-01-24 13:53:02 -03:00
pthread_attr_setstackaddr.c libc/pthread: Implement pthread_attr_[set|get]stackaddr 2023-01-24 13:53:02 -03:00
pthread_attr_setstacksize.c libc/pthread: Implement pthread_attr_[set|get]stackaddr 2023-01-24 13:53:02 -03:00
pthread_barrierattr_destroy.c libs/libc/pthread: Fix nxstyle errors 2023-05-10 13:04:35 +02:00
pthread_barrierattr_getpshared.c libs/libc/pthread: Fix nxstyle errors 2023-05-10 13:04:35 +02:00
pthread_barrierattr_init.c libs/libc/pthread: Fix nxstyle errors 2023-05-10 13:04:35 +02:00
pthread_barrierattr_setpshared.c libs/libc/pthread: Fix nxstyle errors 2023-05-10 13:04:35 +02:00
pthread_barrierdestroy.c pthread_barrier:don't destory when barrier used 2022-11-11 08:56:48 +08:00
pthread_barrierinit.c arch: remove unnecessary sem_setprotocol code 2023-03-17 16:53:19 -03:00
pthread_cleanup.c sched/tls: remove PTHREAD_CLEANUP from Kconfig 2023-06-14 12:00:48 +08:00
pthread_condattr_destroy.c libs: Remove "0x" prefix preceding "%p" specifier on format string 2022-06-30 22:08:58 +03:00
pthread_condattr_getclock.c libc/pthread: Implement pthread_condattr_[g|s]etclock 2020-08-17 19:17:08 +01:00
pthread_condattr_getpshared.c libs/libc/pthread: Fix nxstyle errors 2023-05-12 18:00:15 +03:00
pthread_condattr_init.c libs: Remove "0x" prefix preceding "%p" specifier on format string 2022-06-30 22:08:58 +03:00
pthread_condattr_setclock.c sched/clock: Remove CLOCK_MONOTONIC option from Kconfig 2022-02-23 01:21:26 +08:00
pthread_condattr_setpshared.c libs/libc/pthread: Fix nxstyle errors 2023-05-12 18:00:15 +03:00
pthread_conddestroy.c libs: Remove "0x" prefix preceding "%p" specifier on format string 2022-06-30 22:08:58 +03:00
pthread_condinit.c arch: remove unnecessary sem_setprotocol code 2023-03-17 16:53:19 -03:00
pthread_condtimedwait.c libc/pthread: Implement pthread_condattr_[g|s]etclock 2020-08-17 19:17:08 +01:00
pthread_create.c Revert "libc: Call pthread_exit in user-space by up_pthread_exit" 2022-02-09 21:21:43 +08:00
pthread_exit.c sched/tls: remove PTHREAD_CLEANUP from Kconfig 2023-06-14 12:00:48 +08:00
pthread_get_stackaddr_np.c arch: Allocate the space from the beginning in up_stack_frame 2021-04-16 12:41:41 +09:00
pthread_get_stacksize_np.c sourcefiles: Fix relative path in file header 2021-03-09 23:18:28 +08:00
pthread_getname_np.c pthread: Add len argument to pthread_getname_np 2022-02-07 08:19:17 +01:00
pthread_getspecific.c libc/tls: Make tls_get_info as the pulibc function instead up_tls_info 2022-06-03 23:56:50 +03:00
pthread_keycreate.c Replace nxsem API when used as a lock with nxmutex API 2022-10-17 15:59:46 +09:00
pthread_keydelete.c Replace nxsem API when used as a lock with nxmutex API 2022-10-17 15:59:46 +09:00
pthread_kill.c sched: Implement tkill/tgkill 2023-01-26 08:11:56 +02:00
pthread_mutex_lock.c libs: nxstyle fixes 2021-03-03 18:52:53 -08:00
pthread_mutexattr_destroy.c libs: Remove "0x" prefix preceding "%p" specifier on format string 2022-06-30 22:08:58 +03:00
pthread_mutexattr_getprotocol.c pthread: restore pthread mutex default protocol POSIX compatibility 2022-01-11 01:55:12 +08:00
pthread_mutexattr_getpshared.c libs: Remove "0x" prefix preceding "%p" specifier on format string 2022-06-30 22:08:58 +03:00
pthread_mutexattr_getrobust.c libs: Author Gregory Nutt: update licenses to Apache 2021-03-03 18:52:53 -08:00
pthread_mutexattr_gettype.c libs: Author Gregory Nutt: update licenses to Apache 2021-03-03 18:52:53 -08:00
pthread_mutexattr_init.c pthread: fix typo with CONFIG_PTHREAD_MUTEX_DEFAULT_PRIO_INHERIT 2022-09-05 15:36:23 +02:00
pthread_mutexattr_setprotocol.c libs: Remove "0x" prefix preceding "%p" specifier on format string 2022-06-30 22:08:58 +03:00
pthread_mutexattr_setpshared.c libs: Remove "0x" prefix preceding "%p" specifier on format string 2022-06-30 22:08:58 +03:00
pthread_mutexattr_setrobust.c pthread_mutexinit: fix deadcode in pthread_mutexinit 2022-05-16 10:20:52 +03:00
pthread_mutexattr_settype.c libs: Author Gregory Nutt: update licenses to Apache 2021-03-03 18:52:53 -08:00
pthread_once.c libc/pthread: Return EINVAL when input parameter incorrect at pthread_once 2023-05-12 01:06:23 +08:00
pthread_rwlock_rdlock.c sched/tls: remove PTHREAD_CLEANUP from Kconfig 2023-06-14 12:00:48 +08:00
pthread_rwlock_wrlock.c sched/tls: remove PTHREAD_CLEANUP from Kconfig 2023-06-14 12:00:48 +08:00
pthread_rwlock.c libs: Mark Schulte: update licenses to Apache 2021-04-01 12:13:12 -05:00
pthread_rwlockattr_destroy.c libs/libc/pthread: Fix nxstyle errors 2023-05-10 13:04:35 +02:00
pthread_rwlockattr_getpshared.c libs/libc/pthread: Fix nxstyle errors 2023-05-10 13:04:35 +02:00
pthread_rwlockattr_init.c libs/libc/pthread: Fix nxstyle errors 2023-05-10 13:04:35 +02:00
pthread_rwlockattr_setpshared.c libs/libc/pthread: Fix nxstyle errors 2023-05-10 13:04:35 +02:00
pthread_setcancelstate.c libs: nxstyle fixes 2021-03-03 18:52:53 -08:00
pthread_setcanceltype.c libs: nxstyle fixes 2021-03-03 18:52:53 -08:00
pthread_setname_np.c pthread: Add len argument to pthread_getname_np 2022-02-07 08:19:17 +01:00
pthread_setspecific.c libc/tls: Make tls_get_info as the pulibc function instead up_tls_info 2022-06-03 23:56:50 +03:00
pthread_spinlock.c Fix various typos 2022-07-08 02:15:54 +08:00
pthread_testcancel.c libs: Author Gregory Nutt: update licenses to Apache 2021-03-03 18:52:53 -08:00
pthread_yield.c libs: Author Gregory Nutt: update licenses to Apache 2021-03-03 18:52:53 -08:00