lib: flatten all loose components into one lib
lib/ was starting to get messy and inconsitent. Files being either dumped in the root or in sub-directories without a clear plan. Move all library components into one single folder and call it 'os'. Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
parent
885aaf2734
commit
db92e5c66e
23 changed files with 54 additions and 39 deletions
|
@ -1,15 +1,8 @@
|
||||||
zephyr_sources(thread_entry.c work_q.c)
|
|
||||||
zephyr_sources(fdtable.c)
|
|
||||||
add_subdirectory(crc)
|
|
||||||
add_subdirectory_ifdef(CONFIG_JSON_LIBRARY json)
|
|
||||||
if(NOT CONFIG_NATIVE_APPLICATION)
|
if(NOT CONFIG_NATIVE_APPLICATION)
|
||||||
add_subdirectory(libc)
|
add_subdirectory(libc)
|
||||||
endif()
|
endif()
|
||||||
add_subdirectory_if_kconfig(ring_buffer)
|
|
||||||
add_subdirectory_if_kconfig(base64)
|
|
||||||
add_subdirectory(mempool)
|
|
||||||
add_subdirectory_ifdef(CONFIG_POSIX_API posix)
|
add_subdirectory_ifdef(CONFIG_POSIX_API posix)
|
||||||
add_subdirectory_ifdef(CONFIG_CMSIS_RTOS_V1 cmsis_rtos_v1)
|
add_subdirectory_ifdef(CONFIG_CMSIS_RTOS_V1 cmsis_rtos_v1)
|
||||||
add_subdirectory_ifdef(CONFIG_CMSIS_RTOS_V2 cmsis_rtos_v2)
|
add_subdirectory_ifdef(CONFIG_CMSIS_RTOS_V2 cmsis_rtos_v2)
|
||||||
add_subdirectory(rbtree)
|
|
||||||
add_subdirectory(gui)
|
add_subdirectory(gui)
|
||||||
|
add_subdirectory(os)
|
||||||
|
|
25
lib/Kconfig
25
lib/Kconfig
|
@ -8,29 +8,14 @@ source "lib/libc/Kconfig"
|
||||||
|
|
||||||
menu "Additional libraries"
|
menu "Additional libraries"
|
||||||
|
|
||||||
config JSON_LIBRARY
|
|
||||||
bool "Build JSON library"
|
|
||||||
help
|
|
||||||
Build a minimal JSON parsing/encoding library. Used by sample
|
|
||||||
applications such as the NATS client.
|
|
||||||
|
|
||||||
config RING_BUFFER
|
|
||||||
bool "Enable ring buffers"
|
|
||||||
help
|
|
||||||
Enable usage of ring buffers. This is similar to kernel FIFOs but ring
|
|
||||||
buffers manage their own buffer memory and can store arbitrary data.
|
|
||||||
For optimal performance, use buffer sizes that are a power of 2.
|
|
||||||
|
|
||||||
config BASE64
|
|
||||||
bool "Enable base64 encoding and decoding"
|
|
||||||
help
|
|
||||||
Enable base64 encoding and decoding functionality
|
|
||||||
|
|
||||||
source "lib/posix/Kconfig"
|
|
||||||
|
|
||||||
source "lib/cmsis_rtos_v1/Kconfig"
|
source "lib/cmsis_rtos_v1/Kconfig"
|
||||||
|
|
||||||
source "lib/cmsis_rtos_v2/Kconfig"
|
source "lib/cmsis_rtos_v2/Kconfig"
|
||||||
|
|
||||||
source "lib/gui/Kconfig"
|
source "lib/gui/Kconfig"
|
||||||
|
|
||||||
|
source "lib/os/Kconfig"
|
||||||
|
|
||||||
|
source "lib/posix/Kconfig"
|
||||||
|
|
||||||
endmenu
|
endmenu
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
zephyr_sources(base64.c)
|
|
|
@ -1 +0,0 @@
|
||||||
zephyr_sources(crc32_sw.c crc16_sw.c crc8_sw.c crc7_sw.c)
|
|
|
@ -1,2 +0,0 @@
|
||||||
zephyr_library()
|
|
||||||
zephyr_library_sources(json.c)
|
|
|
@ -1 +0,0 @@
|
||||||
zephyr_sources(mempool.c)
|
|
17
lib/os/CMakeLists.txt
Normal file
17
lib/os/CMakeLists.txt
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
zephyr_sources_if_kconfig(base64.c)
|
||||||
|
|
||||||
|
zephyr_sources(
|
||||||
|
crc32_sw.c
|
||||||
|
crc16_sw.c
|
||||||
|
crc8_sw.c
|
||||||
|
crc7_sw.c
|
||||||
|
fdtable.c
|
||||||
|
mempool.c
|
||||||
|
rb.c
|
||||||
|
thread_entry.c
|
||||||
|
work_q.c
|
||||||
|
)
|
||||||
|
|
||||||
|
zephyr_sources_ifdef(CONFIG_JSON_LIBRARY json.c)
|
||||||
|
|
||||||
|
zephyr_sources_if_kconfig(ring_buffer.c)
|
27
lib/os/Kconfig
Normal file
27
lib/os/Kconfig
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
#
|
||||||
|
# Copyright (c) 2016 Intel Corporation
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
#
|
||||||
|
|
||||||
|
menu "OS Support Library"
|
||||||
|
|
||||||
|
config JSON_LIBRARY
|
||||||
|
bool "Build JSON library"
|
||||||
|
help
|
||||||
|
Build a minimal JSON parsing/encoding library. Used by sample
|
||||||
|
applications such as the NATS client.
|
||||||
|
|
||||||
|
config RING_BUFFER
|
||||||
|
bool "Enable ring buffers"
|
||||||
|
help
|
||||||
|
Enable usage of ring buffers. This is similar to kernel FIFOs but ring
|
||||||
|
buffers manage their own buffer memory and can store arbitrary data.
|
||||||
|
For optimal performance, use buffer sizes that are a power of 2.
|
||||||
|
|
||||||
|
config BASE64
|
||||||
|
bool "Enable base64 encoding and decoding"
|
||||||
|
help
|
||||||
|
Enable base64 encoding and decoding functionality
|
||||||
|
|
||||||
|
endmenu
|
|
@ -1 +0,0 @@
|
||||||
zephyr_sources(rb.c)
|
|
|
@ -1 +0,0 @@
|
||||||
zephyr_sources(ring_buffer.c)
|
|
|
@ -6,10 +6,10 @@
|
||||||
|
|
||||||
#include <ztest.h>
|
#include <ztest.h>
|
||||||
|
|
||||||
#include <lib/crc/crc32_sw.c>
|
#include <lib/os/crc32_sw.c>
|
||||||
#include <lib/crc/crc16_sw.c>
|
#include <lib/os/crc16_sw.c>
|
||||||
#include <lib/crc/crc8_sw.c>
|
#include <lib/os/crc8_sw.c>
|
||||||
#include <lib/crc/crc7_sw.c>
|
#include <lib/os/crc7_sw.c>
|
||||||
|
|
||||||
void test_crc32_ieee(void)
|
void test_crc32_ieee(void)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue