Advance Innovation Centre
  • AIC Knowledge @ EEC for All
  • 😎Logical Thinking
    • Karel Robot
    • Code to Flowchart
    • Play with Docker
    • CNX Software
  • MCU & Interfacing with Infineon PSOC™
    • Basic MCU Interfacing
      • Introduction to CY8CKIT-062S2-43012 Pioneer Kit
      • Development Environment Preparation
      • PSoC™ 6S2 Peripherals Interfacing (GPIO)
        • Hello World and LED Blinking
        • GPIO Principles
        • PSoC™ 6S2 GPIO-HAL LED Blink Lab
        • PSoC™ 6S2 GPIO-PDL LED Blink Lab
        • Button "Bounce" Principles
          • Push/Pull Button to Turn ON/OFF LED via HAL
          • Push/Pull Button to Turn ON/OFF LED via PDL
          • GPIO Button Interrupt via HAL
          • GPIO Button Interrupt via PDL
        • GPIO variables & functions
      • PSoC™ 6S2 Peripherals Interfacing (ADC, PWM)
        • PSoC™ 6S2 SAR ADC
          • ADC Principles
          • PSoC™ 6S2 with ADC Labs
            • Reading potentiometer sensor value via an ADC HAL
            • Reading potentiometer sensor value via an ADC PDL
        • PSoC™ 6S2 PWM & TCPWM
          • PWM Principles
          • PSoC™ 6S2 for PMW Function Labs
            • LED Brightness using PWM via HAL
            • LED Brightness using PWM via PDL
    • Sensor Interfacing and HMI
      • OLED Display
        • OLED Display Principles
        • Calling BDH’s OLED functions
        • Display ADC via Potentiometer on OLED
      • BDH Shell
        • Shell Principles
        • LED Blinking and CAPSENSE via BDH Shell
        • Adding "History" command
        • Adding "Reboot" command
        • CAPSENSE Button and Slider
          • CAPSENSE Button and Slider with Capsense Tuner
          • CAPSENSE Button and Slider using FreeRTOS
    • Serial Communication & Visualization
      • UART, I2C, SPI Communication via Infineon PSoC™6
      • BMX160 Sensor Communication via Infineon PSoC™6
        • Reading ADC via HAL with Potentiometer and Displaying GUI on Serial Studio
        • Reading XENSIV-DPS-3XX Pressure Sensor and Displaying GUI on Serial Studio
        • Motion Sensors GUI Integration via Serial Studio
    • IoT Connectivity & Data Analytics via Node-Red
      • Node-Red Installation
      • Setting MQTTS to MQTT Broker
      • Sending PSoC6’s sensor to MQTT (node-red)
    • Edge AI on PSoC™
      • Machine Learning on PSoC™6 via Edge-Impulse
    • Infineon PSoC™ Troubleshooting
  • IoT Development with Infineon PSOC™ & BDH Platform
    • PSoC™ IoT Development Kit
      • Introduction to CY8CKIT-062S2-43012 Pioneer Kit
      • Development Environment Preparation
        • Hello World and LED Blinking
    • IoT Connectivity
      • Node-Red Installation
      • Controlling PSoC™ LED using MQTT
      • Setting MQTTS to MQTT Broker
      • Sending PSoC6’s sensor to MQTT (node-red)
    • BDH IoT Connectivity
    • WireLinX™ IoT PLC
    • BDH X-Brain Data Analytics
      • PSoC6 Data Collection to CSV log file
    • Data Visualization
      • สร้าง Dashboard ด้วย Looker Studio
  • 🖥️Operation Systems
    • Prerequisites
      • Guideline from Ubuntu
        • Ubuntu and VSCode on WSL2
      • ติดตั้ง WSL 2
      • Run Ubuntu on VirtualBox7
    • Zero to Linux Hero
      • Computer OS Architecture
      • Anatomy of Linux System
        • UNIX/Linux History
        • UNIX/Linux Evolution
        • GNU Project
        • Linux OS Architecture
        • Command Line Interface (CLI)
          • Basic Commands
          • 😎Level up your Linux Shell
          • File & Dir. Commands
          • Searching Commands
          • 😎ChatGPT-based Terminal
          • SysAdmin Commands
          • Network Commands
          • Hacker Commands
        • Busybox
        • Shell Script
          • Awk Script
          • Bash Shell Script
            • Bash Snippets
            • Bash Useful Examples
      • Anatomy of Linux Kernel
        • Linux Kernel Principles
        • Linux Environment for Developer
      • Anatomy of Embedded Linux
        • Embedded Linux
        • Host & Target
        • Cross Toolchains
        • Bootloader
        • Building Embedded Linux
    • Linux OS Dev. Engineer
      • Process Management
        • Process Basic
        • Process State
        • Basic Process Mgmt. Commands
        • Advance Process Mgmt. Commands
        • Process API Programming
      • IPC
        • IPC Anatomy
        • Signal Programming
        • Pipe Programming
        • FIFO Programming
        • Msg. Queue Programming
          • System V
        • Share Memory Programming
          • System V
        • Socket Programming
      • POSIX Threads
        • Multi-tasking Basic
        • POSIX Thread Anatomy
        • Threading Programming
      • Applied IPC
        • Remote Commander
        • Multi-Remote Commanders
      • Process Synchronization
        • Mutex Programming
        • Semaphore Programming
      • Applied IPC with Semaphore
  • ⌚Embedded Systems Development
    • Introduction to ESD
      • Why's ESD?
      • What it use for?
      • How it works?
    • Enbedded System Development via PSoC6
      • Basic MCU Interfacing
        • Introduction to CY8CKIT-062S2-43012 Pioneer Kit
        • Development Environment Preparation
        • PSoC™ 6S2 Peripherals Interfacing (GPIO)
          • Hello World and LED Blinking
          • GPIO Principles
          • PSoC™ 6S2 GPIO-HAL LED Blink Lab
          • PSoC™ 6S2 GPIO-PDL LED Blink Lab
          • Button "Bounce" Principles
            • Push/Pull Button to Turn ON/OFF LED via HAL
            • Push/Pull Button to Turn ON/OFF LED via PDL
            • GPIO Button Interrupt via HAL
            • GPIO Button Interrupt via PDL
          • GPIO variables & functions
        • PSoC™ 6S2 Peripherals Interfacing (ADC, PWM)
          • PSoC™ 6S2 SAR ADC
            • ADC Principles
            • PSoC™ 6S2 with ADC Labs
              • Reading potentiometer sensor value via an ADC HAL
              • Reading potentiometer sensor value via an ADC PDL
          • PSoC™ 6S2 PWM & TCPWM
            • PWM Principles
            • PSoC™ 6S2 for PMW Function Labs
              • LED Brightness using PWM via HAL
              • LED Brightness using PWM via PDL
      • Sensor Interfacing and HMI
        • OLED Display
          • OLED Display Principles
          • Calling BDH’s OLED functions
          • Display ADC via Potentiometer on OLED
        • BDH Shell
          • Shell Principles
          • LED Blinking and CAPSENSE via BDH Shell
          • Adding "History" command
          • Adding "Reboot" command
          • CAPSENSE Button and Slider
            • CAPSENSE Button and Slider with Capsense Tuner
            • CAPSENSE Button and Slider using FreeRTOS
      • Serial Communication & Visualization
        • UART, I2C, SPI Communication via Infineon PSoC™6
        • BMX160 Sensor Communication via Infineon PSoC™6
          • Reading ADC via HAL with Potentiometer and Displaying GUI on Serial Studio
          • Reading XENSIV-DPS-3XX Pressure Sensor and Displaying GUI on Serial Studio
          • Motion Sensors GUI Integration via Serial Studio
    • Edge Computing and IoT Connectivity
    • Cloud-Based Data Analytics and Digital Twin
    • Edge Vision AI
    • Resources
      • Basic Hardware and Firmware
        • Environment Preparation
          • การติดตั้งโปรแกรม Arduino IDE
            • ตัวอย่างการเริ่มต้นใช้งาน Arduino IDE
          • การติดตั้งโปรแกรมสำหรับใช้งานเครื่องมือวัด NI MyDAQ
            • ตัวอย่างการตั้งค่าใช้ Digital Multimeter -NI ELVISmx
            • ตัวอย่างการตั้งค่าใช้ Oscilloscope-NI ELVISmx
          • ติดตั้งโปรแกรม KingstVIS
        • Basic measurement
          • Basic Digital and Analog I/O
            • LAB: Basic Digital Input/Output
            • LAB: Basic Analog Input/Output
          • Waveform
            • LAB: Oscilloscope
            • LAB: Oscilloscope and Function Generator
            • LAB: Pulse Width Modulation (PWM)
              • Homework
        • Interfacing and Communication
          • LAB: UART, RS485, RS232 Protocol
          • LAB: I2C Protocol
            • HOMEWORK
          • LAB: SPI Protocol
      • IoT Connectivity
        • Example: IoT with MQTT on Node-red
        • Data logger
        • LAB: Data Visualization
  • 🛠️C/C++ for Embedded Programming
    • Development Environment Preparation
      • ติดตั้ง WSL 2
      • ติดตั้ง Ubuntu environment
      • ติดตั้งโปรแกรม Visual Studio Code
      • การเชื่อมต่อ Virtual studio code เข้ากับ WSL
      • ติดตั้ง docker on WSL
    • Principle C/C++ Programming
      • Get started with C++
      • Makefile
        • Makefile Examples
      • Compiling and running
        • How to create a program that you can enter inputs.
          • Lab 1 Exercise
      • Arguments
        • Command line arguments in C and C++
      • signed and unsigned data types
      • Variable and Operator
      • If and If else
      • Loop, Infinite loop, and flag
        • Loop and Flag exercise
      • Array
        • Get to know with arrays
        • Implement example
      • Vector
    • Object Oriented Programming (OOP) in C++
      • Class and Object
      • Encapsulation and Abstraction
      • Polymorphism and Inheritance
    • C/C++ Preprocessing
      • Macro
        • Quiz Macro
      • File Inclusion
      • Conditional Compilation
      • Pragma directive
        • Quiz Pragma
    • String in C++
      • Concatenation
      • Split
    • Type conversions for C/C++
      • Conversion using Cast operator
    • Error handling
    • Data logger
      • การสร้างไฟล์และเขียนไฟล์
      • การอ่านไฟล์
      • การเก็บข้อมูลกับTime stamp
    • High performance programing
      • Multi-task and Multi-thread
        • Multi-threading example
      • Mutex
      • Queue
      • OpenCV
    • C/C++ Techniques
      • Makefile in action
      • Object Oriented Programming (OOP) in C++
        • Class and Object
        • Encapsulation and Abstraction
        • Polymorphism and Inheritance
      • C/C++ Preprocessing
        • Macro
          • Quiz Macro
        • File Inclusion
        • Conditional Compilation
        • Pragma directive
          • Quiz Pragma
      • Binary, Octal and Hexadecimal Numbers
      • Array and properties of an array
        • Get to know with arrays
        • Implement example
      • What's next?
  • 🤖Artificial Intelligence (AI)
    • VAMStack Design House, BUU
    • Data Analytics
      • Data cleansing
      • Data analytics
      • Data analytic exercise
    • Machine Learning
      • Neural Network Layers
      • Machine learning type
      • Dataset
      • Using Edge Impulse for AI Model
    • Basic Image Processing
      • Computer Vision using Python Language
        • Installation
        • Computer Vision Basics
          • Pixel and Color
          • Draw image
          • Basic Image processing
          • Morphology Transformations
          • Gaussian blur
          • Simple Thresholding
          • Contour
          • Canny edge detection
        • Case Study
          • Coin counting
          • Color detection & tracking
        • VAM_CV SDK
  • ⚙️FPGA Design and Development
    • Verilog HDL via Vivado IDE
      • LAB1: Setting Environment and Create Project
        • Create Vivado Project
      • LAB2: Hardware Description Language Work Flow
        • Simulation code
      • LAB3: Design HDL Project
        • Top Level Design
        • Top-level Simulation
      • LAB4: Asynchronous VS Synchronous Circuit
        • Simulation Synchronous counter
    • C/C++ Programming on Ultra96v2 FPGA Board
      • Application C/C++ on Ultra96v2 Part 1
        • Design Overview
        • Step 1 - Burn the image to SD card
        • Step 2 - Bring up Ultra96v2
        • Step 3 - Installing the Vitis-AI runtime packages
      • Application C/C++ on Ultra96v2 Part 2
        • STEP 1 : Setting auto boot Wifi
        • STEP 2 : How to working on Embedded
        • STEP 3 : How to run the test code
  • 🤖Robotics
    • Dobot Magician
      • Instruction of Dobot
      • Software Download
      • Basically of Program
        • Teaching and Playback
        • Write and Draw
        • LaserEngraving
        • 3D Printer
    • Robotino
      • Software Download
        • Robotino View
        • Robotino SIM
      • Charging
      • Connecting
      • Follow Line example
        • Basic block in Follow Line
    • RaspBlock
      • Get Started with Raspblock
  • 🚩Special Topics
    • Node-Red
      • Set up Raspberry Pi
      • Install node red in Raspberry Pi
      • Get started with Node Red
        • Open node-red
        • Turn off node red
        • Install Dashboard on Node-red
        • Use node red to show message
        • Using Ultrasonic sensor with node-red
    • IoT Cloud
      • Overview
        • How do they work?
          • Basic Knowlege
      • Installations
        • Install Docker
        • Install Mosquitto Broker
        • Install InfluxDB
        • Install Telegraf
        • Install Grafana
      • Get Sensor Value and Send to MQTT
        • Connect ESP3266 to sensor
        • Connect ESP3266 to MQTT
      • Integration
    • Senses IoT
      • SENSES IoT Platform
      • LAB8: MCU send data to IoT platform
    • CrowPi Dev Kit
      • Raspberry Pi with CrowPi
      • Remote to Raspberry Pi
      • Cross-Compile
        • Lab 1: Programming and cross complier
      • Hardware and Interfaces Usage CLI
        • LAB: Usage GPIO via CLI
        • LAB: Scan I2C bus via CLI
      • Python library for Crow Pi
      • wiringPi library (C) for CrowPi
        • Lab2: Crowpi and sensors
    • LVGL Development
      • LVGL - Light and Versatile Embedded Graphics Library
        • Setting program for LVGL Simulator
        • Get started with LVGL simulator
        • Example Library of LVGL
        • Create your own screen
          • Exercise
        • Style
          • Exercise
        • Event
    • Docker OS
      • Docker OS Part 1
        • Part 1 : Installation
        • Part 2 : Basic Docker OS and Linux CLI
      • Docker OS Part 2
        • Part 1 : Docker communication
        • Part 2 : Docker compose
      • Application Gstreamer on devcontainer
        • STEP 1 : Setting gstreamer environment
        • STEP 2 : Create the Gstreamer element on template
        • STEP 3 : Testing and application on your gst element
  • 🤟Recommended by AIC
    • Skill Roadmap
      • Embedded Engineer
      • Developer
    • Hardware Programming
    • Embedded Programming
    • General-propose Programming
    • Algorithmica
    • Thai Expert Knowledge
    • RT-Thread University Program
      • Infineon PSoC6
      • Kernel
        • Kernel Basics
        • Thread Management
        • Clock Management
        • Inter-thread synchronization
        • Inter-thread communication
        • Memory Management
        • Interrupt Management
        • Kernel porting
        • Atomic Operations
        • RT-Thread SMP
        • Kernel API Changelog
      • Tools
      • Devices & Drivers
        • SENSOR Devices
        • Touch Equipment
        • CRYPTO Devices
        • AUDIO Devices
        • Pulse Encoder Devices
      • Components
        • C Library (libc)
        • ISO/ANSI C Standard
        • POSIX Standard
          • FILE (File IO)
          • Pthread
          • Timer
          • IPC Semaphore
          • IPC Message Queues
          • Dynamic Modules
        • Network Components
          • FinSH Console
          • FAL: Flash Abstraction Layer
          • Virtual File System
          • tmpfs: temporary file system
          • ulog log
          • utest testing framework
          • Power Management
          • RT-Link
        • Software Packages
          • Internet of Things
            • MQTT-umqtt
            • Telnet
          • Tools
            • SystemView
            • SEGGER_RTT
          • LVGL Manual
            • Touch Screen Driver
      • Demo
        • Infineon Gateway
        • Handwriting Recognition (MNIST)
        • Object Detection (Darknet)
        • ROS using RT-Thread
        • Control the car using RT-Thread
        • LiDAR via RT-Thread
        • Detection via RT-Thread and ROS
        • Sensor Driver Development Guide
Powered by GitBook

Assoc. Prof. Wiroon Sriborrirux, Founder of Advance Innovation Center (AIC) and Bangsaen Design House (BDH), Electrical Engineering Department, Faculty of Engineering, Burapha University

On this page
  • 5.0.1
  • 5.0.0
  • 4.1.1
  • 4.1.1-beta
  • 4.1.0
  • 4.0.4
  • 4.0.3
  • 4.0.2
  • 4.0.1
  • 4.0.0
  • 3.1.1

Was this helpful?

  1. Recommended by AIC
  2. RT-Thread University Program
  3. Kernel

Kernel API Changelog

PreviousRT-Thread SMPNextTools

Last updated 7 months ago

Was this helpful?

When the rt-thread source code is released, if the kernel (src) API is updated, the detailed changes of the kernel API will be recorded here.

Note: SMP related interfaces are not included yet. The log content includes: API addition, API deletion, and API change.

/* ----- irq.c ----- */
rt_weak rt_bool_t rt_hw_interrupt_is_disabled(void) /* 5.0.1 */

/* ----- object.c ----- */
rt_err_t rt_object_get_name(rt_object_t object, char *name, rt_uint8_t name_size) /* 5.0.1 */

/* ----- thread.c ----- */
rt_err_t rt_thread_get_name(rt_thread_t thread, char *name, rt_uint8_t name_size) /* 5.0.1 */copymistakeCopy Success

/* ----- ipc.c ----- */
/* 消息队列接收相关的 API 返回值类型更新,由 rt_err_t(接收成功/失败) 改为 rt_ssize_t(接收的实际消息大小) */
rt_ssize_t rt_mq_recv(rt_mq_t    mq,
                    void      *buffer,
                    rt_size_t  size,
                    rt_int32_t timeout) /* 5.0.1 */
rt_err_t   rt_mq_recv(rt_mq_t    mq,
                    void      *buffer,
                    rt_size_t  size,
                    rt_int32_t timeout) /* 5.0.0 */

rt_ssize_t rt_mq_recv_interruptible(rt_mq_t    mq,
                    void      *buffer,
                    rt_size_t  size,
                    rt_int32_t timeout) /* 5.0.1 */
rt_err_t rt_mq_recv_interruptible(rt_mq_t    mq,
                    void      *buffer,
                    rt_size_t  size,
                    rt_int32_t timeout) /* 5.0.0 */

rt_ssize_t rt_mq_recv_killable(rt_mq_t    mq,
                    void      *buffer,
                    rt_size_t  size,
                    rt_int32_t timeout) /* 5.0.1 */
rt_err_t rt_mq_recv_killable(rt_mq_t    mq,
                    void      *buffer,
                    rt_size_t  size,
                    rt_int32_t timeout) /* 5.0.0 */copymistakeCopy Success
  • RT_WEAK changed to rt_weak

  • ALIGN changed to rt_align

  • Added driver.c file

  • scheduler.c is divided into scheduler_mp.c (SMP related) and scheduler_up.c (single core)

/* ----- device.c ----- */
// #ifdef RT_USING_DM
rt_err_t rt_device_bind_driver(rt_device_t device, rt_driver_t driver, void *node); /* 5.0.0 */
rt_device_t rt_device_create_since_driver(rt_driver_t drv,int device_id); /* 5.0.0 */
rt_err_t rt_device_probe_and_init(rt_device_t device); /* 5.0.0 */
// #endif


/* ----- driver.c(新增)----- */
// #ifdef RT_USING_DM
rt_err_t rt_driver_match_with_id(const rt_driver_t drv,int device_id); /* 5.0.0 */
rt_err_t rt_driver_match_with_dtb(const rt_driver_t drv,void *from_node,int max_dev_num); /* 5.0.0 */
// #endif


/* ----- ipc.c ----- */
rt_err_t rt_sem_take_interruptible(rt_sem_t sem, rt_int32_t timeout); /* 5.0.0 */
rt_err_t rt_sem_take_killable(rt_sem_t sem, rt_int32_t timeout); /* 5.0.0 */
void rt_mutex_drop_thread(rt_mutex_t mutex, rt_thread_t thread); /* 5.0.0 */
rt_uint8_t rt_mutex_setprioceiling(rt_mutex_t mutex, rt_uint8_t priority); /* 5.0.0 */
rt_uint8_t rt_mutex_getprioceiling(rt_mutex_t mutex); /* 5.0.0 */
rt_err_t rt_mutex_take_interruptible(rt_mutex_t mutex, rt_int32_t time); /* 5.0.0 */
rt_err_t rt_mutex_take_killable(rt_mutex_t mutex, rt_int32_t time); /* 5.0.0 */
rt_err_t rt_event_recv_interruptible(rt_event_t   event,
                       rt_uint32_t  set,
                       rt_uint8_t   opt,
                       rt_int32_t   timeout,
                       rt_uint32_t *recved); /* 5.0.0 */
rt_err_t rt_event_recv_killable(rt_event_t   event,
                       rt_uint32_t  set,
                       rt_uint8_t   opt,
                       rt_int32_t   timeout,
                       rt_uint32_t *recved); /* 5.0.0 */
rt_err_t rt_mb_send_wait_interruptible(rt_mailbox_t mb,
                         rt_ubase_t  value,
                         rt_int32_t   timeout); /* 5.0.0 */
rt_err_t rt_mb_send_wait_killable(rt_mailbox_t mb,
                         rt_ubase_t  value,
                         rt_int32_t   timeout); /* 5.0.0 */
rt_err_t rt_mb_recv_interruptibale(rt_mailbox_t mb, rt_ubase_t *value, rt_int32_t timeout); /* 5.0.0 */
rt_err_t rt_mb_recv_killable(rt_mailbox_t mb, rt_ubase_t *value, rt_int32_t timeout); /* 5.0.0 */
rt_err_t rt_mq_send_interrupt(rt_mq_t mq, const void *buffer, rt_size_t size); /* 5.0.0 */
rt_err_t rt_mq_send_killable(rt_mq_t mq, const void *buffer, rt_size_t size); /* 5.0.0 */
rt_err_t rt_mq_send_wait_interruptible(rt_mq_t     mq,
                                    const void *buffer,
                                    rt_size_t   size,
                                    rt_int32_t  timeout); /* 5.0.0 */
rt_err_t rt_mq_send_wait_killable(rt_mq_t     mq,
                                const void *buffer,
                                rt_size_t   size,
                                rt_int32_t  timeout); /* 5.0.0 */
rt_err_t rt_mq_recv_interruptible(rt_mq_t    mq,
                                void      *buffer,
                                rt_size_t  size,
                                rt_int32_t timeout); /* 5.0.0 */
rt_err_t rt_mq_recv_killable(rt_mq_t    mq,
                            void      *buffer,
                            rt_size_t  size,
                            rt_int32_t timeout); /* 5.0.0 */


/* ----- object.c ----- */
rt_object_t rt_custom_object_create(const char *name, void *data, rt_err_t (*data_destroy)(void *)) /* 5.0.0 */
rt_err_t rt_custom_object_destroy(rt_object_t obj) /* 5.0.0 */
copymistakeCopy Success
/* ----- device.c ----- */
rt_ssize_t rt_device_read(rt_device_t dev,
                         rt_off_t    pos,
                         void       *buffer,
                         rt_size_t   size) /* 5.0.0 */
rt_size_t  rt_device_read(rt_device_t dev,
                         rt_off_t    pos,
                         void       *buffer,
                         rt_size_t   size) /* 4.1.1 */

rt_ssize_t rt_device_write(rt_device_t dev,
                          rt_off_t    pos,
                          const void *buffer,
                          rt_size_t   size); /* 5.0.0 */
rt_size_t  rt_device_write(rt_device_t dev,
                          rt_off_t    pos,
                          const void *buffer,
                          rt_size_t   size); /* 4.1.1 */


/* ----- irq.c ----- */
rt_weak void rt_interrupt_enter(void) /* 5.0.0 */
        void rt_interrupt_enter(void) /* 4.1.1 */

rt_weak void rt_interrupt_leave(void) /* 5.0.0 */
        void rt_interrupt_leave(void) /* 4.1.1 */

rt_weak rt_uint8_t rt_interrupt_get_nest(void) /* 5.0.0 */
        rt_uint8_t rt_interrupt_get_nest(void) /* 4.1.1 */
copymistakeCopy Success

Compared to 4.1.1-beta, the kernel API has not changed.

/* ----- kservice.c ----- */
RT_WEAK void rt_hw_us_delay(rt_uint32_t us) /* 4.1.1-beta */
const char *rt_strerror(rt_err_t error)     /* 4.1.1-beta */copymistakeCopy Success

Organize memory-related files and APIs, and put all memory APIs used by users into kservice.c. Specifically:

When users use memory-related APIs, they usually choose one of the three management algorithms: mem.c (small mem), memheap.c, and slab.c. These three files provide the same API to users. 4.1.0 The APIs provided to users in these three files are unified into kservice.c.

Provide memory management algorithm API (such as rt_system_heap_init, rt_malloc, rt_free, etc.) in kservice.c, and add RT_WEAK modifier to facilitate users to select external memory management algorithm.

/* ----- clock.c ----- */
void rt_tick_sethook(void (*hook)(void)) /* 4.1.0 */


/* ----- kservice.c ----- */
char *rt_strcpy(char *dst, const char *src) /* 4.1.0 */
void rt_malloc_sethook(void (*hook)(void *ptr, rt_size_t size)) /* 4.1.0 */
void rt_free_sethook(void (*hook)(void *ptr)) /* 4.1.0 */
void *rt_page_alloc(rt_size_t npages) /* 4.1.0 */
void rt_page_free(void *addr, rt_size_t npages) /* 4.1.0 */


/* ----- memheap.c ----- */
void rt_memheap_info(struct rt_memheap *heap,
                     rt_size_t *total,
                     rt_size_t *used,
                     rt_size_t *max_used) /* 4.1.0 */copymistakeCopy Success
/* ----- thread.c ----- */
void rt_thread_timeout(void *parameter) /* 4.1.0 delete*/
copymistakeCopy Success
/* ----- kservice.c ----- */
RT_WEAK void *rt_memcpy(void *dst, const void *src, rt_ubase_t count) /* 4.1.0 */
        void *rt_memcpy(void *dst, const void *src, rt_ubase_t count) /* 4.0.4 */

void *rt_memmove(void *dest, const void *src,  rt_size_t n) /* 4.1.0 */
void *rt_memmove(void *dest, const void *src, rt_ubase_t n) /* 4.0.4 */

        rt_int32_t rt_memcmp(const void *cs, const void *ct,  rt_size_t count) /* 4.1.0 */
RT_WEAK rt_int32_t rt_memcmp(const void *cs, const void *ct, rt_ubase_t count) /* 4.0.4 */

char *rt_strncpy(char *dst, const char *src,  rt_size_t n) /* 4.1.0 */
char *rt_strncpy(char *dst, const char *src, rt_ubase_t n) /* 4.0.4 */

rt_int32_t rt_strncmp(const char *cs, const char *ct,  rt_size_t count) /* 4.1.0 */
rt_int32_t rt_strncmp(const char *cs, const char *ct, rt_ubase_t count) /* 4.0.4 */

RT_WEAK int rt_vsnprintf(char *buf,
                        rt_size_t size,
                        const char *fmt,
                        va_list args) /* 4.1.0 */
rt_int32_t  rt_vsnprintf(char       *buf,
                        rt_size_t   size,
                        const char *fmt,
                        va_list     args) /* 4.0.4 */

       int rt_snprintf(char *buf, rt_size_t size, const char *fmt, ...) /* 4.1.0 */
rt_int32_t rt_snprintf(char *buf, rt_size_t size, const char *fmt, ...) /* 4.0.4 */

       int rt_vsprintf(char *buf, const char *format, va_list arg_ptr) /* 4.1.0 */
rt_int32_t rt_vsprintf(char *buf, const char *format, va_list arg_ptr) /* 4.0.4 */

       int rt_sprintf(char *buf, const char *format, ...) /* 4.1.0 */
rt_int32_t rt_sprintf(char *buf, const char *format, ...) /* 4.0.4 */

RT_WEAK  int rt_kprintf(const char *fmt, ...) /* 4.1.0 */
RT_WEAK void rt_kprintf(const char *fmt, ...) /* 4.0.4 */


/* ----- 以下内存相关 API 增加 RT_WEAK 修饰,以便用户使用外部内存管理算法 ----- */
RT_WEAK void  rt_system_heap_init(void *begin_addr, void *end_addr) /* 4.1.0 */
RT_WEAK void *rt_malloc(rt_size_t size) /* 4.1.0 */
RT_WEAK void *rt_realloc(void *rmem, rt_size_t newsize) /* 4.1.0 */
RT_WEAK void *rt_calloc(rt_size_t count, rt_size_t size) /* 4.1.0 */
RT_WEAK void  rt_free(void *rmem) /* 4.1.0 */
RT_WEAK void  rt_memory_info(rt_size_t *total,
                             rt_size_t *used,
                             rt_size_t *max_used) /* 4.1.0 */copymistakeCopy Success
/* ----- idle.c ----- */
void rt_thread_defunct_enqueue(rt_thread_t thread) /* 4.0.4 */
rt_thread_t rt_thread_defunct_dequeue(void) /* 4.0.4 */


/* ----- ipc.c ----- */
rt_err_t rt_mutex_trytake(rt_mutex_t mutex) /* 4.0.4 */
rt_err_t rt_mb_urgent(rt_mailbox_t mb, rt_ubase_t value) /* 4.0.4 */


/* ----- scheduler.c ----- */
void rt_scheduler_switch_sethook(void (*hook)(struct rt_thread *tid)) /* 4.0.4 */copymistakeCopy Success
/* ----- device.c ----- */
rt_err_t rt_device_init_all(void) /* 4.0.4 delete */copymistakeCopy Success
/* ----- idle.c ----- */
/* 函数名变更,并使用 static 修饰 */
static void rt_defunct_execute(void)     /* 4.0.4 */
       void rt_thread_idle_excute(void)  /* 4.0.3 */


/* ----- kservice.c, 增加 RT_WEAK 修饰 ----- */
RT_WEAK void *rt_memset(void *s, int c, rt_ubase_t count) /* 4.0.4 */
        void *rt_memset(void *s, int c, rt_ubase_t count) /* 4.0.3 */

RT_WEAK rt_int32_t rt_memcmp(const void *cs, const void *ct, rt_ubase_t count) /* 4.0.4 */
        rt_int32_t rt_memcmp(const void *cs, const void *ct, rt_ubase_t count) /* 4.0.3 */

RT_WEAK void rt_kprintf(const char *fmt, ...) /* 4.0.4 */
        void rt_kprintf(const char *fmt, ...) /* 4.0.3 */

RT_WEAK void *rt_malloc_align(rt_size_t size, rt_size_t align) /* 4.0.4 */
        void *rt_malloc_align(rt_size_t size, rt_size_t align) /* 4.0.3 */

RT_WEAK void rt_free_align(void *ptr) /* 4.0.4 */
        void rt_free_align(void *ptr) /* 4.0.3 */


/* ----- thread.c ----- */
static void   _thread_exit(void) /* 4.0.4 */
       void rt_thread_exit(void) /* 4.0.3 */copymistakeCopy Success
/* ----- clock.c ----- */
RT_WEAK rt_tick_t rt_tick_get_millisecond(void) /* 4.0.3 */


/* ----- memheap.c ----- */
void rt_memory_info(rt_uint32_t *total,
                    rt_uint32_t *used,
                    rt_uint32_t *max_used) /* 4.0.3 */


/* ----- object.c ----- */
int rt_object_get_length(enum rt_object_class_type type) /* 4.0.3 */
int rt_object_get_pointers(enum rt_object_class_type type, rt_object_t *pointers, int maxlen) /* 4.0.3 */copymistakeCopy Success
/* ----- clock.c ----- */
void rt_system_tick_init(void) /* 4.0.3 delete */


/* ----- object.c ----- */
void rt_system_object_init(void) /* 4.0.3 delete */copymistakeCopy Success
/* ----- kservice.c ----- */
rt_int32_t  rt_strcasecmp(const char *a, const char *b)  /* 4.0.3 */
rt_uint32_t rt_strcasecmp(const char *a, const char *b)  /* 4.0.2 */copymistakeCopy Success
/* ----- ipc.c ----- */
rt_err_t rt_mq_send_wait(rt_mq_t     mq,
                         const void *buffer,
                         rt_size_t   size,
                         rt_int32_t  timeout) /* 4.0.2 */


/* ----- thread.c ----- */
rt_err_t rt_thread_delay_until(rt_tick_t *tick, rt_tick_t inc_tick)copymistakeCopy Success
/* ----- ipc.c ----- */
rt_err_t rt_mq_urgent(rt_mq_t mq, const void *buffer, rt_size_t size) /* 4.0.2 */
rt_err_t rt_mq_urgent(rt_mq_t mq,       void *buffer, rt_size_t size) /* 4.0.1 */


/* ----- irq.c ----- */
RT_WEAK rt_uint8_t rt_interrupt_get_nest(void) /* 4.0.2 */
        rt_uint8_t rt_interrupt_get_nest(void) /* 4.0.1 */copymistakeCopy Success
/* ----- clock.c ----- */
rt_tick_t rt_tick_from_millisecond(rt_int32_t ms) /* 4.0.1 */
      int rt_tick_from_millisecond(rt_int32_t ms) /* 4.0.0 */copymistakeCopy Success
/* ----- ipc.c ----- */
rt_err_t rt_mb_send(rt_mailbox_t mb,  rt_ubase_t value)  /* 4.0.0 */
rt_err_t rt_mb_send(rt_mailbox_t mb, rt_uint32_t value) /* 3.1.1 */

rt_err_t rt_mb_recv(rt_mailbox_t mb,  rt_ubase_t *value, rt_int32_t timeout) /* 4.0.0 */
rt_err_t rt_mb_recv(rt_mailbox_t mb, rt_uint32_t *value, rt_int32_t timeout) /* 3.1.1 */


/* ----- memheap.c ----- */
rt_err_t rt_memheap_init(struct rt_memheap *memheap,
                         const char        *name,
                         void              *start_addr,
                         rt_size_t         size) /* 4.0.0 */
rt_err_t rt_memheap_init(struct rt_memheap *memheap,
                         const char        *name,
                         void              *start_addr,
                         rt_uint32_t        size) /* 3.1.1 */

void *rt_memheap_alloc(struct rt_memheap *heap,  rt_size_t size)  /* 4.0.0 */
void *rt_memheap_alloc(struct rt_memheap *heap, rt_uint32_t size) /* 3.1.1 */copymistakeCopy Success

Click to view

🤟
5.0.1
API additions:
API changes:
5.0.0
API additions:
API changes:
4.1.1
4.1.1-beta
API additions:
4.1.0
API additions:
API Removal:
API changes:
4.0.4
API additions:
API Removal:
API changes:
4.0.3
API additions:
API Removal:
API changes:
4.0.2
API additions:
API changes:
4.0.1
API changes:
4.0.0
API changes:
3.1.1
the API reference manual for version V3.1.1