diff --git a/en/application-dev/reference/apis/js-apis-data-distributedobject.md b/en/application-dev/reference/apis/js-apis-data-distributedobject.md
index 6670e2eefaea1bd07d85083bf5436833613f998e..5ac7b6707c3afd30d7ccc6ae966fdf99439bd697 100644
--- a/en/application-dev/reference/apis/js-apis-data-distributedobject.md
+++ b/en/application-dev/reference/apis/js-apis-data-distributedobject.md
@@ -1,6 +1,6 @@
# Distributed Data Object
->  **NOTE**
+>  **NOTE**
> The initial APIs of this module are supported since API version 8. Newly added APIs will be marked with a superscript to indicate their earliest API version.
@@ -26,7 +26,7 @@ Creates a distributed data object.
| -------- | -------- | -------- | -------- |
| source | object | Yes| Attribute of the distributed data object to create.|
-**Return Value**
+**Return value**
| Type| Description|
| -------- | -------- |
| [DistributedObject](#distributedobject) | Distributed data object created.|
@@ -34,7 +34,7 @@ Creates a distributed data object.
**Example**
```js
import distributedObject from '@ohos.data.distributedDataObject'
- // Create a distributedObject instance. The attribute type of the object can be string, number, boolean, or Object.
+ // Create a distributed data object, which contains attributes of four types, namely, string, number, boolean, and object.
var g_object = distributedObject.createDistributedObject({name:"Amy", age:18, isVis:false,
parent:{mother:"jack mom",father:"jack Dad"}});
```
@@ -48,7 +48,7 @@ Creates a random session ID.
**System capability**: SystemCapability.DistributedDataManager.DataObject.DistributedObject
-**Return Value**
+**Return value**
| Type| Description|
| -------- | -------- |
| string | Session ID created.|
@@ -62,7 +62,7 @@ Creates a random session ID.
## DistributedObject
-Represents a **distributedObject** instance.
+Represents a distributed data object.
### setSessionId
@@ -78,7 +78,7 @@ Sets a session ID for synchronization. Automatic synchronization is performed fo
| -------- | -------- | -------- | -------- |
| sessionId | string | No| ID of a distributed data object on a trusted network. To remove a distributed data object from the network, set this parameter to "" or leave it empty.|
-**Return Value**
+**Return value**
| Type| Description|
| -------- | -------- |
@@ -101,15 +101,15 @@ Sets a session ID for synchronization. Automatic synchronization is performed fo
on(type: 'change', callback: Callback<{ sessionId: string, fields: Array<string> }>): void
-Subscribes to the data changes of this distributed data object.
+Subscribes to the changes of this distributed data object.
**System capability**: SystemCapability.DistributedDataManager.DataObject.DistributedObject
**Parameters**
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
- | type | string | Yes| Event type to subscribe to. The value is **change**, which indicates data change events.|
- | callback | Callback<{ sessionId: string, fields: Array<string> }> | Yes| Callback used to return the changes of the distributed data object.
**sessionId** indicates the session ID of the distributed data object.
**fields** indicates the attributes of the distributed data object changed.|
+ | type | string | Yes| Event type to subscribe to. The value is **change**, which indicates data changes.|
+ | callback | Callback<{ sessionId: string, fields: Array<string> }> | Yes| Callback used to return the changes of the distributed data object.
**sessionId** indicates the session ID of the distributed data object.
**fields** indicates the changed attributes of the distributed data object.|
**Example**
```js
@@ -130,15 +130,15 @@ Subscribes to the data changes of this distributed data object.
off(type: 'change', callback?: Callback<{ sessionId: string, fields: Array<string> }>): void
-Unsubscribes from the data changes of this distributed data object.
+Unsubscribes from the changes of this distributed data object.
**System capability**: SystemCapability.DistributedDataManager.DataObject.DistributedObject
**Parameters**
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
- | type | string | Yes| Event type to subscribe to. The value is **change**, which indicates data change events.|
- | callback | Callback<{ sessionId: string, fields: Array<string> }> | No| Callback used to return changes of the distributed data object. If this parameter is not specified, all callbacks related to data changes will be unregistered.
**sessionId** indicates the session ID of the distributed data object.
**fields** indicates the attributes of the distributed data object changed.|
+ | type | string | Yes| Event type to unsubscribe from. The value is **change**, which indicates data changes.|
+ | callback | Callback<{ sessionId: string, fields: Array<string> }> | No| Callback used to return the changes of the distributed data object. If this parameter is not specified, this API unsubscribes from all callbacks for data changes of this distributed data object.
**sessionId** indicates the session ID of the distributed data object.
**fields** indicates the changed attributes of the distributed data object.|
**Example**
@@ -149,11 +149,11 @@ Unsubscribes from the data changes of this distributed data object.
g_object.on("change", function (sessionId, changeData) {
console.info("change" + sessionId);
});
- // Unsubscribe from the data change callback for the specified distributed data object.
+ // Unsubscribe from the specified data change callback for the distributed data object.
g_object.off("change", function (sessionId, changeData) {
console.info("change" + sessionId);
});
- // Unsubscribe from all data change callbacks.
+ // Unsubscribe from all data change callbacks for the distributed data object.
g_object.off("change");
```
@@ -161,15 +161,15 @@ Unsubscribes from the data changes of this distributed data object.
on(type: 'status', callback: Callback<{ sessionId: string, networkId: string, status: 'online' | 'offline' }>): void
-Subscribes to the status changes (online or offline) of this distributed data object.
+Subscribes to the status change (online or offline) of this distributed data object.
**System capability**: SystemCapability.DistributedDataManager.DataObject.DistributedObject
**Parameters**
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
- | type | string | Yes| Event type to subscribe to. The value is "status", which indicates the status (online or offline) change events.|
- | callback | Callback<{ sessionId: string, networkId: string, status: 'online' \| 'offline' }> | Yes| Callback used to return the online or offline status.
**sessionId** indicates the session ID of the distributed data object.
**networkId** indicates the network ID of the device.
**status** indicates the status, which can be online or offline.|
+ | type | string | Yes| Event type to subscribe to. The value is **status**, which indicates the change in the status (online or offline) of the distributed data object.|
+ | callback | Callback<{ sessionId: string, networkId: string, status: 'online' \| 'offline' }> | Yes| Callback used to return the status change.
**sessionId** indicates the session ID of the distributed data object.
**networkId** indicates the network ID of the device.
**status** indicates the status, which can be online or offline.|
**Example**
```js
@@ -186,15 +186,15 @@ Subscribes to the status changes (online or offline) of this distributed data ob
off(type: 'status', callback?: Callback<{ sessionId: string, deviceId: string, status: 'online' | 'offline' }>): void
-Unsubscribes from the status (online or offline) changes of the distributed data object.
+Unsubscribes from the status change (online or offline) of this distributed data object.
**System capability**: SystemCapability.DistributedDataManager.DataObject.DistributedObject
**Parameters**
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
- | type | string | Yes| Event type to subscribe to. The value is "status", which indicates the status (online or offline) change events.|
- | callback | Callback<{ sessionId: string, deviceId: string, status: 'online' \| 'offline' }> | No| Callback used to return the status changes. If this parameter is not specified, all the status change callbacks will be unregistered.
**sessionId** indicates the session ID of the distributed data object.
**deviceId** indicates the device ID of the distributed data object.
**status** indicates the status, which can be online or offline.|
+ | type | string | Yes| Event type to unsubscribe from. The value is **status**, which indicates the change in the status (online or offline) of the distributed data object.|
+ | callback | Callback<{ sessionId: string, deviceId: string, status: 'online' \| 'offline' }> | No| Callback used to return the status change. If this parameter is not specified, this API unsubscribes from all callbacks of this distributed data object.
**sessionId** indicates the session ID of the distributed data object.
**deviceId** indicates the device ID of the distributed data object.
**status** indicates the status, which can be online or offline.|
**Example**
@@ -203,10 +203,10 @@ Unsubscribes from the status (online or offline) changes of the distributed data
g_object.on("status", function (sessionId, networkId, status) {
this.response += "status changed " + sessionId + " " + status + " " + networkId;
});
- // Unsubscribe from the status change callback for the specified distributed data object.
+ // Unsubscribe from the specified status change callback for the distributed data object.
g_object.off("status", function (sessionId, networkId, status) {
this.response += "status changed " + sessionId + " " + status + " " + networkId;
});
- // Unsubscribe from all status change callbacks.
+ // Unsubscribe from all status change callbacks for the distributed data object.
g_object.off("status");
```
diff --git a/en/application-dev/reference/apis/js-apis-data-rdb.md b/en/application-dev/reference/apis/js-apis-data-rdb.md
index 5a688b89db49c1d008e82a263024b45c6032bc40..73a87a94f29df9c506a2ea1b41dd7e5f69610e7b 100644
--- a/en/application-dev/reference/apis/js-apis-data-rdb.md
+++ b/en/application-dev/reference/apis/js-apis-data-rdb.md
@@ -1,10 +1,8 @@
# Relational Database
->  **NOTE**
+> **NOTE**
> The initial APIs of this module are supported since API version 7. Newly added APIs will be marked with a superscript to indicate their earliest API version.
-
-
## Modules to Import
```js
diff --git a/en/device-dev/faqs/faqs-startup.md b/en/device-dev/faqs/faqs-startup.md
index f3814ab7f9563ce24ec066e28bb864a972098344..cab83bad0559355247228160615a856826ccff9d 100644
--- a/en/device-dev/faqs/faqs-startup.md
+++ b/en/device-dev/faqs/faqs-startup.md
@@ -1,53 +1,141 @@
-# Startup
+# Startup
-## System startup interrupted due to "parse failed!" error
-**Problem**
+## System Startup Interrupted Due to "parse failed!" Error
-During system startup, the error message "\[Init\] InitReadCfg, parse failed! please check file /etc/init.cfg format." is displayed, and the startup is interrupted, as shown in the following figure.
+**Symptom**
-**Figure 1** Error information
-
+During system startup, the error message "[Init] InitReadCfg, parse failed! please check file /etc/init.cfg format." is displayed, and the startup is interrupted, as shown in the following figure.
-**Cause**
+ **Figure 1** Error information
-During the modification of the **init.cfg** file, required commas \(,\) or parentheses are missing or unnecessary ones are added. As a result, the file's JSON format becomes invalid.
+ 
+
+**Possible Cause**
+
+During modification of the **init.cfg** file, required commas (,) or parentheses are missing or unnecessary ones are added. As a result, the file's JSON format becomes invalid.
**Solution**
-Check the **init.cfg** file and ensure that its format meets the JSON specifications.
+Check the **init.cfg** file and ensure that its format meets the JSON specifications.
+
+
+## System Restarted Repeatedly
-## System automatically restarted again and again
+**Symptom**
-**Problem**
+After the image burning is complete, the system restarts over and over again.
-After the image burning is complete, the system keeps restarting.
+**Possible Cause**
-**Cause**
+Each service started by the init process has the **importance** attribute, as described in Table 3 in [init Module](../subsystems/subsys-boot-init.md).
-Each service started by the init process has the **importance** attribute, as described in Table 3 in init Module.
+- If the attribute value is **0**, the init process does not need to restart the development board when the current service process exits.
-- If the attribute value is **0**, the init process does not need to restart the development board when the current service process exits.
-- If the attribute value is **1**, the init process needs to restart the development board when the current service process exits.
+- If the attribute value is **1**, the init process needs to restart the development board when the current service process exits.
-During the startup of a service whose **importance** is **1**, if the service exits due to a process crash or an error, the init process automatically restarts the development board.
+During the startup of a service whose **importance** is **1**, if the service exits due to a process crash or an error, the init process automatically restarts the development board.
**Solution**
-1. View logs to identify the service that encounters a process crash or exits due to an error, rectify the issue, and then burn the image again.
-2. Alternatively, change the value of **importance** to **0** for the service that exits due to a process crash or an error, and then burn the image again. In this way, the development board will not be restarted even if the service exits.
+1. View logs to identify the service that encounters a process crash or exits due to an error, rectify the issue, and then burn the image again.
-## Failed to call the **SetParameter** or **GetParameter** API with correct parameter values
+2. Alternatively, change the value of **importance** to **0** for the service that exits due to a process crash or an error, and then burn the image again. In this way, the development board will not be restarted even if the service exits.
-**Problem**
-Calling the **SetParameter** or **GetParameter** API fails even if correct values are passed to all input parameters.
+## **SetParameter** or **GetParameter** Failed with Correct Parameters Passed
-**Cause**
+**Symptom**
-Permission verification has been enabled for the **SetParameter** and **GetParameter** APIs. If the UID of the caller is greater than 1000, that is, the caller does not have the permission to call these APIs, API calls will fail even if the parameters are correct.
+Calling **SetParameter** or **GetParameter** fails when correct parameters are passed.
+
+**Possible Cause**
+
+Permission verification has been enabled for **SetParameter** and **GetParameter**. If the UID of the caller is greater than **1000**, that is, the caller does not have the API call permission, calling an API will fail even if correct parameters are passed.
**Solution**
No action is required.
+
+## ueventd Service Failed to Obtain a Socket upon Startup
+
+**Symptom**
+
+After the ueventd service is started, the error message "Failed to get uevent socket, try to create" is displayed, and the error information as shown in the following figure is logged.
+
+ **Figure 2** Failure to obtain a socket
+
+ 
+
+**Possible Cause**
+
+The ueventd service is started on demand. Upon startup, it first needs to check the environment variables for **fd** of the socket created by the init process. The preceding error information will be displayed if the ueventd service fails to obtain environment variables. The possible causes are as follows:
+1. No socket has been configured for the ueventd service in the **.cfg** file. As a result, the init process does not create a socket for the ueventd service, and no socket ID is present in environment variables.
+2. If a socket has been configured for the ueventd service in the **.cfg** file, it is probable that the ueventd service is also configured in another **.cfg** file but no socket is designated for it.
+
+**Solution**
+
+For case 1, configure a socket for the ueventd service in the **.cfg** file. For details, see [Development Guidelines](https://gitee.com/openharmony/docs/blob/master/en/device-dev/subsystems/subsys-boot-init.md#development-guidelines).
+
+For case 2, check all **.cfg** files for any duplicate ueventd service and delete it. Retain only one ueventd service with valid configuration.
+
+
+## ueventd Service Exits Because of a Socket Polling Timeout
+
+**Symptom**
+
+After the ueventd service is started for a period of time, the error message "poll ueventd socket timeout, ueventd exit" is displayed and the ueventd service automatically exits.
+
+**Possible Causes**
+
+The ueventd service is started on demand. When a uevent is reported, the init process receives a socket message and starts the ueventd service to process the message. After processing the message, the ueventd service polls the corresponding socket handle for 30s. If a new socket message is reported within this period of time, the ueventd service continues to process the message. After processing the message, the ueventd service polls the socket handle for 30s once again. If no new socket message is reported within this period of time, the ueventd service exits and returns the socket to the init process for polling. In this case, the preceding error message is displayed.
+
+**Solution**
+
+This is a normal phenomenon and no action is required.
+
+
+## Service with the ondemand Attribute Failed to Start Because of a Configuration Parsing Error
+
+**Symptom**
+
+The service configuration in JSON format cannot be correctly parsed, and the error message "Service is invalid which has both critical and ondemand attribute" is displayed. When the service is started, the error message "Cannot find service" is displayed.
+
+**Possible Cause**
+
+The service configuration is not in the JSON format. This can result in a **.cfg** file parsing error, leading to a service parsing failure. For a service configured with the **ondemand** attribute, the **critical** attribute is set to **1**, or the first value in the **critical** attribute array is set to **1**. When the **ondemand** attribute is configured, the service is started on demand by default. The service exits when it is idle. However, when the **critical** attribute is configured, the service is regarded as a critical system service and is not allowed to exit. Therefore, a conflict occurs if both attributes are configured the same service.
+
+**Solution**
+
+Check whether the service needs to be started on demand. If not, do not configure the **ondemand** attribute. If yes, do not configure the **critical** attribute along with the **ondemand** attribute. To limit the number of times that a critical service exits abnormally, set the first value in the **critical** attribute array to **0** and then add a limitation on the exit times. For example, **"critical": [0, 15, 5]** means that, if a service exits for more than 15 times within 5s, the service will not be started and the system will not be restarted.
+
+
+## Parallel Startup Is Not Effective for Services Configured with the ondemand Attribute
+
+**Symptom**
+
+Services configured with the **ondemand** attribute are not started in the parallel startup phase, regardless of whether **start-mode** is set to **boot**, **normal**, or the default value.
+
+**Possible Cause**
+
+Services configured with the **ondemand** attribute are started only when the startup conditions are met. Therefore, parallel startup is not effective for these services.
+
+**Solution**
+
+If you want to add a service to parallel startup, do not configure the **ondemand** attribute for it.
+
+
+## SA Services Cannot Be Started on Demand
+
+**Symptom**
+
+When an SA service is configured with the **ondemand** attribute, the samgr process does not start the SA service after the SA client sends a request.
+
+**Possible Cause**
+
+At the initial implementation of on-demand startup, **SystemAbilityManager::CheckSystemAbility(int32_t systemAbilityId)** is used for all SA services. To distinguish SA services that are started on demand, **LoadSystemAbility(int32_t systemAbilityId, const sptr& callback)** provided by the samgr process is added. If an SA service is not started on demand, it is probable that the original API is used by mistake.
+
+**Solution**
+
+Use **LoadSystemAbility(int32_t systemAbilityId, const sptr& callback)** for any SA service that needs to be started on demand.
diff --git a/en/device-dev/kernel/Readme-EN.md b/en/device-dev/kernel/Readme-EN.md
index 87197a93f35151ec462438d991ac14185da1115d..3d8321373b9c1c0b873ad0833b5f3e0fe3b059a8 100644
--- a/en/device-dev/kernel/Readme-EN.md
+++ b/en/device-dev/kernel/Readme-EN.md
@@ -1,181 +1,184 @@
# Kernel
-- [Kernel for Mini Systems](kernel-mini.md)
- - [Kernel Overview](kernel-mini-overview.md)
- - [Basic Kernel](kernel-mini-basic.md)
- - [Interrupt Management](kernel-mini-basic-interrupt.md)
- - [Task Management](kernel-mini-basic-task.md)
- - [Memory Management](kernel-mini-basic-memory.md)
- - [Basic Concepts](kernel-mini-basic-memory-basic.md)
- - [Static Memory](kernel-mini-basic-memory-static.md)
- - [Dynamic Memory](kernel-mini-basic-memory-dynamic.md)
- - [Kernel Communication Mechanisms](kernel-mini-basic-ipc.md)
- - [Event](kernel-mini-basic-ipc-event.md)
- - [Mutex](kernel-mini-basic-ipc-mutex.md)
- - [Queue](kernel-mini-basic-ipc-queue.md)
- - [Semaphore](kernel-mini-basic-ipc-sem.md)
- - [Time Management](kernel-basic-mini-time.md)
- - [Software Timer](kernel-mini-basic-soft.md)
- - [Extended Components](kernel-mini-extend.md)
- - [C++ Support](kernel-mini-extend-support.md)
- - [CPUP](kernel-mini-extend-cpup.md)
- - [Dynamic Loading](kernel-mini-extend-dynamic-loading.md)
- - [File System](kernel-mini-extend-file.md)
- - [FAT](kernel-mini-extend-file-fat.md)
- - [LittleFS](kernel-mini-extend-file-lit.md)
- - [Kernel Debugging](kernel-mini-debug.md)
- - [Memory Debugging](kernel-mini-memory-debug.md)
- - [Memory Information Statistics](kernel-mini-memory-debug-mes.md)
- - [Memory Leak Check](kernel-mini-imemory-debug-det.md)
- - [Memory Corruption Check](kernel-mini-memory-debug-cet.md)
- - [Exception Debugging](kernel-mini-memory-exception.md)
- - [Trace](kernel-mini-memory-trace.md)
- - [LMS](kernel-mini-memory-lms.md)
- - [Appendix](kernel-mini-app.md)
- - [Kernel Coding Specification](kernel-mini-appx-code.md)
- - [Basic Data Structure](kernel-mini-appx-data.md)
- - [Doubly Linked List](kernel-mini-appx-data-list.md)
- - [Standard Libraries](kernel-mini-appx-lib.md)
- - [CMSIS Support](kernel-mini-appx-lib-cmsis.md)
- - [POSIX Support](kernel-mini-appx-lib-posix.md)
-- [Kernel for Small Systems](kernel-small.md)
- - [Kernel Overview](kernel-small-overview.md)
- - [Kernel Startup](kernel-small-start.md)
- - [Startup in Kernel Space](kernel-small-start-kernel.md)
- - [Startup in User Space](kernel-small-start-user.md)
- - [Basic Kernel](kernel-small-basics.md)
- - [Interrupt and Exception Handling](kernel-small-basic-interrupt.md)
- - [Process Management](kernel-small-basic-process.md)
- - [Process](kernel-small-basic-process-process.md)
- - [Task](kernel-small-basic-process-thread.md)
- - [Scheduler](kernel-small-basic-process-scheduler.md)
- - [Memory Management](kernel-small-basic-memory.md)
- - [Heap Memory Management](kernel-small-basic-memory-heap.md)
- - [Physical Memory Management](kernel-small-basic-memory-physical.md)
- - [Virtual Memory Management](kernel-small-basic-memory-virtual.md)
- - [Virtual-to-Physical Mapping](kernel-small-basic-inner-reflect.md)
- - [Kernel Communication Mechanisms](kernel-small-basic-trans.md)
- - [Event](kernel-small-basic-trans-event.md)
- - [Semaphore](kernel-small-basic-trans-semaphore.md)
- - [Mutex](kernel-small-basic-trans-mutex.md)
- - [Queue](kernel-small-basic-trans-queue.md)
- - [RW Lock](kernel-small-basic-trans-rwlock.md)
- - [Futex](kernel-small-basic-trans-user-mutex.md)
- - [Signal](kernel-small-basic-trans-user-signal.md)
- - [Time Management](kernel-small-basic-time.md)
- - [Software Timer](kernel-small-basic-softtimer.md)
- - [Atomic Operation](kernel-small-basic-atomic.md)
- - [Extension Components](kernel-small-bundles.md)
- - [System Call](kernel-small-bundles-system.md)
- - [Dynamic Loading and Linking](kernel-small-bundles-linking.md)
- - [Virtual Dynamic Shared Object](kernel-small-bundles-share.md)
- - [LiteIPC](kernel-small-bundles-ipc.md)
- - [File Systems](kernel-small-bundles-fs.md)
- - [Virtual File System](kernel-small-bundles-fs-virtual.md)
- - [Supported File Systems](kernel-small-bundles-fs-support.md)
- - [FAT](kernel-small-bundles-fs-support-fat.md)
- - [JFFS2](kernel-small-bundles-fs-support-jffs2.md)
- - [NFS](kernel-small-bundles-fs-support-nfs.md)
- - [Ramfs](kernel-small-bundles-fs-support-ramfs.md)
- - [procfs](kernel-small-bundles-fs-support-procfs.md)
- - [File System Adaptation](kernel-small-bundles-fs-new.md)
- - [Debugging and Tools](kernel-small-debug.md)
- - [Shell](kernel-small-debug-shell.md)
- - [Introduction to the Shell](kernel-small-debug-shell-overview.md)
- - [Shell Command Development Guidelines](kernel-small-debug-shell-guide.md)
- - [Shell Command Programming Example](kernel-small-debug-shell-build.md)
- - [Shell Command Reference](kernel-small-debug-shell-details.md)
- - [System Commands](kernel-small-debug-shell-cmd.md)
- - [cpup](kernel-small-debug-shell-cmd-cpup.md)
- - [date](kernel-small-debug-shell-cmd-date.md)
- - [dmesg](kernel-small-debug-shell-cmd-dmesg.md)
- - [exec](kernel-small-debug-shell-cmd-exec.md)
- - [free](kernel-small-debug-shell-cmd-free.md)
- - [help](kernel-small-debug-shell-cmd-help.md)
- - [hwi](kernel-small-debug-shell-cmd-hwi.md)
- - [kill](kernel-small-debug-shell-cmd-kill.md)
- - [log](kernel-small-debug-shell-cmd-log.md)
- - [memcheck](kernel-small-debug-shell-cmd-memcheck.md)
- - [oom](kernel-small-debug-shell-cmd-oom.md)
- - [pmm](kernel-small-debug-shell-cmd-pmm.md)
- - [reset](kernel-small-debug-shell-cmd-reset.md)
- - [sem](kernel-small-debug-shell-cmd-sem.md)
- - [stack](kernel-small-debug-shell-cmd-stack.md)
- - [su](kernel-small-debug-shell-cmd-su.md)
- - [swtmr](kernel-small-debug-shell-cmd-swtmr.md)
- - [systeminfo](kernel-small-debug-shell-cmd-sysinfo.md)
- - [task](kernel-small-debug-shell-cmd-task.md)
- - [uname](kernel-small-debug-shell-cmd-uname.md)
- - [vmm](kernel-small-debug-shell-cmd-vmm.md)
- - [watch](kernel-small-debug-shell-cmd-watch.md)
- - [File Commands](kernel-small-debug-shell-file.md)
- - [cat](kernel-small-debug-shell-file-cat.md)
- - [cd](kernel-small-debug-shell-file-cd.md)
- - [chgrp](kernel-small-debug-shell-file-chgrp.md)
- - [chmod](kernel-small-debug-shell-file-chmod.md)
- - [chown](kernel-small-debug-shell-file-chown.md)
- - [cp](kernel-small-debug-shell-file-cp.md)
- - [format](kernel-small-debug-shell-file-format.md)
- - [ls](kernel-small-debug-shell-file-ls.md)
- - [lsfd](kernel-small-debug-shell-file-lsfd.md)
- - [mkdir](kernel-small-debug-shell-file-mkdir.md)
- - [mount](kernel-small-debug-shell-file-mount.md)
- - [partinfo](kernel-small-debug-shell-file-partinfo.md)
- - [partition](kernel-small-debug-shell-file-partition.md)
- - [pwd](kernel-small-debug-shell-file-pwd.md)
- - [rm](kernel-small-debug-shell-file-rm.md)
- - [rmdir](kernel-small-debug-shell-file-rmdir.md)
- - [statfs](kernel-small-debug-shell-file-statfs.md)
- - [sync](kernel-small-debug-shell-file-sync.md)
- - [touch](kernel-small-debug-shell-file-touch.md)
- - [writeproc](kernel-small-debug-shell-file-write.md)
- - [umount](kernel-small-debug-shell-file-umount.md)
- - [Network Commands](kernel-small-debug-shell-net.md)
- - [arp](kernel-small-debug-shell-net-arp.md)
- - [dhclient](kernel-small-debug-shell-net-dhclient.md)
- - [ifconfig](kernel-small-debug-shell-net-ifconfig.md)
- - [ipdebug](kernel-small-debug-shell-net-ipdebug.md)
- - [netstat](kernel-small-debug-shell-net-netstat.md)
- - [ntpdate](kernel-small-debug-shell-net-ntpdate.md)
- - [ping](kernel-small-debug-shell-net-ping.md)
- - [ping6](kernel-small-debug-shell-net-ping6.md)
- - [telnet](kernel-small-debug-shell-net-telnet.md)
- - [tftp](kernel-small-debug-shell-net-tftp.md)
- - [Magic Key](kernel-small-debug-shell-magickey.md)
- - [User-Space Exception Information](kernel-small-debug-shell-error.md)
- - [Trace](kernel-small-debug-trace.md)
- - [perf](kernel-mini-memory-perf.md)
- - [LMS](kernel-small-memory-lms.md)
- - [Process Commissioning](kernel-small-debug-process.md)
- - [CPUP](kernel-small-debug-process-cpu.md)
- - [Memory Debugging](kernel-small-debug-memory.md)
- - [Memory Information Statistics](kernel-small-debug-memory-info.md)
- - [Memory Leak Check](kernel-small-debug-memory-leak.md)
- - [Memory Corruption Check](kernel-small-debug-memory-corrupt.md)
- - [User-Mode Memory Debugging](kernel-small-debug-user.md)
- - [Basic Concepts](kernel-small-debug-user-concept.md)
- - [Working Principles](kernel-small-debug-user-function.md)
- - [Usage](kernel-small-debug-user-guide.md)
- - [API Description](kernel-small-debug-user-guide-api.md)
- - [How to Use](kernel-small-debug-user-guide-use.md)
- - [Calling APIs](kernel-small-debug-user-guide-use-api.md)
- - [Using the CLI](kernel-small-debug-user-guide-use-cli.md)
- - [Typical Memory Problems](kernel-small-debug-user-faqs.md)
- - [Other Kernel Debugging Methods](kernel-small-debug-other.md)
- - [Dying Gasp](kernel-small-debug-trace-other-lastwords.md)
- - [Common Fault Locating Methods](kernel-small-debug-trace-other-faqs.md)
- - [Appendix](kernel-small-apx.md)
- - [Basic Data Structure](kernel-small-apx-structure.md)
- - [Doubly Linked List](kernel-small-apx-dll.md)
- - [Bitwise Operation](kernel-small-apx-bitwise.md)
- - [Standard Library](kernel-small-apx-library.md)
-
-- [Kernel for Standard Systems](kernel-standard.md)
- - [Linux Kernel Overview](kernel-standard-overview.md)
- - [Applying Patches on Development Boards](kernel-standard-patch.md)
- - [Compiling and Building the Linux Kernel](kernel-standard-build.md)
- - [Enhanced Kernel Features](kernel-standard-enhanced-features.md)
- - [Enhanced SWAP](kernel-standard-mm-eswap.md)
- - [Task Scheduling](kernel-standard-sched.md)
- - [Related Thread Group](kernel-standard-sched-rtg.md)
- - [Lightweight CPU Isolation](kernel-standard-sched-cpuisolation.md)
\ No newline at end of file
+- Kernel
+ - Mini-System Kernel
+ - [Kernel Overview](kernel-mini-overview.md)
+ - Basic Kernel
+ - [Interrupt Management](kernel-mini-basic-interrupt.md)
+ - [Task Management](kernel-mini-basic-task.md)
+ - Memory Management
+ - [Basic Concepts](kernel-mini-basic-memory-basic.md)
+ - [Static Memory](kernel-mini-basic-memory-static.md)
+ - [Dynamic Memory](kernel-mini-basic-memory-dynamic.md)
+ - Kernel Communication Mechanisms
+ - [Event](kernel-mini-basic-ipc-event.md)
+ - [Mutex](kernel-mini-basic-ipc-mutex.md)
+ - [Queue](kernel-mini-basic-ipc-queue.md)
+ - [Semaphore](kernel-mini-basic-ipc-sem.md)
+ - [Time Management](kernel-basic-mini-time.md)
+ - [Software Timer](kernel-mini-basic-soft.md)
+ - Extended Components
+ - [C++ Support](kernel-mini-extend-support.md)
+ - [PUP](kernel-mini-extend-cpup.md)
+ - [Dynamic Loading](kernel-mini-extend-dynamic-loading.md)
+ - [File System](kernel-mini-extend-file.md)
+ - [FAT](kernel-mini-extend-file-fat.md)
+ - [LittleFS](kernel-mini-extend-file-lit.md)
+ - Kernel Debugging
+ - [Memory Debugging](kernel-mini-memory-debug.md)
+ - [Memory Information Statistics](kernel-mini-memory-debug-mes.md)
+ - [Memory Leak Check](kernel-mini-imemory-debug-det.md)
+ - [Memory Corruption Check](kernel-mini-memory-debug-cet.md)
+ - [Exception Debugging](kernel-mini-memory-exception.md)
+ - [Trace](kernel-mini-memory-trace.md)
+ - [LMS](kernel-mini-memory-lms.md)
+ - Appendix
+ - [Kernel Coding Specification](kernel-mini-appx-code.md)
+ - [Doubly Linked List](kernel-mini-appx-data-list.md)
+ - Standard Libraries
+ - [CMSIS Support](kernel-mini-appx-lib-cmsis.md)
+ - [POSIX support](kernel-mini-appx-lib-posix.md)
+ - Small-System Kernel
+ - [Kernel Overview](kernel-small-overview.md)
+ - Kernel Startup
+ - [Startup in Kernel Space](kernel-small-start-kernel.md)
+ - [Startup in User Space](kernel-small-start-user.md)
+ - Basic Kernel
+ - [Interrupt and Exception Handling](kernel-small-basic-interrupt.md)
+ - Process Management
+ - [Process](kernel-small-basic-process-process.md)
+ - [Task](kernel-small-basic-process-thread.md)
+ - [Scheduler](kernel-small-basic-process-scheduler.md)
+ - Memory Management
+ - [Heap Memory Management](kernel-small-basic-memory-heap.md)
+ - [Physical Memory Management](kernel-small-basic-memory-physical.md)
+ - [Virtual Memory Management](kernel-small-basic-memory-virtual.md)
+ - [Virtual-to-Physical Mapping](kernel-small-basic-inner-reflect.md)
+ - Kernel Communication Mechanisms
+ - [Event](kernel-small-basic-trans-event.md)
+ - [Semaphore](kernel-small-basic-trans-semaphore.md)
+ - [Mutex](kernel-small-basic-trans-mutex.md)
+ - [Queue](kernel-small-basic-trans-queue.md)
+ - [RW Lock](kernel-small-basic-trans-rwlock.md)
+ - [Futex](kernel-small-basic-trans-user-mutex.md)
+ - [Signal](kernel-small-basic-trans-user-signal.md)
+ - [Time Management](kernel-small-basic-time.md)
+ - [Software Timer](kernel-small-basic-softtimer.md)
+ - [Atomic Operation](kernel-small-basic-atomic.md)
+ - Extension Components
+ - [System Call](kernel-small-bundles-system.md)
+ - [Dynamic Loading and Linking](kernel-small-bundles-linking.md)
+ - [Virtual Dynamic Shared Object](kernel-small-bundles-share.md)
+ - [LiteIPC](kernel-small-bundles-ipc.md)
+ - [File Systems](kernel-small-bundles-fs.md)
+ - [Virtual File System](kernel-small-bundles-fs-virtual.md)
+ - Supported File Systems
+ - [FAT](kernel-small-bundles-fs-support-fat.md)
+ - [JFFS2](kernel-small-bundles-fs-support-jffs2.md)
+ - [NFS](kernel-small-bundles-fs-support-nfs.md)
+ - [Ramfs](kernel-small-bundles-fs-support-ramfs.md)
+ - [Procfs](kernel-small-bundles-fs-support-procfs.md)
+ - [File System Adaptation](kernel-small-bundles-fs-new.md)
+ - Debugging and Tools
+ - Shell
+ - [Introduction to the Shell](kernel-small-debug-shell-overview.md)
+ - [Shell Command Development Guidelines](kernel-small-debug-shell-guide.md)
+ - [Shell Command Programming Example](kernel-small-debug-shell-build.md)
+ - Shell Command Reference
+ - System Commands
+ - [cpup](kernel-small-debug-shell-cmd-cpup.md)
+ - [date](kernel-small-debug-shell-cmd-date.md)
+ - [dmesg](kernel-small-debug-shell-cmd-dmesg.md)
+ - [exec](kernel-small-debug-shell-cmd-exec.md)
+ - [free](kernel-small-debug-shell-cmd-free.md)
+ - [help](kernel-small-debug-shell-cmd-help.md)
+ - [hwi](kernel-small-debug-shell-cmd-hwi.md)
+ - [kill](kernel-small-debug-shell-cmd-kill.md)
+ - [log](kernel-small-debug-shell-cmd-log.md)
+ - [memcheck](kernel-small-debug-shell-cmd-memcheck.md)
+ - [oom](kernel-small-debug-shell-cmd-oom.md)
+ - [pmm](kernel-small-debug-shell-cmd-pmm.md)
+ - [reset](kernel-small-debug-shell-cmd-reset.md)
+ - [sem](kernel-small-debug-shell-cmd-sem.md)
+ - [stack](kernel-small-debug-shell-cmd-stack.md)
+ - [su](kernel-small-debug-shell-cmd-su.md)
+ - [swtmr](kernel-small-debug-shell-cmd-swtmr.md)
+ - [systeminfo](kernel-small-debug-shell-cmd-sysinfo.md)
+ - [task](kernel-small-debug-shell-cmd-task.md)
+ - [uname](kernel-small-debug-shell-cmd-uname.md)
+ - [vmm](kernel-small-debug-shell-cmd-vmm.md)
+ - [watch](kernel-small-debug-shell-cmd-watch.md)
+ - [reboot](kernel-small-debug-shell-cmd-reboot.md)
+ - [top](kernel-small-debug-shell-cmd-top.md)
+ - File Commands
+ - [cat](kernel-small-debug-shell-file-cat.md)
+ - [cd](kernel-small-debug-shell-file-cd.md)
+ - [chgrp](kernel-small-debug-shell-file-chgrp.md)
+ - [chmod](kernel-small-debug-shell-file-chmod.md)
+ - [chown](kernel-small-debug-shell-file-chown.md)
+ - [cp](kernel-small-debug-shell-file-cp.md)
+ - [format](kernel-small-debug-shell-file-format.md)
+ - [ls](kernel-small-debug-shell-file-ls.md)
+ - [lsfd](kernel-small-debug-shell-file-lsfd.md)
+ - [mkdir](kernel-small-debug-shell-file-mkdir.md)
+ - [mount](kernel-small-debug-shell-file-mount.md)
+ - [partinfo](kernel-small-debug-shell-file-partinfo.md)
+ - [partition](kernel-small-debug-shell-file-partition.md)
+ - [pwd](kernel-small-debug-shell-file-pwd.md)
+ - [rm](kernel-small-debug-shell-file-rm.md)
+ - [rmdir](kernel-small-debug-shell-file-rmdir.md)
+ - [statfs](kernel-small-debug-shell-file-statfs.md)
+ - [sync](kernel-small-debug-shell-file-sync.md)
+ - [touch](kernel-small-debug-shell-file-touch.md)
+ - [writeproc](kernel-small-debug-shell-file-write.md)
+ - [umount](kernel-small-debug-shell-file-umount.md)
+ - [du](kernel-small-debug-shell-file-du.md)
+ - [mv](kernel-small-debug-shell-file-mv.md)
+ - Network Commands
+ - [arp](kernel-small-debug-shell-net-arp.md)
+ - [dhclient](kernel-small-debug-shell-net-dhclient.md)
+ - [ifconfig](kernel-small-debug-shell-net-ifconfig.md)
+ - [ipdebug](kernel-small-debug-shell-net-ipdebug.md)
+ - [netstat](kernel-small-debug-shell-net-netstat.md)
+ - [ntpdate](kernel-small-debug-shell-net-ntpdate.md)
+ - [ping](kernel-small-debug-shell-net-ping.md)
+ - [ping6](kernel-small-debug-shell-net-ping6.md)
+ - [telnet](kernel-small-debug-shell-net-telnet.md)
+ - [tftp](kernel-small-debug-shell-net-tftp.md)
+ - [Magic Key](kernel-small-debug-shell-magickey.md)
+ - [User-Space Exception Information](kernel-small-debug-shell-error.md)
+ - [Trace](kernel-small-debug-trace.md)
+ - [Perf](kernel-mini-memory-perf.md)
+ - [LMS](kernel-small-memory-lms.md)
+ - [Process Debugging](kernel-small-debug-process-cpu.md)
+ - Kernel-Mode Memory Debugging
+ - [Memory Information Statistics](kernel-small-debug-memory-info.md)
+ - [Memory Leak Check](kernel-small-debug-memory-leak.md)
+ - [Memory Corruption Check](kernel-small-debug-memory-corrupt.md)
+ - User-Mode Memory Debugging
+ - [Basic Concepts](kernel-small-debug-user-concept.md)
+ - [Working Principles](kernel-small-debug-user-function.md)
+ - Usage
+ - [Available APIs](kernel-small-debug-user-guide-api.md)
+ - [How to Use](kernel-small-debug-user-guide-use.md)
+ - [Calling APIs](kernel-small-debug-user-guide-use-api.md)
+ - [Using the CLI](kernel-small-debug-user-guide-use-cli.md)
+ - [Typical Memory Problems](kernel-small-debug-user-faqs.md)
+ - Other Kernel Debugging Methods
+ - [Dying Gasp](kernel-small-debug-trace-other-lastwords.md)
+ - [Common Fault Locating Methods](kernel-small-debug-trace-other-faqs.md)
+ - Appendix
+ - Basic Data Structure
+ - [Doubly Linked List](kernel-small-apx-dll.md)
+ - [Bitwise Operation](kernel-small-apx-bitwise.md)
+ - [Standard Library](kernel-small-apx-library.md)
+ - Standard-System Kernel
+ - [Linux Kernel Overview](kernel-standard-overview.md)
+ - [Applying Patches on Development Boards](kernel-standard-patch.md)
+ - [Compiling and Building the Linux Kernel](kernel-standard-build.md)
+ - [Enhanced Kernel Features](kernel-standard-enhanced-features.md)
+ - [Enhanced Swap](kernel-standard-mm-eswap.md)
+ - [Task Scheduling](kernel-standard-sched.md)
+ - [Related Thread Group](kernel-standard-sched-rtg.md)
+ - [Lightweight CPU Isolation](kernel-standard-sched-cpuisolation.md)
+
\ No newline at end of file
diff --git a/en/device-dev/kernel/kernel-mini-app.md b/en/device-dev/kernel/kernel-mini-app.md
index 024612639051cffe49bceedb36cbbf21993e5c4f..455b4a81e3afce0c3e1ff5879433f88fa4cb0251 100644
--- a/en/device-dev/kernel/kernel-mini-app.md
+++ b/en/device-dev/kernel/kernel-mini-app.md
@@ -1,9 +1,9 @@
-# Appendix
+# Appendix
-- **[Kernel Coding Specification](kernel-mini-appx-code.md)**
+- **[Kernel Coding Specification](kernel-mini-appx-code.md)**
-- **[Basic Data Structure](kernel-mini-appx-data.md)**
+- **[Doubly Linked List](kernel-mini-appx-data-list.md)**
-- **[Standard Libraries](kernel-mini-appx-lib.md)**
+- **[Standard Libraries](kernel-mini-appx-lib.md)**
diff --git a/en/device-dev/kernel/kernel-mini-appx-code.md b/en/device-dev/kernel/kernel-mini-appx-code.md
index 7892f4823b55a50d68bdeb9cf931ed66b1012de3..715a5dd6f51a7e148341489d8e55f4e176862ca4 100644
--- a/en/device-dev/kernel/kernel-mini-appx-code.md
+++ b/en/device-dev/kernel/kernel-mini-appx-code.md
@@ -1,20 +1,9 @@
# Kernel Coding Specification
-- [Principle](#section9512812145915)
-- [Directory Structure](#section1355317267017)
-- [Naming](#section1375364815017)
-- [Comments](#section1692516179119)
-- [Format](#section10888536113)
-- [Macros](#section12276501124)
-- [Header Files](#section158507231319)
-- [Data Types](#section91351731446)
-- [Variables](#section575493915417)
-- [Assertions](#section13864440410)
-- [Functions](#section671919481745)
This kernel coding specification is developed based on the general programming specifications in the industry. It defines the programming styles for kernel developers to follow.
-## Principle
+## Principle
Overall principle:
@@ -25,13 +14,13 @@ Overall principle:
Comply with this specification in most cases. When third-party open-source code needs to modified or a large number of open-source code APIs are used, follow the specifications applied to the third-party open-source code. Flexibly use this specification based on general principles.
-## Directory Structure
+## Directory Structure
You are advised to divide directories by function module and then define the header file directory and source file directory for each module.
Unless otherwise specified, use lowercase letters separated by underscores \(\_\) for directory names and file names.
-## **Naming**
+## **Naming**
The CamelCase style is recommended. The rules are as follows:
@@ -106,7 +95,7 @@ OsTaskScan
OsMuxInit
```
-## Comments
+## Comments
Generally, clear software architecture and appropriate symbol naming improve code readability.
@@ -142,7 +131,7 @@ You are advised to align multiple consecutive comments on the right. For example
#define CONST_B 2000 /* Const B */
```
-## **Format**
+## **Format**
Indent code of each level with four spaces rather than tabs \('\\t'\) for a better readability.
@@ -233,7 +222,7 @@ int Foo(const char * restrict p); // OK: When there is the restrict modifier, a
sz = sizeof(int*); // OK: There is no variable on the right, and * follows the data type.
```
-## Macros
+## Macros
If a function-like macro can be replaced by a function, use a function instead. Use inline functions for performance-critical scenarios.
@@ -293,11 +282,11 @@ Do not reference external function APIs or variables in declaration mode. Use th
It is recommended that header files be included by stability in the following sequence: header file corresponding to the source code, C standard library, operating system library, platform library, project public library, and other dependencies.
-## Data Types
+## Data Types
You are advised to use the basic data types defined in **los\_compiler.h**. For example, define the 32-bit unsigned integer as **UINT32**.
-## Variables
+## Variables
Avoid large stack allocations, such as large local arrays.
@@ -309,7 +298,7 @@ Do not return the address of a local variable outside its scope.
A variable that points to a resource handle or descriptor is assigned a new value immediately after the resource is released. If the scope of the variable ends immediately, no new value needs to be assigned. Variables that point to resource handles or descriptors include pointers, file descriptors, socket descriptors, and other variables that point to resources.
-## Assertions
+## Assertions
Assertions must be defined using macros and take effect only in the debugging version.
@@ -319,7 +308,7 @@ Do not change the running environment in an assertion.
An assertion is used to check only one error.
-## Functions
+## Functions
The validity of data sent from a process to another process and data sent from an application to the kernel must be verified. The verification includes but is not limited to the following:
diff --git a/en/device-dev/kernel/kernel-mini-appx-data-list.md b/en/device-dev/kernel/kernel-mini-appx-data-list.md
index 88fe04134a98a348be0614b5be9964bf9a4775a4..3a6b52a2e4a7c117d12bdc15787c5a961e8122df 100644
--- a/en/device-dev/kernel/kernel-mini-appx-data-list.md
+++ b/en/device-dev/kernel/kernel-mini-appx-data-list.md
@@ -1,15 +1,7 @@
-# Doubly Linked List
+# Doubly Linked List
-- [Basic Concepts](#section1990715203418)
-- [Available APIs](#section848334511411)
-- [How to Develop](#section01781261552)
-- [Development Example](#section67569495514)
- - [Example Description](#section48761994551)
- - [Sample Code](#section1280202685519)
- - [Verification](#section5811249105512)
-
-## Basic Concepts
+## Basic Concepts
A doubly linked list is a linked data structure that consists of a set of sequentially linked records called nodes. Each node contains a pointer to the previous node and a pointer to the next node in the sequence of nodes. The pointer head is unique.
@@ -109,7 +101,7 @@ The doubly linked list module provides the following APIs. For more details abou
-## How to Develop
+## How to Develop
The typical development process of the doubly linked list is as follows:
@@ -136,7 +128,7 @@ This example implements the following:
3. Delete a node.
4. Check whether the operation is performed successfully.
-### Sample Code
+### Sample Code
The sample code is as follows:
@@ -178,7 +170,7 @@ static UINT32 ListSample(VOID)
}
```
-### Verification
+### Verification
The development is successful if the return result is as follows:
diff --git a/en/device-dev/kernel/kernel-mini-appx-data.md b/en/device-dev/kernel/kernel-mini-appx-data.md
index d58ec79bc4eb24810ae0e36432ae7c33f1c73cad..57ff277cdcd60adfd0577e65160d04f2e5f22f5a 100644
--- a/en/device-dev/kernel/kernel-mini-appx-data.md
+++ b/en/device-dev/kernel/kernel-mini-appx-data.md
@@ -1,4 +1,4 @@
-# Basic Data Structure
+# Basic Data Structure
- **[Doubly Linked List](kernel-mini-appx-data-list.md)**
diff --git a/en/device-dev/kernel/kernel-mini-appx-lib-cmsis.md b/en/device-dev/kernel/kernel-mini-appx-lib-cmsis.md
index e159dee8effd98a834fcdb6d23704fcd8541ce38..8716dea21cdeb77f05b8f6de35a5108cace03959 100644
--- a/en/device-dev/kernel/kernel-mini-appx-lib-cmsis.md
+++ b/en/device-dev/kernel/kernel-mini-appx-lib-cmsis.md
@@ -1,19 +1,12 @@
-# CMSIS Support
+# CMSIS Support
-- [Basic Concepts](#section131091144111615)
-- [Development Guidelines](#section57653573161)
- - [Available APIs](#section1795910417173)
- - [How to Develop](#section48301225131720)
- - [Development Example](#section524434761713)
-
-
-## Basic Concepts
+## Basic Concepts
The Cortex Microcontroller Software Interface Standard \([CMSIS](https://developer.arm.com/tools-and-software/embedded/cmsis)\) is a vendor-independent hardware abstraction layer for microcontrollers based on Arm Cortex processors. Of the CMSIS components, the Real Time Operating System \(RTOS\) defines a set of universal and standardized APIs to reduce the dependency of application developers on specific RTOS and facilitate software porting and reuse. The CMSIS provides CMSIS-RTOS v1 and CMSIS-RTOS v2. The OpenHarmony LiteOS-M supports only the implementation of CMSIS-RTOS v2.
-## Development Guidelines
+## Development Guidelines
-### Available APIs
+### Available APIs
The following table describes CMSIS-RTOS v2 APIs. For more details about the APIs, see the API reference.
@@ -102,7 +95,7 @@ The following table describes CMSIS-RTOS v2 APIs. For more details about the API
| | osMessageQueuePut | Puts the message into the queue or times out if the queue is full.|
| | osMessageQueueReset | Initialized the message queue to the empty state (not implemented yet).|
-### How to Develop
+### How to Develop
The CMSIS-RTOS v2 component can be provided as a library \(shown in the figure\) or source code. By adding the CMSIS-RTOS v2 component \(typically configuration files\), you can implement RTOS capabilities on CMSIS-based applications. You only need to include the **cmsis\_os2.h** header file. RTOS APIs can then be called to process RTOS kernel-related events. You do not need to recompile the source code when the kernel is replaced.
@@ -110,7 +103,7 @@ The RTOS object control block definition needs to be called for static object al

-### Development Example
+### Development Example
```
#include ...
diff --git a/en/device-dev/kernel/kernel-mini-appx-lib-posix.md b/en/device-dev/kernel/kernel-mini-appx-lib-posix.md
index 2d6bedf2be74393023e87241894bd99decebaa39..206c59d14b56066e26f5692ea9013c89a663084d 100644
--- a/en/device-dev/kernel/kernel-mini-appx-lib-posix.md
+++ b/en/device-dev/kernel/kernel-mini-appx-lib-posix.md
@@ -1,19 +1,14 @@
-# POSIX Support
+# POSIX Support
-- [Basic Concepts](#section1757915134139)
-- [Development Guidelines](#section1573664211318)
- - [Available APIs](#section10429150121317)
- - [Important Notes](#section109174418147)
- - [Development Example](#section206149278155)
-## Basic Concepts
+## Basic Concepts
The OpenHarmony kernel uses the **musl libc** library and self-developed APIs and supports the Portable Operating System Interface \(POSIX\). You can develop components and applications working on the kernel based on the POSIX.
-## Development Guidelines
+## Development Guidelines
-### Available APIs
+### Available APIs
**Table 1** Available APIs
@@ -191,7 +186,7 @@ The OpenHarmony kernel uses the **musl libc** library and self-developed APIs
| | #include | int libc_get_version(void); | Obtains the libc version.|
-### Important Notes
+### Important Notes
Error codes
@@ -248,7 +243,7 @@ Error codes
| EOVERFLOW | 75 | Value too large for defined data type |
| EMSGSIZE | 90 | Message too long |
-### Development Example
+### Development Example
Demo:
diff --git a/en/device-dev/kernel/kernel-mini-appx-lib.md b/en/device-dev/kernel/kernel-mini-appx-lib.md
index 6c475ca705488930f46a6a80ae82ae05529a0323..c7cd182503b4f0c421b209a24518263dfb7b64a9 100644
--- a/en/device-dev/kernel/kernel-mini-appx-lib.md
+++ b/en/device-dev/kernel/kernel-mini-appx-lib.md
@@ -1,4 +1,4 @@
-# Standard Libraries
+# Standard Libraries
- **[CMSIS Support](kernel-mini-appx-lib-cmsis.md)**
diff --git a/en/device-dev/kernel/kernel-mini-basic-interrupt.md b/en/device-dev/kernel/kernel-mini-basic-interrupt.md
index 9b4f44f7b8bdda88255da9486a31607327e32d38..eed0a1b6cb29bebab54f406e8e5d97fc799dfeee 100644
--- a/en/device-dev/kernel/kernel-mini-basic-interrupt.md
+++ b/en/device-dev/kernel/kernel-mini-basic-interrupt.md
@@ -1,6 +1,6 @@
-# Interrupt Management
+# Interrupt Management
-## Basic Concepts
+## Basic Concepts
An interrupt is a signal to the processor emitted by hardware or software indicating an event that needs immediate attention. An interrupt alerts the processor to a high-priority condition requiring the interruption of the current code being executed by the processor. When a hardware interrupt is triggered, the interrupt handler is located based on the interrupt ID and then executed to handle the interrupt.
@@ -37,7 +37,7 @@ The following describes the concepts related to interrupts:
An area for storing interrupt vectors. It stores the mapping between interrupt vectors and interrupt IDs.
-## Available APIs
+## Available APIs
The following table describes APIs available for the OpenHarmony LiteOS-M interrupt module. For more details about the APIs, see the API reference.
@@ -56,19 +56,19 @@ The following table describes APIs available for the OpenHarmony LiteOS-M interr
| Triggering an interrupt| LOS_HwiTrigger | Triggers an interrupt (simulate an external interrupt by writing the related register of the interrupt controller).|
| Clearing interrupt register status| LOS_HwiClear | Clears the status bit of the interrupt register corresponding to the interrupt ID. The implementation of this API depends on the interrupt controller version. It is optional.|
-## How to Develop
+## How to Develop
1. Call **LOS_HwiCreate** to create an interrupt.
2. Call **LOS_HwiTrigger** to trigger the interrupt.
3. Call **LOS_HwiDelete** to delete the specified interrupt. Use this API based on actual requirements.
-> **NOTE:**
+> **NOTE**
>- Configure the maximum number of interrupts supported and the number of configurable interrupt priorities based on the specific hardware.
>- If the interrupt handler takes long time, the CPU cannot respond to interrupt requests in a timely manner.
>- Functions that trigger **LOS\_Schedule** cannot be directly or indirectly executed during interrupt response process.
>- The input parameter of **LOS\_IntRestore\(\)** must be the return value of **LOS\_IntLock\(\)**, that is, the current program status register \(CPSR\) value before the interrupt is disabled. Interrupts 0 to 15 in the Cortex-M series processors are for internal use. You are advised not to apply for or create interrupts 0 to 15.
-## Development Example
+## Development Example
This example implements the following:
@@ -128,7 +128,7 @@ static UINT32 Example_Interrupt(VOID)
}
```
-## Verification
+## Verification
The development is successful if the return result is as follows:
diff --git a/en/device-dev/kernel/kernel-mini-basic-ipc-event.md b/en/device-dev/kernel/kernel-mini-basic-ipc-event.md
index 25bc83caa13ee9f163c8de4352d05e2a2a585ae7..aa0b7289138b1d1ba1440725960757ba9c243403 100644
--- a/en/device-dev/kernel/kernel-mini-basic-ipc-event.md
+++ b/en/device-dev/kernel/kernel-mini-basic-ipc-event.md
@@ -1,19 +1,6 @@
-# Event
+# Event
-- [Basic Concepts](#section11650123134315)
-- [Working Principles](#section1735611583011)
- - [Event Control Block](#section1161415384467)
- - [Working Principles](#section187761153144617)
-
-- [Available APIs](#section158501652121514)
-- [How to Develop](#section783435801510)
-- [Development Example](#section460018317164)
- - [Example Description](#section896412438910)
- - [Sample Code](#section149077554912)
- - [Verification](#section4461439172017)
-
-
-## Basic Concepts
+## Basic Concepts
An event is a mechanism for communication between tasks. It can be used to synchronize tasks. The events have the following features:
@@ -23,9 +10,9 @@ An event is a mechanism for communication between tasks. It can be used to synch
APIs are provided to initialize, read/write, clear, and destroy events.
-## Working Principles
+## Working Principles
-### Event Control Block
+### Event Control Block
```
/**
@@ -58,7 +45,7 @@ The input parameters **eventMask** and **mode** determine whether the condit
**Figure 1** Event working mechanism for mini systems

-## Available APIs
+## Available APIs
Function
@@ -119,7 +106,7 @@ The input parameters **eventMask** and **mode** determine whether the condit
|
|---|
-## How to Develop
+## How to Develop
The typical event development process is as follows:
@@ -134,9 +121,9 @@ The typical event development process is as follows:
>- When an event is read or written, the 25th bit of the event is reserved and cannot be set.
>- Repeated writes of the same event are treated as one write.
-## Development Example
+## Development Example
-### Example Description
+### Example Description
In this example, run the **Example\_TaskEntry** task to create the **Example\_Event** task. Run the **Example\_Event** task to read an event to trigger task switching. Run the **Example\_TaskEntry** task to write an event. You can understand the task switching during event operations based on the sequence in which logs are recorded.
@@ -230,7 +217,7 @@ UINT32 Example_TaskEntry(VOID)
}
```
-### Verification
+### Verification
The development is successful if the return result is as follows:
diff --git a/en/device-dev/kernel/kernel-mini-basic-ipc-mutex.md b/en/device-dev/kernel/kernel-mini-basic-ipc-mutex.md
index a995b7893092cb77a0e8ba44a9dc17d5551710a2..da657fe36e0bb3f1ea8f20e336f643b85c5609d7 100644
--- a/en/device-dev/kernel/kernel-mini-basic-ipc-mutex.md
+++ b/en/device-dev/kernel/kernel-mini-basic-ipc-mutex.md
@@ -1,16 +1,6 @@
-# Mutex
+# Mutex
-- [Basic Concepts](#section1663192064511)
-- [Working Principles](#section115161649726)
-- [Available APIs](#section158501652121514)
-- [How to Develop](#section783435801510)
-- [Development Example](#section1426719434114)
- - [Example Description](#section896412438910)
- - [Sample Code](#section149077554912)
- - [Verification](#section2059413981311)
-
-
-## Basic Concepts
+## Basic Concepts
A mutual exclusion \(mutex\) is a special binary semaphore used for exclusive access to shared resources.
@@ -24,10 +14,10 @@ In a multi-task environment, multiple tasks may access the same shared resources
When non-shared resources are accessed by a task, the mutex is locked. Other tasks will be blocked until the mutex is released by the task. The mutex allows only one task to access the shared resources at a time, ensuring integrity of operations on the shared resources.
-**Figure 1** Mutex working mechanism for mini systems
+**Figure 1** Mutex working mechanism for mini systems

-## Available APIs
+## Available APIs
**Table 1** APIs of the mutex module
@@ -67,7 +57,7 @@ When non-shared resources are accessed by a task, the mutex is locked. Other tas
-## How to Develop
+## How to Develop
The typical mutex development process is as follows:
@@ -86,15 +76,15 @@ The typical mutex development process is as follows:
4. Call **LOS\_MuxDelete** to delete a mutex.
-> **NOTE:**
+> **NOTE**
>- Two tasks cannot lock the same mutex. If a task attempts to lock a mutex held by another task, the task will be blocked until the mutex is unclocked.
>- Mutexes cannot be used in the interrupt service program.
>- When using the LiteOS-M kernel, OpenHarmony must ensure real-time task scheduling and avoid long-time task blocking. Therefore, a mutex must be released as soon as possible after use.
>- When a mutex is held by a task, the task priority cannot be changed by using APIs such as **LOS\_TaskPriSet**.
-## Development Example
+## Development Example
-### Example Description
+### Example Description
This example implements the following:
@@ -103,7 +93,7 @@ This example implements the following:
3. **Example\_MutexTask1** requests a mutex in scheduled block mode, and waits for 10 ticks. Because the mutex is still held by **Example\_MutexTask2**, **Example\_MutexTask1** is suspended. After 10 ticks, **Example\_MutexTask1** is woken up and attempts to request a mutex in permanent block mode. **Example\_MutexTask1** is suspended because the mutex is still held by **Example\_MutexTask2**.
4. After 100 ticks, **Example\_MutexTask2** is woken up and releases the mutex, and then **Example\_MutexTask1** is woken up. **Example\_MutexTask1** acquires the mutex and then releases the mutex. At last, the mutex is deleted.
-### Sample Code
+### Sample Code
The sample code is as follows:
@@ -208,7 +198,7 @@ UINT32 Example_TaskEntry(VOID)
}
```
-### Verification
+### Verification
The development is successful if the return result is as follows:
diff --git a/en/device-dev/kernel/kernel-mini-basic-ipc-queue.md b/en/device-dev/kernel/kernel-mini-basic-ipc-queue.md
index acd6995c267e242844ddb63a5f0cf847a0cb69ce..348807896b8d07c9740a216807ee779ddf1fc4fb 100644
--- a/en/device-dev/kernel/kernel-mini-basic-ipc-queue.md
+++ b/en/device-dev/kernel/kernel-mini-basic-ipc-queue.md
@@ -1,6 +1,4 @@
-# Queue
-
-
+# Queue
## Basic Concepts
@@ -20,9 +18,9 @@ An asynchronous processing mechanism is provided to allow messages in a queue no
- Multiple tasks can receive messages from and send messages to the same queue.
- When a queue is created, the required dynamic memory space is automatically allocated in the queue API.
-## Working Principles
+## Working Principles
-### Queue Control Block
+### Queue Control Block
```
/**
@@ -63,7 +61,7 @@ Each queue control block contains information about the queue status.
The preceding figure illustrates how to write data to the tail node only. Writing data to the head node is similar.
-## Available APIs
+## Available APIs
Function
@@ -130,7 +128,7 @@ The preceding figure illustrates how to write data to the tail node only. Writin
|
|---|
-## How to Develop
+## How to Develop
1. Call **LOS\_QueueCreate** to create a queue. The queue ID is returned when the queue is created.
2. Call **LOS\_QueueWrite** or **LOS\_QueueWriteCopy** to write messages to the queue.
@@ -138,7 +136,7 @@ The preceding figure illustrates how to write data to the tail node only. Writin
4. Call **LOS\_QueueInfoGet** to obtain queue information.
5. Call **LOS\_QueueDelete** to delete the queue.
-> **NOTE:**
+> **NOTE**
>- The maximum number of queues supported by the system is the total number of queue resources of the system, not the number of queue resources available to users. For example, if the system software timer occupies one more queue resource, the number of queue resources available to users decreases by one.
>- The input parameters queue name and flags passed when a queue is created are reserved for future use.
>- The input parameter **timeOut** in the queue interface function is relative time.
@@ -147,9 +145,9 @@ The preceding figure illustrates how to write data to the tail node only. Writin
>- If the input parameter **bufferSize** in **LOS\_QueueReadCopy** is less than the length of the message, the message will be truncated.
>- **LOS\_QueueWrite**, **LOS\_QueueWriteHead**, and **LOS\_QueueRead** are called to manage data addresses, which means that the actual data read or written is pointer data. Therefore, before using these APIs, ensure that the message node size is the pointer length during queue creation, to avoid waste and read failures.
-## Development Example
+## Development Example
-### Example Description
+### Example Description
Create a queue and two tasks. Enable task 1 to call the queue write API to send messages, and enable task 2 to receive messages by calling the queue read API.
@@ -159,7 +157,7 @@ Create a queue and two tasks. Enable task 1 to call the queue write API to send
4. Enable messages to be received in task 2 by calling **RecvEntry**.
5. Call **LOS\_QueueDelete** to delete the queue.
-### Sample Code
+### Sample Code
The sample code is as follows:
@@ -243,7 +241,7 @@ UINT32 ExampleQueue(VOID)
}
```
-### Verification
+### Verification
The development is successful if the return result is as follows:
diff --git a/en/device-dev/kernel/kernel-mini-basic-ipc-sem.md b/en/device-dev/kernel/kernel-mini-basic-ipc-sem.md
index 02da5be605bb886633e07f265c0ea0dd03d52514..cc810659be1db081a7a1710081c90718358b46b3 100644
--- a/en/device-dev/kernel/kernel-mini-basic-ipc-sem.md
+++ b/en/device-dev/kernel/kernel-mini-basic-ipc-sem.md
@@ -1,19 +1,6 @@
-# Semaphore
+# Semaphore
-- [Basic Concepts](#section716754913479)
-- [Working Principles](#section1794010261861)
- - [Semaphore control block](#section11372149164815)
- - [Working Principles](#section139726510491)
-
-- [Available APIs](#section158501652121514)
-- [How to Develop](#section783435801510)
-- [Development Example](#section460018317164)
- - [Example Description](#section22061718111412)
- - [Sample Code](#section1775922321416)
- - [Verification](#section160404016213)
-
-
-## Basic Concepts
+## Basic Concepts
Semaphore is a mechanism for implementing communication between tasks. It implements synchronization between tasks or exclusive access to shared resources.
@@ -27,9 +14,9 @@ The usage of the counter value varies with the function of the semaphore.
- If the semaphore is used as a mutex, the counter value indicates the number of units of the shared resources available and its initial value cannot be **0**. The semaphore must be acquired before the shared resource is used, and released after the resource is used. When all shared resources are used, the semaphore counter is reduced to **0** and the tasks that need to obtain the semaphores will be blocked. This ensures exclusive access to shared resources. In addition, when the number of shared resources is **1**, a binary semaphore \(similar to the mutex mechanism\) is recommended.
- If the semaphore is used for synchronization, the initial semaphore counter value is **0**. When a task fails to acquire the semaphore, it will be blocked and enters Ready or Running state only when the semaphore is released. In this way, task synchronization is implemented.
-## Working Principles
+## Working Principles
-### Semaphore control block
+### Semaphore control block
```
/**
@@ -44,7 +31,7 @@ typedef struct {
} LosSemCB;
```
-### Working Principles
+### Working Principles
Initializing semaphores: Request memory for the semaphores configured \(the number of semaphores can be configured in the **LOSCFG\_BASE\_IPC\_SEM\_LIMIT** macro by users\), set all semaphores to the unused state, and add them to the linked list for unused semaphores.
@@ -61,7 +48,7 @@ A semaphore can also be used to limit the number of tasks that can access the sh
**Figure 1** Semaphore working mechanism for mini systems

-## Available APIs
+## Available APIs
Function
@@ -104,7 +91,7 @@ A semaphore can also be used to limit the number of tasks that can access the sh
|
|---|
-## How to Develop
+## How to Develop
1. Call **LOS\_SemCreate** to create a semaphore. To create a binary semaphore, call **LOS\_BinarySemCreate**.
2. Call **LOS\_SemPend** to request a semaphore.
@@ -114,9 +101,9 @@ A semaphore can also be used to limit the number of tasks that can access the sh
> **NOTE:**
>As interrupts cannot be blocked, semaphores cannot be requested in block mode for interrupts.
-## Development Example
+## Development Example
-### Example Description
+### Example Description
This example implements the following:
@@ -126,7 +113,7 @@ This example implements the following:
4. After 20 ticks, **ExampleSemTask2** is woken up and releases the semaphore. **ExampleSemTask1** acquires the semaphore and is scheduled to run. When **ExampleSemTask1** is complete, it releases the semaphore.
5. Task **ExampleSem** is woken up after 400 ticks and deletes the semaphore.
-### Sample Code
+### Sample Code
The sample code is as follows:
@@ -243,7 +230,7 @@ UINT32 ExampleSem(VOID)
}
```
-### Verification
+### Verification
The development is successful if the return result is as follows:
diff --git a/en/device-dev/kernel/kernel-mini-basic-ipc.md b/en/device-dev/kernel/kernel-mini-basic-ipc.md
index f18d6b58f05842f0bb145cf43a0c8c888e3ca119..a5de0eb580068f885a1e94f447de7b92b51422ba 100644
--- a/en/device-dev/kernel/kernel-mini-basic-ipc.md
+++ b/en/device-dev/kernel/kernel-mini-basic-ipc.md
@@ -1,4 +1,4 @@
-# Kernel Communication Mechanisms
+# Kernel Communication Mechanisms
- **[Event](kernel-mini-basic-ipc-event.md)**
diff --git a/en/device-dev/kernel/kernel-mini-basic-memory-basic.md b/en/device-dev/kernel/kernel-mini-basic-memory-basic.md
index 2e48ff75659f96f4e4c7bdd88d82e5baabd2faf1..2708b91cf2f62ceafd3e8f27e57411183db5e13e 100644
--- a/en/device-dev/kernel/kernel-mini-basic-memory-basic.md
+++ b/en/device-dev/kernel/kernel-mini-basic-memory-basic.md
@@ -1,4 +1,4 @@
-# Basic Concepts
+# Basic Concepts
Memory management, one of the core modules of the OS, manages the memory resources of the system. Memory management primarily involves initializing, allocating, and releasing memory.
diff --git a/en/device-dev/kernel/kernel-mini-basic-memory-dynamic.md b/en/device-dev/kernel/kernel-mini-basic-memory-dynamic.md
index 25f5fece5f8b5901f6a80d42dad9c3245c87480f..54d04f222e05feee34b86955208de2221753845f 100644
--- a/en/device-dev/kernel/kernel-mini-basic-memory-dynamic.md
+++ b/en/device-dev/kernel/kernel-mini-basic-memory-dynamic.md
@@ -1,68 +1,59 @@
-# Dynamic Memory
+# Dynamic Memory
-- [Working Principles](#section328282013571)
-- [Development Guidelines](#section7921151015814)
- - [When to Use](#section326917198583)
- - [Available APIs](#section1032331584)
- - [How to Develop](#section07271773592)
- - [Development Example](#section84931234145913)
- - [Verification](#section165233233917)
-
-
-## Working Principles
+## Working Principles
Dynamic memory management allows memory blocks of any size to be allocated from a large contiguous memory \(memory pool or heap memory\) configured in the system based on user demands when memory resources are sufficient. The memory block can be released for further use when not required. Compared with static memory management, dynamic memory management allows memory allocation on demand but causes fragmentation of memory.
-The dynamic memory of the OpenHarmony LiteOS-M has optimized the memory space partitioning based on the Two-Level Segregate Fit \(TLSF\) algorithm to achieve higher performance and minimize fragmentation. [Figure 1](#fig1179964042818) shows the core algorithm of the dynamic memory.
+The dynamic memory of the OpenHarmony LiteOS-M has optimized the memory space partitioning based on the Two-Level Segregate Fit \(TLSF\) algorithm to achieve higher performance and minimize fragmentation. [Figure 1](#fig1179964042818) shows the core algorithm of the dynamic memory.
-**Figure 1** Dynamic memory algorithm for mini systems
+**Figure 1** Dynamic memory algorithm for mini systems

-Multiple free lists are used for management based on the size of the free memory block. The free memory blocks are divided into two parts: \[4, 127\] and \[27, 231\], as indicated by the size class in [Figure 1](#fig1179964042818).
+Multiple free lists are used for management based on the size of the free memory block. The free memory blocks are divided into two parts: \[4, 127\] and \[27, 231\], as indicated by the size class in [Figure 1](#fig1179964042818).
-1. The memory in the range of \[4, 127\] \(lower part in [Figure 1](#fig1179964042818)\) is divided into 31 parts. The size of the memory block corresponding to each part is a multiple of 4 bytes. Each part corresponds to a free list and a bit that indicates whether the free list is empty. The value **1** indicates that the free list is not empty. There are 31 bits corresponding to the 31 memory parts in the range of \[4, 127\].
-2. The memory greater than 127 bytes is managed in power of two increments. The size of each range is \[2^n, 2^\(n+1\)-1\], where n is an integer in \[7, 30\]. This range is divided into 24 parts, each of which is further divided into 8 second-level \(L2\) ranges, as shown in Size Class and Size SubClass in the upper part of [Figure 1](#fig1179964042818). Each L2 range corresponds to a free list and a bit that indicates whether the free list is empty. There are a total of 192 \(24 x 8\) L2 ranges, corresponding to 192 free lists and 192 bits.
+1. The memory in the range of \[4, 127\] \(lower part in [Figure 1](#fig1179964042818)\) is divided into 31 parts. The size of the memory block corresponding to each part is a multiple of 4 bytes. Each part corresponds to a free list and a bit that indicates whether the free list is empty. The value **1** indicates that the free list is not empty. There are 31 bits corresponding to the 31 memory parts in the range of \[4, 127\].
+2. The memory greater than 127 bytes is managed in power of two increments. The size of each range is \[2^n, 2^\(n+1\)-1\], where n is an integer in \[7, 30\]. This range is divided into 24 parts, each of which is further divided into 8 second-level \(L2\) ranges, as shown in Size Class and Size SubClass in the upper part of [Figure 1](#fig1179964042818). Each L2 range corresponds to a free list and a bit that indicates whether the free list is empty. There are a total of 192 \(24 x 8\) L2 ranges, corresponding to 192 free lists and 192 bits.
For example, insert 40-byte free memory to a free list. The 40-byte free memory corresponds to the 10th free list in the range of \[40, 43\], and the 10th bit indicates the use of the free list. The system inserts the 40-byte free memory to the 10th free list and determines whether to update the bitmap flag. When 40-byte memory is requested, the system obtains the free list corresponding to the memory block of the requested size based on the bitmap flag, and then obtains a free memory node from the free list. If the size of the allocated node is greater than the memory requested, the system splits the node and inserts the remaining node to the free list. If 580-byte free memory needs to be inserted to a free list, the 580-byte free memory corresponds to the 47th \(31 + 2 x 8\) free list in L2 range \[2^9, 2^9+2^6\], and the 47th bit indicates the use of the free list. The system inserts the 580-byte free memory to the 47th free list and determines whether to update the bitmap flag. When 580-byte memory is requested, the system obtains the free list corresponding to the memory block of the requested size based on the bitmap flag, and then obtains a free memory node from the free list. If the size of the allocated node is greater than the memory requested, the system splits the node and inserts the remaining node to the free list. If the corresponding free list is empty, the system checks for a free list meeting the requirements in a larger memory range. In actual application, the system can locate the free list that meets the requirements at a time.
-[Figure 2](#fig10997102213017) shows the memory management structure.
+[Figure 2](#fig10997102213017) shows the memory management structure.
-**Figure 2** Dynamic memory management structure for mini systems
+**Figure 2** Dynamic memory management structure for mini systems

-- Memory pool header
+- Memory pool header
- The memory pool header contains the memory pool information, bitmap flag array, and free list array. The memory pool information includes the start address of the memory pool, total size of the heap memory, and attributes of the memory pool. The bitmap flag array consists of seven 32-bit unsigned integers. Each bit indicates whether the free list is inserted with free memory block nodes. The free list contains information about 223 free memory head nodes. The free memory head node information contains a memory node header and information about the previous and next nodes in the free list.
+ The memory pool header contains the memory pool information, bitmap flag array, and free list array. The memory pool information includes the start address of the memory pool, total size of the heap memory, and attributes of the memory pool. The bitmap flag array consists of seven 32-bit unsigned integers. Each bit indicates whether the free list is inserted with free memory block nodes. The free list contains information about 223 free memory head nodes. The free memory head node information contains a memory node header and information about the previous and next nodes in the free list.
-- Memory pool nodes
+- Memory pool nodes
- There are three types of nodes: free node, used node, and end node. Each memory node maintains the size and use flag of the memory node and a pointer to the previous memory node in the memory pool. The free nodes and used nodes have a data area, but the end node has no data area.
+ There are three types of nodes: free node, used node, and end node. Each memory node maintains the size and use flag of the memory node and a pointer to the previous memory node in the memory pool. The free nodes and used nodes have a data area, but the end node has no data area.
-The off-chip physical memory needs to be used because the on-chip RAMs of some chips cannot meet requirements. The OpenHarmony LiteOS-M kernel can logically combine multiple discontiguous memory regions so that users are unaware of the discontiguous memory regions in the underlying layer. The OpenHarmony LiteOS-M kernel memory module inserts discontiguous memory regions into a free list as free memory nodes and marks the discontiguous parts as virtual memory nodes that have been used. In this way, the discontinuous memory regions are logically combined as a unified memory pool. [Figure 3](#fig18471556115917) shows how the discontiguous memory regions are logically integrated.
+The off-chip physical memory needs to be used because the on-chip RAMs of some chips cannot meet requirements. The OpenHarmony LiteOS-M kernel can logically combine multiple discontiguous memory regions so that users are unaware of the discontiguous memory regions in the underlying layer. The OpenHarmony LiteOS-M kernel memory module inserts discontiguous memory regions into a free list as free memory nodes and marks the discontiguous parts as virtual memory nodes that have been used. In this way, the discontinuous memory regions are logically combined as a unified memory pool. [Figure 3](#fig18471556115917) shows how the discontiguous memory regions are logically integrated.
-**Figure 3** Integrating discontiguous memory regions
+**Figure 3** Integrating discontiguous memory regions

The discontiguous memory regions are integrated into a unified memory pool as follows:
-1. Call **LOS\_MemInit** to initialize the first memory region of multiple discontiguous memory regions.
-2. Obtain the start address and length of the next memory region, and calculate the **gapSize** between the current memory region and its previous memory region. The **gapSize** is considered as a used virtual node.
-3. Set the size of the end node of the previous memory region to the sum of **gapSize** and **OS\_MEM\_NODE\_HEAD\_SIZE**.
-4. Divide the current memory region into a free memory node and an end node, insert the free memory node to the free list, and set the link relationship between the nodes.
-5. Repeat [2](#li26042441209) to [4](#li10604194419014) to integrate more discontiguous memory regions.
+1. Call **LOS\_MemInit** to initialize the first memory region of multiple discontiguous memory regions.
+2. Obtain the start address and length of the next memory region, and calculate the **gapSize** between the current memory region and its previous memory region. The **gapSize** is considered as a used virtual node.
+3. Set the size of the end node of the previous memory region to the sum of **gapSize** and **OS\_MEM\_NODE\_HEAD\_SIZE**.
+4. Divide the current memory region into a free memory node and an end node, insert the free memory node to the free list, and set the link relationship between the nodes.
+5. Repeat [2](#li26042441209) to [4](#li10604194419014) to integrate more discontiguous memory regions.
-## Development Guidelines
+## Development Guidelines
-### When to Use
+### When to Use
Dynamic memory management allocates and manages memory resources requested by users dynamically. It is a good choice when users need memory blocks of different sizes. You can call the dynamic memory allocation function of the OS to request a memory block of the specified size. You can call the dynamic memory release function to release the memory at any time.
-### Available APIs
+### Available APIs
The following table describes APIs available for OpenHarmony LiteOS-M dynamic memory management. For more details about the APIs, see the API reference.
-**Table 1** APIs of the dynamic memory module
+**Table 1** APIs of the dynamic memory module
Function
@@ -159,38 +150,38 @@ The following table describes APIs available for OpenHarmony LiteOS-M dynamic me
|
|---|
> **NOTE:**
->- The dynamic memory module manages memory through control block structures, which consume extra memory. Therefore, the actual memory space available to users is less than the value of **OS\_SYS\_MEM\_SIZE**.
->- The **LOS\_MemAllocAlign** and **LOS\_MemMallocAlign** APIs consume extra memory for memory alignment, which may cause memory loss. When the memory used for alignment is freed up, the lost memory will be reclaimed.
->- The discontiguous memory regions passed by the **LosMemRegion** array to the **LOS\_MemRegionsAdd** API must be sorted in ascending order by memory start address in memory regions, and the memory regions cannot overlap.
+>- The dynamic memory module manages memory through control block structures, which consume extra memory. Therefore, the actual memory space available to users is less than the value of **OS\_SYS\_MEM\_SIZE**.
+>- The **LOS\_MemAllocAlign** and **LOS\_MemMallocAlign** APIs consume extra memory for memory alignment, which may cause memory loss. When the memory used for alignment is freed up, the lost memory will be reclaimed.
+>- The discontiguous memory regions passed by the **LosMemRegion** array to the **LOS\_MemRegionsAdd** API must be sorted in ascending order by memory start address in memory regions, and the memory regions cannot overlap.
-### How to Develop
+### How to Develop
The typical development process of dynamic memory is as follows:
-1. Call the **LOS\_MemInit** API to initialize a memory pool.
+1. Call the **LOS\_MemInit** API to initialize a memory pool.
- After a memory pool is initialized, a memory pool control header and end node will be generated, and the remaining memory is marked as free nodes. The end node is the last node in the memory pool, and its size is **0**.
+ After a memory pool is initialized, a memory pool control header and end node will be generated, and the remaining memory is marked as free nodes. The end node is the last node in the memory pool, and its size is **0**.
-1. Call the **LOS\_MemAlloc** API to allocate dynamic memory of any size.
+1. Call the **LOS\_MemAlloc** API to allocate dynamic memory of any size.
- The system checks whether the dynamic memory pool has free memory blocks greater than the requested size. If yes, the system allocates a memory block and returns the pointer to the memory block. If no, the system returns NULL. If the memory block allocated is greater than the requested size, the system splits the memory block and inserts the remaining memory block to the free list.
+ The system checks whether the dynamic memory pool has free memory blocks greater than the requested size. If yes, the system allocates a memory block and returns the pointer to the memory block. If no, the system returns NULL. If the memory block allocated is greater than the requested size, the system splits the memory block and inserts the remaining memory block to the free list.
-1. Call the **LOS\_MemFree** API to release dynamic memory.
+1. Call the **LOS\_MemFree** API to release dynamic memory.
- The released memory block can be reused. When **LOS\_MemFree** is called, the memory block will be reclaimed and marked as free nodes. When memory blocks are reclaimed, adjacent free nodes are automatically merged.
+ The released memory block can be reused. When **LOS\_MemFree** is called, the memory block will be reclaimed and marked as free nodes. When memory blocks are reclaimed, adjacent free nodes are automatically merged.
-### Development Example
+### Development Example
This example implements the following:
-1. Initialize a dynamic memory pool.
-2. Allocate a memory block from the dynamic memory pool.
-3. Store a piece of data in the memory block.
-4. Print the data in the memory block.
-5. Release the memory block.
+1. Initialize a dynamic memory pool.
+2. Allocate a memory block from the dynamic memory pool.
+3. Store a piece of data in the memory block.
+4. Print the data in the memory block.
+5. Release the memory block.
The sample code is as follows:
@@ -236,7 +227,7 @@ VOID Example_DynMem(VOID)
}
```
-### Verification
+### Verification
The output is as follows:
diff --git a/en/device-dev/kernel/kernel-mini-basic-memory-static.md b/en/device-dev/kernel/kernel-mini-basic-memory-static.md
index d8091d9a25bb4774416c79121d5f46e12fe35457..f29ccce4a2135019bf853d49760a8e5c17b84f20 100644
--- a/en/device-dev/kernel/kernel-mini-basic-memory-static.md
+++ b/en/device-dev/kernel/kernel-mini-basic-memory-static.md
@@ -1,34 +1,25 @@
-# Static Memory
+# Static Memory
-- [Working Principles](#section165473517522)
-- [Development Guidelines](#section57511620165218)
- - [When to Use](#section215474911529)
- - [Available APIs](#section79231214539)
- - [How to Develop](#section1388511316548)
- - [Development Example](#section17801515105519)
- - [Verification](#section11818154112319)
-
-
-## Working Principles
+## Working Principles
The static memory is a static array. The block size in the static memory pool is set during initialization and cannot be changed after initialization.
-The static memory pool consists of a control block **LOS\_MEMBOX\_INFO** and several memory blocks **LOS\_MEMBOX\_NODE** of the same size. The control block is located at the head of the memory pool and used for memory block management. It contains the memory block size \(**uwBlkSize**\), number of memory blocks \(**uwBlkNum**\), number of allocated memory blocks \(**uwBlkCnt**\), and free list \(**stFreeList**\). Memory is allocated and released by block size. Each memory block contains the pointer **pstNext** that points to the next memory block.
+The static memory pool consists of a control block **LOS\_MEMBOX\_INFO** and several memory blocks **LOS\_MEMBOX\_NODE** of the same size. The control block is located at the head of the memory pool and used for memory block management. It contains the memory block size \(**uwBlkSize**\), number of memory blocks \(**uwBlkNum**\), number of allocated memory blocks \(**uwBlkCnt**\), and free list \(**stFreeList**\). Memory is allocated and released by block size. Each memory block contains the pointer **pstNext** that points to the next memory block.
-**Figure 1** Static memory
+**Figure 1** Static memory

-## Development Guidelines
+## Development Guidelines
-### When to Use
+### When to Use
Use static memory allocation to obtain memory blocks of the fixed size. When the memory is no longer required, release the static memory.
-### Available APIs
+### Available APIs
The following table describes APIs available for OpenHarmony LiteOS-M static memory management. For more details about the APIs, see the API reference.
-**Table 1** APIs of the static memory module
+**Table 1** APIs of the static memory module
Function
@@ -80,32 +71,32 @@ The following table describes APIs available for OpenHarmony LiteOS-M static mem
|
|---|
-> **NOTE:**
+> **NOTE**
>The number of memory blocks in the memory pool after initialization is not equal to the total memory size divided by the memory block size. The reason is the control block of the memory pool and the control header of each memory block have memory overheads. When setting the total memory size, you need to consider these factors.
-### How to Develop
+### How to Develop
The typical development process of static memory is as follows:
1. Plan a memory space as the static memory pool.
-2. Call the **LOS\_MemboxInit** API to initialize the static memory pool.
+2. Call the **LOS\_MemboxInit** API to initialize the static memory pool.
During initialization, the memory space specified by the input parameter is divided into multiple blocks \(the number of blocks depends on the total static memory size and the block size\). Insert all memory blocks to the free list, and place the control header at the beginning of the memory.
-3. Call the **LOS\_MemboxAlloc** API to allocate static memory.
+3. Call the **LOS\_MemboxAlloc** API to allocate static memory.
The system allocates the first free memory block from the free list and returns the start address of this memory block.
-4. Call the **LOS\_MemboxClr** API.
+4. Call the **LOS\_MemboxClr** API.
Clear the memory block corresponding to the address contained in the input parameter.
-5. Call the **LOS\_MemboxFree** API.
+5. Call the **LOS\_MemboxFree** API.
Add the memory block to the free list.
-### Development Example
+### Development Example
This example implements the following:
@@ -167,7 +158,7 @@ VOID Example_StaticMem(VOID)
}
```
-### Verification
+### Verification
The output is as follows:
diff --git a/en/device-dev/kernel/kernel-mini-basic-memory.md b/en/device-dev/kernel/kernel-mini-basic-memory.md
index a473de6739f423492580dec911faa48d298aaaea..f5fa73731a77c804e3bfaeee265bb3fb268fd8ad 100644
--- a/en/device-dev/kernel/kernel-mini-basic-memory.md
+++ b/en/device-dev/kernel/kernel-mini-basic-memory.md
@@ -1,4 +1,4 @@
-# Memory Management
+# Memory Management
- **[Basic Concepts](kernel-mini-basic-memory-basic.md)**
diff --git a/en/device-dev/kernel/kernel-mini-basic-soft.md b/en/device-dev/kernel/kernel-mini-basic-soft.md
index 2beb8407c6825d79491a411ad97612117dbc09e8..6efbc1b6e8575391fbac7e6511490be31f081af6 100644
--- a/en/device-dev/kernel/kernel-mini-basic-soft.md
+++ b/en/device-dev/kernel/kernel-mini-basic-soft.md
@@ -1,19 +1,6 @@
-# Software Timer
+# Software Timer
-- [Basic Concepts](#section13256164145219)
-- [Working Principles](#section070665816719)
- - [Timer States](#section115453813506)
- - [Timer Modes](#section137521353175010)
-
-- [Available APIs](#section158501652121514)
-- [How to Develop](#section783435801510)
-- [Development Example](#section460018317164)
- - [Example Description](#section3741753191918)
- - [Sample Code](#section20760101182016)
- - [Verification](#section11244112818172)
-
-
-## Basic Concepts
+## Basic Concepts
The software timer is a software-simulated timer based on system tick interrupts. When the preset tick counter value has elapsed, the user-defined callback will be invoked. The timing precision is related to the cycle of the system tick clock.
@@ -28,9 +15,9 @@ The software timer supports the following functions:
- Deleting a software timer
- Obtaining the number of remaining ticks of a software timer
-## Working Principles
+## Working Principles
-The software timer is a system resource. When modules are initialized, a contiguous section of memory is allocated for software timers. The maximum number of timers supported by the system is configured by the **LOSCFG\_BASE\_CORE\_SWTMR\_LIMIT** macro in **los\_config.h**.
+The software timer is a system resource. When modules are initialized, a contiguous section of memory is allocated for software timers. The maximum number of timers supported by the system is configured by the **LOSCFG\_BASE\_CORE\_SWTMR\_LIMIT** macro in **los\_config.h**.
Software timers use a queue and a task resource of the system. The software timers are triggered based on the First In First Out \(FIFO\) rule. A timer with a shorter value is always closer to the queue head than a timer with a longer value, and is preferentially triggered.
@@ -40,7 +27,7 @@ When a tick interrupt occurs, the tick interrupt handler scans the global timing
When the tick interrupt handling function is complete, the software timer task \(with the highest priority\) is woken up. In this task, the timeout callback function for the recorded timer is called.
-### Timer States
+### Timer States
- OS\_SWTMR\_STATUS\_UNUSED
@@ -49,12 +36,12 @@ When the tick interrupt handling function is complete, the software timer task \
- OS\_SWTMR\_STATUS\_CREATED
- The timer is created but not started or the timer is stopped. When **LOS\_SwtmrCreate** is called for a timer that is not in use or **LOS\_SwtmrStop** is called for a newly started timer, the timer changes to this state.
+ The timer is created but not started or the timer is stopped. When **LOS\_SwtmrCreate** is called for a timer that is not in use or **LOS\_SwtmrStop** is called for a newly started timer, the timer changes to this state.
- OS\_SWTMR\_STATUS\_TICKING
- The timer is running \(counting\). When **LOS\_SwtmrStart** is called for a newly created timer, the timer enters this state.
+ The timer is running \(counting\). When **LOS\_SwtmrStart** is called for a newly created timer, the timer enters this state.
### Timer Modes
@@ -65,11 +52,11 @@ The OpenHarmony LiteOS-M kernel provides three types of software timers:
- Periodic timer: This type of timer periodically triggers timer events until it is manually stopped.
- One-shot timer deleted by calling an API
-## Available APIs
+## Available APIs
The following table describes APIs available for the OpenHarmony LiteOS-M software timer module. For more details about the APIs, see the API reference.
-**Table 1** Software timer APIs
+**Table 1** Software timer APIs
Function
@@ -114,46 +101,46 @@ The following table describes APIs available for the OpenHarmony LiteOS-M softwa
|
|---|
-## How to Develop
+## How to Develop
The typical development process of software timers is as follows:
1. Configure the software timer.
- - Check that **LOSCFG\_BASE\_CORE\_SWTMR** and **LOSCFG\_BASE\_IPC\_QUEUE** are set to **1**.
- - Configure **LOSCFG\_BASE\_CORE\_SWTMR\_LIMIT** \(maximum number of software timers supported by the system\).
- - Configure **OS\_SWTMR\_HANDLE\_QUEUE\_SIZE** \(maximum length of the software timer queue\).
+ - Check that **LOSCFG\_BASE\_CORE\_SWTMR** and **LOSCFG\_BASE\_IPC\_QUEUE** are set to **1**.
+ - Configure **LOSCFG\_BASE\_CORE\_SWTMR\_LIMIT** \(maximum number of software timers supported by the system\).
+ - Configure **OS\_SWTMR\_HANDLE\_QUEUE\_SIZE** \(maximum length of the software timer queue\).
-2. Call **LOS\_SwtmrCreate** to create a software timer.
+2. Call **LOS\_SwtmrCreate** to create a software timer.
- Create a software timer with the specified timing duration, timeout handling function, and triggering mode.
- Return the function execution result \(success or failure\).
-3. Call **LOS\_SwtmrStart** to start the software timer.
-4. Call **LOS\_SwtmrTimeGet** to obtain the remaining number of ticks of the software timer.
-5. Call **LOS\_SwtmrStop** to stop the software timer.
-6. Call **LOS\_SwtmrDelete** to delete the software timer.
+3. Call **LOS\_SwtmrStart** to start the software timer.
+4. Call **LOS\_SwtmrTimeGet** to obtain the remaining number of ticks of the software timer.
+5. Call **LOS\_SwtmrStop** to stop the software timer.
+6. Call **LOS\_SwtmrDelete** to delete the software timer.
-> **NOTE:**
+> **NOTE**
>- Avoid too many operations in the callback function of the software timer. Do not use APIs or perform operations that may cause task suspension or blocking.
->- The software timers use a queue and a task resource of the system. The priority of the software timer tasks is set to **0** and cannot be changed.
+>- The software timers use a queue and a task resource of the system. The priority of the software timer tasks is set to **0** and cannot be changed.
>- The number of software timer resources that can be configured in the system is the total number of software timer resources available to the entire system, not the number of software timer resources available to users. For example, if the system software timer occupies one more resource, the number of software timer resources available to users decreases by one.
>- If a one-shot software timer is created, the system automatically deletes the timer and reclaims resources after the timer times out and the callback function is executed.
->- For a one-shot software timer that will not be automatically deleted after expiration, you need to call **LOS\_SwtmrDelete** to delete it and reclaim the timer resource to prevent resource leakage.
+>- For a one-shot software timer that will not be automatically deleted after expiration, you need to call **LOS\_SwtmrDelete** to delete it and reclaim the timer resource to prevent resource leakage.
-## Development Example
+## Development Example
-### Example Description
+### Example Description
The following programming example demonstrates how to:
1. Create, start, delete, pause, and restart a software timer.
2. Use a one-shot software timer and a periodic software timer
-### Sample Code
+### Sample Code
Prerequisites
-- In **los\_config.h**, **LOSCFG\_BASE\_CORE\_SWTMR** is enabled.
-- In **los\_config.h**, **LOSCFG\_BASE\_CORE\_SWTMR\_ALIGN** is disabled. The sample code does not involve timer alignment.
+- In **los\_config.h**, **LOSCFG\_BASE\_CORE\_SWTMR** is enabled.
+- In **los\_config.h**, **LOSCFG\_BASE\_CORE\_SWTMR\_ALIGN** is disabled. The sample code does not involve timer alignment.
- The maximum number of software timers supported by the system \(**LOSCFG\_BASE\_CORE\_SWTMR\_LIMIT**\) is configured.
- The maximum length of the software timer queue \(OS\_SWTMR\_HANDLE\_QUEUE\_SIZE\) is configured.
@@ -250,7 +237,7 @@ UINT32 Example_TaskEntry(VOID)
}
```
-### Verification
+### Verification
The output is as follows:
diff --git a/en/device-dev/kernel/kernel-mini-basic-task.md b/en/device-dev/kernel/kernel-mini-basic-task.md
index b2a566704c827488e88242ec321b5e26f54efd99..b431d06f674446fe4d0ac7c990eea128d641f7af 100644
--- a/en/device-dev/kernel/kernel-mini-basic-task.md
+++ b/en/device-dev/kernel/kernel-mini-basic-task.md
@@ -1,16 +1,6 @@
-# Task Management
+# Task Management
-- [Basic Concepts](#section1524821422111)
- - [Task-related Concepts](#section1124425582117)
- - [Task Running Mechanism](#section123321315152219)
-
-- [Available APIs](#section158501652121514)
-- [How to Develop](#section783435801510)
-- [Development Example](#section460018317164)
- - [Verification](#section62921315208)
-
-
-## Basic Concepts
+## Basic Concepts
From the perspective of the operating system, tasks are the minimum running units that compete for system resources. They can use or wait for CPUs, use system resources such as memory, and run independently.
@@ -20,9 +10,9 @@ The task module of the OpenHarmony LiteOS-M provides multiple tasks and supports
- A task represents a thread.
- The preemptive scheduling mechanism is used for tasks. High-priority tasks can interrupt low-priority tasks. Low-priority tasks can be scheduled only after high-priority tasks are blocked or complete.
- Time slice round-robin is used to schedule tasks with the same priority.
-- A total of 32 \(**0** to **31**\) priorities are defined. **0** is the highest priority, and **31** is the lowest.
+- A total of 32 \(**0** to **31**\) priorities are defined. **0** is the highest priority, and **31** is the lowest.
-### Task-related Concepts
+### Task-related Concepts
**Task States**
@@ -37,7 +27,7 @@ A task can be in any of the following states:
**Task State Transitions**
-**Figure 1** Task state transitions
+**Figure 1** Task state transitions

The task transition process is as follows:
@@ -103,11 +93,11 @@ Task switching involves actions, such as obtaining the task with the highest pri
When a task is created, the system initializes the task stack and presets the context. The system places the task entry function in the corresponding position so that the function is executed when the task enters the running state for the first time.
-## Available APIs
+## Available APIs
The following table describes APIs available for the OpenHarmony LiteOS-M task module. For more details about the APIs, see the API reference.
-**Table 1** APIs of the task management module
+**Table 1** APIs of the task management module
| Category| API| Description|
| -------- | -------- | -------- |
@@ -139,33 +129,33 @@ The following table describes APIs available for the OpenHarmony LiteOS-M task m
| Reclaiming task stack resources| LOS_TaskResRecycle | Reclaims all task stack resources.|
-## How to Develop
+## How to Develop
The typical development process of the task module is as follows:
-1. Use **LOS\_TaskLock** to lock task scheduling and prevent high-priority tasks from being scheduled.
-2. Use **LOS\_TaskCreate** to create a task.
-3. Use **LOS\_TaskUnlock** to unlock task scheduling so that tasks can be scheduled by priority.
-4. Use **LOS\_TaskDelay** to delay a task.
-5. Use **LOS\_TaskSuspend** to suspend a task.
-6. Use **LOS\_TaskResume** to resume the suspended task.
+1. Use **LOS\_TaskLock** to lock task scheduling and prevent high-priority tasks from being scheduled.
+2. Use **LOS\_TaskCreate** to create a task.
+3. Use **LOS\_TaskUnlock** to unlock task scheduling so that tasks can be scheduled by priority.
+4. Use **LOS\_TaskDelay** to delay a task.
+5. Use **LOS\_TaskSuspend** to suspend a task.
+6. Use **LOS\_TaskResume** to resume the suspended task.
-> **NOTE:**
+> **NOTE**
>- Running idle tasks reclaims the TCBs and stacks in the to-be-recycled linked list.
>- The task name is a pointer without memory space allocated. When setting the task name, do not assign the local variable address to the task name pointer.
>- The task stack size is 8-byte aligned. Follow the "nothing more and nothing less" principle while determining the task stack size.
>- A running task cannot be suspended if task scheduling is locked.
>- Idle tasks and software timer tasks cannot be suspended or deleted.
->- In an interrupt handler or when a task is locked, the operation of calling **LOS\_TaskDelay** fails.
+>- In an interrupt handler or when a task is locked, the operation of calling **LOS\_TaskDelay** fails.
>- Locking task scheduling does not disable interrupts. Tasks can still be interrupted while task scheduling is locked.
>- Locking task scheduling must be used together with unlocking task scheduling.
>- Task scheduling may occur while a task priority is being set.
>- The maximum number of tasks that can be set for the operating system is the total number of tasks of the operating system, not the number of tasks available to users. For example, if the system software timer occupies one more task resource, the number of task resources available to users decreases by one.
->- **LOS\_CurTaskPriSet** and **LOS\_TaskPriSet** cannot be used in interrupts or used to modify the priorities of software timer tasks.
->- If the task corresponding to the task ID sent to **LOS\_TaskPriGet** has not been created or the task ID exceeds the maximum number of tasks, **-1** will be returned.
+>- **LOS\_CurTaskPriSet** and **LOS\_TaskPriSet** cannot be used in interrupts or used to modify the priorities of software timer tasks.
+>- If the task corresponding to the task ID sent to **LOS\_TaskPriGet** has not been created or the task ID exceeds the maximum number of tasks, **-1** will be returned.
>- Resources such as a mutex or a semaphore allocated to a task must have been released before the task is deleted.
-## Development Example
+## Development Example
This example describes the priority-based task scheduling and use of task-related APIs, including creating, delaying, suspending, and resuming two tasks with different priorities, and locking/unlocking task scheduling. The sample code is as follows:
@@ -281,7 +271,7 @@ UINT32 Example_TskCaseEntry(VOID)
}
```
-### Verification
+### Verification
The development is successful if the return result is as follows:
diff --git a/en/device-dev/kernel/kernel-mini-basic.md b/en/device-dev/kernel/kernel-mini-basic.md
index 87b28cd0549130ab2e0d32bfb54c7d7a30911a8a..ac46aa82314e75d5634de902f2cf3f3b87f34c4d 100644
--- a/en/device-dev/kernel/kernel-mini-basic.md
+++ b/en/device-dev/kernel/kernel-mini-basic.md
@@ -1,4 +1,4 @@
-# Basic Kernel
+# Basic Kernel
- **[Interrupt Management](kernel-mini-basic-interrupt.md)**
diff --git a/en/device-dev/kernel/kernel-mini-debug.md b/en/device-dev/kernel/kernel-mini-debug.md
index 8142a264fa7bcdbd64eb15d3df6971eda7b956f0..d69433e3a0a64aca0566249fe08a702572364cd4 100644
--- a/en/device-dev/kernel/kernel-mini-debug.md
+++ b/en/device-dev/kernel/kernel-mini-debug.md
@@ -1,4 +1,4 @@
-# Kernel Debugging
+# Kernel Debugging
- **[Memory Debugging](kernel-mini-memory-debug.md)**
diff --git a/en/device-dev/kernel/kernel-mini-extend-cpup.md b/en/device-dev/kernel/kernel-mini-extend-cpup.md
index 72d4acaac8c4b5c9423b6b954e8692ea8e05ab1a..a5d10352b390a3610804eaf10e70b3d021193322 100644
--- a/en/device-dev/kernel/kernel-mini-extend-cpup.md
+++ b/en/device-dev/kernel/kernel-mini-extend-cpup.md
@@ -1,32 +1,22 @@
-# CPUP
+# CPUP
-- [Basic Concepts](#section1275484221216)
-- [Working Principles](#section96644177124)
-- [Available APIs](#section158501652121514)
-- [How to Develop](#section783435801510)
-- [Development Example](#section460018317164)
- - [Example Description](#section51413507517)
- - [Sample Code](#section17617965523)
- - [Verification](#section1968771515188)
-
-
-## Basic Concepts
+## Basic Concepts
The central processing unit percent \(CPUP\) includes the system CPUP and task CPUP.
-The system CPUP is the CPU usage of the system within a period of time. It reflects the CPU load and the system running status \(idle or busy\) in the given period of time. The valid range of the system CPUP is 0 to 100 in percentage. The precision can be adjusted through configuration. The value **100** indicates that the system runs with full load.
+The system CPUP is the CPU usage of the system within a period of time. It reflects the CPU load and the system running status \(idle or busy\) in the given period of time. The valid range of the system CPUP is 0 to 100 in percentage. The precision can be adjusted through configuration. The value **100** indicates that the system runs with full load.
-Task CPUP refers to the CPU usage of a single task. It reflects the task status, busy or idle, in a period of time. The valid range of task CPUP is 0 to 100 in percentage. The precision can be adjusted through configuration. The value **100** indicates that the task is being executed for the given period of time.
+Task CPUP refers to the CPU usage of a single task. It reflects the task status, busy or idle, in a period of time. The valid range of task CPUP is 0 to 100 in percentage. The precision can be adjusted through configuration. The value **100** indicates that the task is being executed for the given period of time.
With the system CPUP, you can determine whether the current system load exceeds the designed specifications.
With the CPUP of each task, you can determine whether the CPU usage of each task meets expectations of the design.
-## Working Principles
+## Working Principles
The OpenHarmony LiteOS-M CPUP records the system CPU usage on a task basis. When task switching occurs, the task start time and task switch-out or exit time are recorded. Each time when a task exits, the system accumulates the CPU time used by the task.
-You can configure this function in **target\_config.h**.
+You can configure this function in **target\_config.h**.
The OpenHarmony LiteOS-M provides the following types of CPUP information:
@@ -41,7 +31,7 @@ Task CPUP = Total running time of the task/Total running time of the system
## Available APIs
-**Table 1** Functions
+**Table 1** Functions
Function
@@ -91,28 +81,28 @@ Task CPUP = Total running time of the task/Total running time of the system
|
|---|
-## How to Develop
+## How to Develop
The typical CPUP development process is as follows:
-1. Call **LOS\_SysCpuUsage** to obtain the system CPUP.
-2. Call **LOS\_HistorySysCpuUsage** to obtain the historical CPUP of the system.
-3. Call **LOS\_TaskCpuUsage** to obtain the CPUP of a specified task.
+1. Call **LOS\_SysCpuUsage** to obtain the system CPUP.
+2. Call **LOS\_HistorySysCpuUsage** to obtain the historical CPUP of the system.
+3. Call **LOS\_TaskCpuUsage** to obtain the CPUP of a specified task.
- If the task has been created, disable interrupt, obtain the CPUP, and then enable interrupt.
- If the task is not created, return an error code.
-4. Call **LOS\_HistoryTaskCpuUsage** to obtain the historical CPUP of a specified task.
+4. Call **LOS\_HistoryTaskCpuUsage** to obtain the historical CPUP of a specified task.
- If the task has been created, disable interrupt, obtain the CPUP in different modes, and then enable interrupt.
- If the task is not created, return an error code.
-5. Call **LOS\_AllCpuUsage** to obtain the CPUP of all tasks.
+5. Call **LOS\_AllCpuUsage** to obtain the CPUP of all tasks.
- If the CPUP is initialized, disable interrupt, obtain the CPUP in different modes, and then enable interrupt.
- If CPUP is not initialized or has invalid input parameters, return an error code.
-## Development Example
+## Development Example
-### Example Description
+### Example Description
This example implements the following:
@@ -122,11 +112,11 @@ This example implements the following:
4. Obtain the CPUP of the created test task.
5. Obtain the CPUP of the created test task in different modes.
-### Sample Code
+### Sample Code
Prerequisites
-In **target\_config.h**, the **LOSCFG\_BASE\_CORE\_CPUP** parameter is enabled.
+In **target\_config.h**, the **LOSCFG\_BASE\_CORE\_CPUP** parameter is enabled.
The sample code is as follows:
@@ -180,7 +170,7 @@ UINT32 ItCpupTest(VOID)
}
```
-### Verification
+### Verification
The development is successful if the return result is as follows:
diff --git a/en/device-dev/kernel/kernel-mini-extend-dynamic-loading.md b/en/device-dev/kernel/kernel-mini-extend-dynamic-loading.md
index df9c13c881c39b8fd4f4a03f8ae91a55dc7f4412..1bf198e1fa337518d06a4062c74a2cf290630b4c 100644
--- a/en/device-dev/kernel/kernel-mini-extend-dynamic-loading.md
+++ b/en/device-dev/kernel/kernel-mini-extend-dynamic-loading.md
@@ -1,28 +1,17 @@
-# Dynamic Loading
+# Dynamic Loading
-- [Basic Concepts](#section4330230191314)
-- [Working Principles](#section139861939219)
- - [Exporting the Symbol Table](#section15414650102716)
- - [Loading an ELF File](#section5221181562810)
- - [ELF File Link](#section68441639182817)
+## Basic Concepts
-- [ELF Specifications](#section187315541916)
- - [ELF Type](#section1701552268)
- - [Options for Linking](#section17292133274)
+In small devices with limited hardware resources, dynamic algorithm deployment capability is required to solve the problem that multiple algorithms cannot be deployed at the same time. The LiteOS-M kernel uses the Executable and Linkable Format \(ELF\) loading because it is easy to use and compatible with a wide variety of platforms. The LiteOS-M provides APIs similar to **dlopen** and **dlsym**. Apps can load and unload required algorithm libraries by using the APIs provided by the dynamic loading module. As shown in the following figure, the app obtains the corresponding information output through the API required by the third-party algorithm library. The third-party algorithm library depends on the basic APIs provided by the kernel, such as **malloc**. After the app loads the API and relocates undefined symbols, it can call the API to complete the function. The dynamic loading component supports only the Arm architecture. In addition, the signature and source of the shared library to be loaded must be verified to ensure system security.
-
-## Basic Concepts
-
-In small devices with limited hardware resources, dynamic algorithm deployment capability is required to solve the problem that multiple algorithms cannot be deployed at the same time. The LiteOS-M kernel uses the Executable and Linkable Format \(ELF\) loading because it is easy to use and compatible with a wide variety of platforms. The LiteOS-M provides APIs similar to **dlopen** and **dlsym**. Apps can load and unload required algorithm libraries by using the APIs provided by the dynamic loading module. As shown in the following figure, the app obtains the corresponding information output through the API required by the third-party algorithm library. The third-party algorithm library depends on the basic APIs provided by the kernel, such as **malloc**. After the app loads the API and relocates undefined symbols, it can call the API to complete the function. The dynamic loading component supports only the Arm architecture. In addition, the signature and source of the shared library to be loaded must be verified to ensure system security.
-
-**Figure 1** LiteOS-M kernel dynamic loading architecture
+**Figure 1** LiteOS-M kernel dynamic loading architecture

-## Working Principles
+## Working Principles
-### Exporting the Symbol Table
+### Exporting the Symbol Table
-The kernel needs to proactively expose the API required by the dynamic library when the shared library calls a kernel API, as shown in the following figure. This mechanism compiles the symbol information to the specified section and calls the **SYM\_EXPORT** macro to export information of the specified symbol. The symbol information is described in the structure **SymInfo**. Its members include the symbol name and symbol address information. The macro **SYM\_EXPORT** imports the symbol information to the **.sym.\*** section by using the **\_\_attribute\_\_** compilation attribute.
+The kernel needs to proactively expose the API required by the dynamic library when the shared library calls a kernel API, as shown in the following figure. This mechanism compiles the symbol information to the specified section and calls the **SYM\_EXPORT** macro to export information of the specified symbol. The symbol information is described in the structure **SymInfo**. Its members include the symbol name and symbol address information. The macro **SYM\_EXPORT** imports the symbol information to the **.sym.\*** section by using the **\_\_attribute\_\_** compilation attribute.
```
typedef struct {
@@ -37,12 +26,12 @@ const SymInfo sym_##func __attribute__((section(".sym."#func))) = { \
};
```
-**Figure 2** Exported symbol table information
+**Figure 2** Exported symbol table information

-### Loading an ELF File
+### Loading an ELF File
-During the loading process, the LOAD section to be loaded to the memory is obtained based on the ELF file handle and the section offset of the program header table. Generally, there are two sections: read-only section and read-write section. You can run the **readelf -l** command to view the LOAD section information of the ELF file. The physical memory is requested according to the related alignment attributes. Then, a code section or a data segment is written into the memory based on the loading base address and an offset of each section.
+During the loading process, the LOAD section to be loaded to the memory is obtained based on the ELF file handle and the section offset of the program header table. Generally, there are two sections: read-only section and read-write section. You can run the **readelf -l** command to view the LOAD section information of the ELF file. The physical memory is requested according to the related alignment attributes. Then, a code section or a data segment is written into the memory based on the loading base address and an offset of each section.
```
$ readelf -l lib.so
@@ -66,29 +55,29 @@ Program Headers:
03 .dynamic
```
-**Figure 3** Process of loading an ELF file
+**Figure 3** Process of loading an ELF file

-### ELF File Link
+### ELF File Link
-A relocation table is obtained by using a **.dynamic** section of the ELF file. Each entry that needs to be relocated in the table is traversed. Then, the symbol is searched, based on the symbol name that needs to be relocated, in the shared library and the exported symbol table provided by the kernel. The relocation information is updated based on the symbol found.
+A relocation table is obtained by using a **.dynamic** section of the ELF file. Each entry that needs to be relocated in the table is traversed. Then, the symbol is searched, based on the symbol name that needs to be relocated, in the shared library and the exported symbol table provided by the kernel. The relocation information is updated based on the symbol found.
-**Figure 4** ELF file linking process
+**Figure 4** ELF file linking process

-## ELF Specifications
+## ELF Specifications
-### ELF Type
+### ELF Type
-When compiling a shared library, you can add **-fPIC** \(a compilation option\) to compile location-independent code. The shared library file type is **ET\_DYN**, which can be loaded to any valid address range.
+When compiling a shared library, you can add **-fPIC** \(a compilation option\) to compile location-independent code. The shared library file type is **ET\_DYN**, which can be loaded to any valid address range.
-Example: **arm-none-eabi-gcc -fPIC –shared –o lib.so lib.c**
+Example: **arm-none-eabi-gcc -fPIC –shared –o lib.so lib.c**
-### Options for Linking
+### Options for Linking
1. **-nostdlib**: Do not use the lib library in the compiler when linking.
2. **-nostartfiles**: Do not use the startup files in the compiler when linking.
3. **-fPIC**: compiles location-independent shared libraries.
-4. **-z max-page-size=4**: sets the number of alignment bytes of the loadable sections in the binary file to **4**. This setting saves memory and can be used for a dynamic library.
-5. **-mcpu=** specifies the CPU architecture.
+4. **-z max-page-size=4**: sets the number of alignment bytes of the loadable sections in the binary file to **4**. This setting saves memory and can be used for a dynamic library.
+5. **-mcpu=** specifies the CPU architecture.
diff --git a/en/device-dev/kernel/kernel-mini-extend-file-fat.md b/en/device-dev/kernel/kernel-mini-extend-file-fat.md
index 1daa2c5ba187e2109ec000ec4b3653a4859e85f2..5f191076a6e75743b254e0b8611698de701bb8e0 100644
--- a/en/device-dev/kernel/kernel-mini-extend-file-fat.md
+++ b/en/device-dev/kernel/kernel-mini-extend-file-fat.md
@@ -1,31 +1,20 @@
-# FAT
+# FAT
-- [Basic Concepts](#section1772629121418)
-- [Development Guidelines](#section1149072811148)
- - [Adaptation of Drivers](#section19174939191414)
- - [How to Develop](#section131211626151513)
-
-- [Development Example](#section1133718619459)
- - [Example Description](#section45337345313)
- - [Sample Code](#section119813171539)
- - [Verification](#section7987101232311)
-
-
-## Basic Concepts
+## Basic Concepts
File Allocation Table \(FAT\) is a file system developed for personal computers. It consists of the DOS Boot Record \(DBR\) region, FAT region, and Data region. Each entry in the FAT region records information about the corresponding cluster in the storage device. The cluster information includes whether the cluster is used, number of the next cluster of the file, whether the file ends with the cluster. The FAT file system supports multiple formats, such as FAT12, FAT16, and FAT32. The numbers 12, 16, and 32 indicate the number of bits per cluster within the FAT, respectively. The FAT file system supports multiple media, especially removable media \(such as USB flash drives, SD cards, and removable hard drives\). The FAT file system ensures good compatibility between embedded devices and desktop systems \(such as Windows and Linux\) and facilitates file management.
The OpenHarmony kernel supports FAT12, FAT16, and FAT32 file systems. These file systems require a tiny amount of code to implement, use less resources, support a variety of physical media, and are tailorable and compatible with Windows and Linux systems. They also support identification of multiple devices and partitions. The kernel supports multiple partitions on hard drives and allows creation of the FAT file system on the primary partition and logical partition.
-## Development Guidelines
+## Development Guidelines
-### Adaptation of Drivers
+### Adaptation of Drivers
The use of the FAT file system requires support from the underlying MultiMediaCard \(MMC\) drivers. To run FatFS on a board with an MMC storage device, you must:
-1. Implement the **disk\_status**, **disk\_initialize**, **disk\_read**, **disk\_write**, and **disk\_ioctl** APIs to adapt to the embedded MMC \(eMMC\) drivers on the board.
+1. Implement the **disk\_status**, **disk\_initialize**, **disk\_read**, **disk\_write**, and **disk\_ioctl** APIs to adapt to the embedded MMC \(eMMC\) drivers on the board.
-2. Add the **fs\_config.h** file with information such as **FS\_MAX\_SS** \(maximum sector size of the storage device\) and **FF\_VOLUME\_STRS** \(partition names\) configured. The following is an example:
+2. Add the **fs\_config.h** file with information such as **FS\_MAX\_SS** \(maximum sector size of the storage device\) and **FF\_VOLUME\_STRS** \(partition names\) configured. The following is an example:
```
#define FF_VOLUME_STRS "system", "inner", "update", "user"
@@ -33,35 +22,35 @@ The use of the FAT file system requires support from the underlying MultiMediaCa
#define FAT_MAX_OPEN_FILES 50
```
-### How to Develop
+### How to Develop
-> **NOTE:**
+> **NOTE**
>- Note the following when managing FatFS files and directories:
> - A file cannot exceed 4 GB.
-> - **FAT\_MAX\_OPEN\_FILES** specifies the maximum number files you can open at a time, and **FAT\_MAX\_OPEN\_DIRS** specifies the maximum number of folders you can open at a time.
-> - Root directory management is not supported. File and directory names start with the partition name. For example, **user/testfile** indicates the file or directory **testfile** in the **user** partition.
-> - To open a file multiple times, use **O\_RDONLY** \(read-only mode\). **O\_RDWR** or **O\_WRONLY** \(writable mode\) can open a file only once.
-> - The read and write pointers are not separated. If a file is open in **O\_APPEND** mode, the read pointer is also at the end of the file. If you want to read the file from the beginning, you must manually set the position of the read pointer.
+> - **FAT\_MAX\_OPEN\_FILES** specifies the maximum number files you can open at a time, and **FAT\_MAX\_OPEN\_DIRS** specifies the maximum number of folders you can open at a time.
+> - Root directory management is not supported. File and directory names start with the partition name. For example, **user/testfile** indicates the file or directory **testfile** in the **user** partition.
+> - To open a file multiple times, use **O\_RDONLY** \(read-only mode\). **O\_RDWR** or **O\_WRONLY** \(writable mode\) can open a file only once.
+> - The read and write pointers are not separated. If a file is open in **O\_APPEND** mode, the read pointer is also at the end of the file. If you want to read the file from the beginning, you must manually set the position of the read pointer.
> - File and directory permission management is not supported.
-> - The **stat** and **fstat** APIs do not support query of the modification time, creation time, and last access time. The Microsoft FAT protocol does not support time before A.D. 1980.
+> - The **stat** and **fstat** APIs do not support query of the modification time, creation time, and last access time. The Microsoft FAT protocol does not support time before A.D. 1980.
>- Note the following when mounting and unmounting FatFS partitions:
-> - Partitions can be mounted with the read-only attribute. When the input parameter of the **mount** function is **MS\_RDONLY**, all APIs with the write attribute, such as **write**, **mkdir**, **unlink**, and **open** with **non-O\_RDONLY** attributes, will be rejected.
-> - You can use the **MS\_REMOUNT** flag with **mount** to modify the permission for a mounted partition.
+> - Partitions can be mounted with the read-only attribute. When the input parameter of the **mount** function is **MS\_RDONLY**, all APIs with the write attribute, such as **write**, **mkdir**, **unlink**, and **open** with **non-O\_RDONLY** attributes, will be rejected.
+> - You can use the **MS\_REMOUNT** flag with **mount** to modify the permission for a mounted partition.
> - Before unmounting a partition, ensure that all directories and files in the partition are closed.
-> - You can use **umount2** with the **MNT\_FORCE** parameter to forcibly close all files and folders and unmount the partition. However, this may cause data loss. Therefore, exercise caution when running **umount2**.
->- The FAT file system supports re-partitioning and formatting of storage devices using **fatfs\_fdisk** and **fatfs\_format**.
-> - If a partition is mounted before being formatted using **fatfs\_format**, you must close all directories and files in the partition and unmount the partition first.
-> - Before calling **fatfs\_fdisk**, ensure that all partitions in the device are unmounted.
-> - Using **fatfs\_fdisk** and **fatfs\_format** may cause data loss. Exercise caution when using them.
+> - You can use **umount2** with the **MNT\_FORCE** parameter to forcibly close all files and folders and unmount the partition. However, this may cause data loss. Therefore, exercise caution when running **umount2**.
+>- The FAT file system supports re-partitioning and formatting of storage devices using **fatfs\_fdisk** and **fatfs\_format**.
+> - If a partition is mounted before being formatted using **fatfs\_format**, you must close all directories and files in the partition and unmount the partition first.
+> - Before calling **fatfs\_fdisk**, ensure that all partitions in the device are unmounted.
+> - Using **fatfs\_fdisk** and **fatfs\_format** may cause data loss. Exercise caution when using them.
-## Development Example
+## Development Example
-### Example Description
+### Example Description
This example implements the following:
-1. Create the **user/test** directory.
-2. Create the **file.txt** file in the **user/test** directory.
+1. Create the **user/test** directory.
+2. Create the **file.txt** file in the **user/test** directory.
3. Write "Hello OpenHarmony!" at the beginning of the file.
4. Save the update of the file to the device.
5. Set the offset to the beginning of the file.
@@ -70,11 +59,11 @@ This example implements the following:
8. Delete the file.
9. Delete the directory.
-### Sample Code
+### Sample Code
Prerequisites
-- The MMC device partition is mounted to the **user** directory.
+- The MMC device partition is mounted to the **user** directory.
The sample code is as follows:
@@ -167,7 +156,7 @@ int FatfsTest(void)
}
```
-### Verification
+### Verification
The development is successful if the return result is as follows:
diff --git a/en/device-dev/kernel/kernel-mini-extend-file-lit.md b/en/device-dev/kernel/kernel-mini-extend-file-lit.md
index 5a75459596425f37a359fcc37ec5d89532e02065..7d51b76ab3167951eeaa72d839481a4630ec2390 100644
--- a/en/device-dev/kernel/kernel-mini-extend-file-lit.md
+++ b/en/device-dev/kernel/kernel-mini-extend-file-lit.md
@@ -1,18 +1,12 @@
-# LittleFS
+# LittleFS
-- [Basic Concepts](#section1553253111412)
-- [Development Guidelines](#section1496101821515)
-- [Sample Code](#section1034515054620)
- - [Verification](#section176167422148)
-
-
-## Basic Concepts
+## Basic Concepts
LittleFS is a small file system designed for flash. By combining the log-structured file system and the copy-on-write \(COW\) file system, LittleFS stores metadata in log structure and data in the COW structure. This special storage empowers LittleFS high power-loss resilience. LittleFS uses the statistical wear leveling algorithm when allocating COW data blocks, effectively prolonging the service life of flash devices. LittleFS is designed for small-sized devices with limited resources, such as ROM and RAM. All RAM resources are allocated through a buffer with the fixed size \(configurable\). That is, the RAM usage does not grow with the file system.
LittleFS is a good choice when you look for a flash file system that is power-cut resilient and has wear leveling support on a small device with limited resources.
-## Development Guidelines
+## Development Guidelines
When porting LittleFS to a new hardware device, you need to declare **lfs\_config**:
@@ -45,7 +39,7 @@ const struct lfs_config cfg = {
**block\_count** indicates the number of blocks that can be erased, which depends on the capacity of the block device and the size of the block to be erased \(**block\_size**\).
-## Sample Code
+## Sample Code
The sample code is as follows:
@@ -95,7 +89,7 @@ int main(void) {
}
```
-### Verification
+### Verification
The development is successful if the return result is as follows:
diff --git a/en/device-dev/kernel/kernel-mini-extend-file.md b/en/device-dev/kernel/kernel-mini-extend-file.md
index dea568471833c3ca7aecd7fb1cdd5db1cbb0cd9f..11f6ec908e2622a9cc11ffaa304e2834b1d04321 100644
--- a/en/device-dev/kernel/kernel-mini-extend-file.md
+++ b/en/device-dev/kernel/kernel-mini-extend-file.md
@@ -1,8 +1,8 @@
-# File System
+# File System
The OpenHarmony LiteOS-M kernel supports File Allocation Table file system \(FATFS\) and LittleFS file systems. Like the OpenHarmony LiteOS-A kernel, the OpenHarmony LiteOS-M kernel provides POSIX over the virtual file system \(VFS\) to ensure interface consistency. However, the VFS of the LiteOS-M kernel is light due to insufficient resources and does not provide advanced functions \(such as pagecache\). Therefore, the VFS of the LiteOS-M kernel implements only API standardization and adaptation. The file systems handle specific transactions. The following table lists the functions supported by the file systems.
-**Table 1** Function list
+**Table 1** Function list
Function
diff --git a/en/device-dev/kernel/kernel-mini-extend-support.md b/en/device-dev/kernel/kernel-mini-extend-support.md
index e8cbd42d8c5d78cd423129b1a981d9572ab6588b..6b35ac452b7d0f01ba42d06836b4d02031447eb7 100644
--- a/en/device-dev/kernel/kernel-mini-extend-support.md
+++ b/en/device-dev/kernel/kernel-mini-extend-support.md
@@ -1,24 +1,16 @@
-# C++ Support
+# C++ Support
-- [Basic Concepts](#section11374125415814)
-- [Working Principles](#section189351319134418)
-- [Development Guidelines](#section166302407911)
- - [Available APIs](#section1881825119919)
- - [How to Develop](#section76371145108)
- - [Development Example](#section994427141111)
-
-
-## Basic Concepts
+## Basic Concepts
As one of the most widely used programming languages, C++ supports features, such as classes, encapsulation, and overloading. It is an object-oriented programming language developed based on the C language.
-## Working Principles
+## Working Principles
The compiler supports C++ code identification. The system calls the constructors of global objects to perform initialization operations.
-## Development Guidelines
+## Development Guidelines
-### Available APIs
+### Available APIs
**Table 1** APIs supported by C++
@@ -41,7 +33,7 @@ The compiler supports C++ code identification. The system calls the constructors
|
|---|
-### How to Develop
+### How to Develop
Before using C++ features, you need to call **LOS\_CppSystemInit** to initialize C++ constructors. The initialized constructors are stored in the **init\_array** section, and the section range is passed by the variables **\_\_init\_array\_start\_\_** and **\_\_init\_array\_end\_\_**.
@@ -70,7 +62,7 @@ Before using C++ features, you need to call **LOS\_CppSystemInit** to initiali
> **NOTE:**
>The **LOS\_CppSystemInit** function must be called before a C++ service. When the C library used by the third-party compiler is not musl libc, some classes or APIs \(such as **std::thread** and **std::mutex**\) that are closely related to system resources have compatibility issues and are not recommended to use.
-### Development Example
+### Development Example
```
void app_init(void)
diff --git a/en/device-dev/kernel/kernel-mini-extend.md b/en/device-dev/kernel/kernel-mini-extend.md
index 96e3fe5ea4dabb1bf3891a04feb36f1602fe2b01..c59d1ca62675a1e7f36b2b94af272253ffd36d44 100644
--- a/en/device-dev/kernel/kernel-mini-extend.md
+++ b/en/device-dev/kernel/kernel-mini-extend.md
@@ -1,4 +1,4 @@
-# Extended Components
+# Extended Components
- **[C++ Support](kernel-mini-extend-support.md)**
diff --git a/en/device-dev/kernel/kernel-mini-memory-debug-cet.md b/en/device-dev/kernel/kernel-mini-memory-debug-cet.md
index ead21236f35840fa2ed6fa1d1517be4b9d14b853..3327c4a4eff7944024d7fe8b7eceb6158dd56eda 100644
--- a/en/device-dev/kernel/kernel-mini-memory-debug-cet.md
+++ b/en/device-dev/kernel/kernel-mini-memory-debug-cet.md
@@ -1,19 +1,13 @@
-# Memory Corruption Check
+# Memory Corruption Check
-- [Basic Concepts](#section17368154517335)
-- [Function Configuration](#section4696190123420)
-- [Development Guidelines](#section672362973417)
- - [How to Develop](#section026014863416)
- - [Development Example](#section186311302356)
- - [Sample Code](#section12709533354)
- - [Verification](#section81214126369)
-## Basic Concepts
+
+## Basic Concepts
As an optional function of the kernel, memory corruption check is used to check the integrity of a dynamic memory pool. This mechanism can detect memory corruption errors in the memory pool in a timely manner and provide alerts. It helps reduce problem locating costs and increase troubleshooting efficiency.
-## Function Configuration
+## Function Configuration
**LOSCFG\_BASE\_MEM\_NODE\_INTEGRITY\_CHECK**: specifies the setting of the memory corruption check. This function is disabled by default. To enable the function, set this macro to **1** in **target\_config.h**.
@@ -25,13 +19,13 @@ This check only detects the corrupted memory node and provides information about
> **CAUTION:**
>If memory corruption check is enabled, a magic number is added to the node header, which increases the size of the node header. The real-time integrity check has a great impact on the performance. In performance-sensitive scenarios, you are advised to disable this function and use **LOS\_MemIntegrityCheck** to check the memory pool integrity.
-## Development Guidelines
+## Development Guidelines
-### How to Develop
+### How to Develop
Check for memory corruption by calling **LOS\_MemIntegrityCheck**. If no memory corruption occurs, **0** is returned and no log is output. If memory corruption occurs, related log is output. For details, see the output of the following example.
-### Development Example
+### Development Example
This example implements the following:
@@ -39,7 +33,7 @@ This example implements the following:
2. Call **memset** to construct an out-of-bounds access and overwrites the first four bytes of the next node.
3. Call **LOS\_MemIntegrityCheck** to check whether memory corruption occurs.
-### Sample Code
+### Sample Code
The sample code is as follows:
@@ -60,7 +54,7 @@ void MemIntegrityTest(void)
}
```
-### Verification
+### Verification
The log is as follows:
diff --git a/en/device-dev/kernel/kernel-mini-memory-debug-det.md b/en/device-dev/kernel/kernel-mini-memory-debug-det.md
new file mode 100644
index 0000000000000000000000000000000000000000..c37ab8f1cc79a886064cb53e213abce8a858ea0e
--- /dev/null
+++ b/en/device-dev/kernel/kernel-mini-memory-debug-det.md
@@ -0,0 +1,119 @@
+# Memory Leak Check
+
+## Basic Concepts
+
+As an optional function of the kernel, memory leak check is used to locate dynamic memory leak problems. After this function is enabled, the dynamic memory automatically records the link registers \(LRs\) used when memory is allocated. If a memory leak occurs, the recorded information helps locate the memory allocated for further analysis.
+
+## Function Configuration
+
+1. **LOSCFG\_MEM\_LEAKCHECK**: specifies the setting of the memory leak check. This function is disabled by default. To enable the function, set this macro to **1** in **target\_config.h**.
+2. **LOSCFG\_MEM\_RECORD\_LR\_CNT**: number of LRs recorded. The default value is **3**. Each LR consumes the memory of **sizeof\(void \*\)** bytes.
+3. **LOSCFG\_MEM\_OMIT\_LR\_CNT**: number of ignored LRs. The default value is **4**, which indicates that LRs are recorded from the time when **LOS\_MemAlloc** is called. You can change the value based on actual requirements. This macro is configured because:
+ - **LOS\_MemAlloc** is also called internally.
+ - **LOS\_MemAlloc** may be encapsulated externally.
+ - The number of LRs configured by **LOSCFG\_MEM\_RECORD\_LR\_CNT** is limited.
+
+
+Correctly setting this macro can ignore invalid LRs and reduce memory consumption.
+
+## Development Guidelines
+
+### How to Develop
+
+Memory leak check provides a method to check for memory leak in key code logic. If this function is enabled, LR information is recorded each time when memory is allocated. When **LOS\_MemUsedNodeShow** is called before and after the code snippet is checked, information about all nodes that have been used in the specified memory pool is printed. You can compare the node information. The newly added node information indicates the node where the memory leak may occur. You can locate the code based on the LR and further check whether a memory leak occurs.
+
+The node information output by calling **LOS\_MemUsedNodeShow** is in the following format: Each line contains information about a node. The first column indicates the node address, based on which you can obtain complete node information using a tool such as a GNU Debugger \(GDB\). The second column indicates the node size, which is equal to the node header size plus the data field size. Columns 3 to 5 list the LR addresses. You can determine the specific memory location of the node based on the LR addresses and the assembly file.
+
+```
+node size LR[0] LR[1] LR[2]
+0x10017320: 0x528 0x9b004eba 0x9b004f60 0x9b005002
+0x10017848: 0xe0 0x9b02c24e 0x9b02c246 0x9b008ef0
+0x10017928: 0x50 0x9b008ed0 0x9b068902 0x9b0687c4
+0x10017978: 0x24 0x9b008ed0 0x9b068924 0x9b0687c4
+0x1001799c: 0x30 0x9b02c24e 0x9b02c246 0x9b008ef0
+0x100179cc: 0x5c 0x9b02c24e 0x9b02c246 0x9b008ef0
+```
+
+> **CAUTION**
+>Enabling memory leak check affects memory application performance. LR addresses will be recorded for each memory node, increasing memory overhead.
+
+### Development Example
+
+This example implements the following:
+
+1. Call **LOS\_MemUsedNodeShow** to print information about all nodes.
+2. Simulate a memory leak by requesting memory without releasing it.
+3. Call **LOS\_MemUsedNodeShow** to print information about all nodes.
+4. Compare the logs to obtain information about the node where a memory leak occurred.
+5. Locate the code based on the LR address.
+
+### Sample Code
+
+The sample code is as follows:
+
+```
+#include
+#include
+#include "los_memory.h"
+#include "los_config.h"
+
+void MemLeakTest(void)
+{
+ LOS_MemUsedNodeShow(LOSCFG_SYS_HEAP_ADDR);
+ void *ptr1 = LOS_MemAlloc(LOSCFG_SYS_HEAP_ADDR, 8);
+ void *ptr2 = LOS_MemAlloc(LOSCFG_SYS_HEAP_ADDR, 8);
+ LOS_MemUsedNodeShow(LOSCFG_SYS_HEAP_ADDR);
+}
+```
+
+### Verification
+
+The log is as follows:
+
+```
+node size LR[0] LR[1] LR[2]
+0x20001b04: 0x24 0x08001a10 0x080035ce 0x080028fc
+0x20002058: 0x40 0x08002fe8 0x08003626 0x080028fc
+0x200022ac: 0x40 0x08000e0c 0x08000e56 0x0800359e
+0x20002594: 0x120 0x08000e0c 0x08000e56 0x08000c8a
+0x20002aac: 0x56 0x08000e0c 0x08000e56 0x08004220
+
+node size LR[0] LR[1] LR[2]
+0x20001b04: 0x24 0x08001a10 0x080035ce 0x080028fc
+0x20002058: 0x40 0x08002fe8 0x08003626 0x080028fc
+0x200022ac: 0x40 0x08000e0c 0x08000e56 0x0800359e
+0x20002594: 0x120 0x08000e0c 0x08000e56 0x08000c8a
+0x20002aac: 0x56 0x08000e0c 0x08000e56 0x08004220
+0x20003ac4: 0x1d 0x08001458 0x080014e0 0x080041e6
+0x20003ae0: 0x1d 0x080041ee 0x08000cc2 0x00000000
+```
+
+The difference between the two logs is as follows. The following memory nodes are suspected to have blocks with a memory leak.
+
+```
+0x20003ac4: 0x1d 0x08001458 0x080014e0 0x080041e6
+0x20003ae0: 0x1d 0x080041ee 0x08000cc2 0x00000000
+```
+
+The following is part of the assembly file:
+
+```
+ MemLeakTest:
+ 0x80041d4: 0xb510 PUSH {R4, LR}
+ 0x80041d6: 0x4ca8 LDR.N R4, [PC, #0x2a0] ; g_memStart
+ 0x80041d8: 0x0020 MOVS R0, R4
+ 0x80041da: 0xf7fd 0xf93e BL LOS_MemUsedNodeShow ; 0x800145a
+ 0x80041de: 0x2108 MOVS R1, #8
+ 0x80041e0: 0x0020 MOVS R0, R4
+ 0x80041e2: 0xf7fd 0xfbd9 BL LOS_MemAlloc ; 0x8001998
+ 0x80041e6: 0x2108 MOVS R1, #8
+ 0x80041e8: 0x0020 MOVS R0, R4
+ 0x80041ea: 0xf7fd 0xfbd5 BL LOS_MemAlloc ; 0x8001998
+ 0x80041ee: 0x0020 MOVS R0, R4
+ 0x80041f0: 0xf7fd 0xf933 BL LOS_MemUsedNodeShow ; 0x800145a
+ 0x80041f4: 0xbd10 POP {R4, PC}
+ 0x80041f6: 0x0000 MOVS R0, R0
+```
+
+The memory node addressed by **0x080041ee** is not released after being requested in **MemLeakTest**.
+
diff --git a/en/device-dev/kernel/kernel-mini-memory-debug-mes.md b/en/device-dev/kernel/kernel-mini-memory-debug-mes.md
index b0bcda96d99bca497c4fafc3a2e5930209ee17ac..ac38e0e6b12a385de47e0ef10b62d848aa701e13 100644
--- a/en/device-dev/kernel/kernel-mini-memory-debug-mes.md
+++ b/en/device-dev/kernel/kernel-mini-memory-debug-mes.md
@@ -1,15 +1,6 @@
-# Memory Information Statistics
+# Memory Information Statistics
-- [Basic Concepts](#section52691565235)
-- [Function Configuration](#section470611682411)
-- [Development Guidelines](#section9368374243)
- - [How to Develop](#section679912407257)
- - [Development Example](#section1025453412611)
- - [Sample Code](#section165277971315)
- - [Verification](#section3460102414271)
-
-
-## Basic Concepts
+## Basic Concepts
Memory information includes the memory pool size, memory usage, remaining memory size, maximum free memory, memory waterline, number of memory nodes, and fragmentation rate.
@@ -22,13 +13,13 @@ Memory information includes the memory pool size, memory usage, remaining memory
- Other parameters: You can call APIs \(described in [Memory Management](kernel-mini-basic-memory-basic.md)\) to scan node information in the memory pool and collect statistics.
-## Function Configuration
+## Function Configuration
**LOSCFG\_MEM\_WATERLINE**: specifies the setting of the memory information statistics function. This function is enabled by default. To disable the function, set this macro to **0** in **target\_config.h**. If you want to obtain the memory waterline, you must enable this macro.
-## Development Guidelines
+## Development Guidelines
-### How to Develop
+### How to Develop
Key structure:
@@ -52,7 +43,7 @@ typedef struct {
Fragmentation rate = 100 – 100 x Maximum free memory block size/Remaining memory size
-### Development Example
+### Development Example
This example implements the following:
@@ -62,7 +53,7 @@ This example implements the following:
3. Calculate the memory usage and fragmentation rate.
-### Sample Code
+### Sample Code
The sample code is as follows:
@@ -107,7 +98,7 @@ int MemTest(void)
}
```
-### Verification
+### Verification
The result is as follows:
diff --git a/en/device-dev/kernel/kernel-mini-memory-debug.md b/en/device-dev/kernel/kernel-mini-memory-debug.md
index 23495e1b92221cc3e8dd0565a6a001455acbed5c..623b9f36ff3183ce5dd1afad8cb18a46c97c115a 100644
--- a/en/device-dev/kernel/kernel-mini-memory-debug.md
+++ b/en/device-dev/kernel/kernel-mini-memory-debug.md
@@ -1,10 +1,10 @@
-# Memory Debugging
+# Memory Debugging
The purpose of memory debugging is to locate problems related to dynamic memory. The kernel provides a variety of memory debugging methods. Dynamic memory pool statistics helps you learn the memory pool waterline and fragmentation rate. Memory leak check helps you accurately locate the code where memory leak occurs and analyze the memory usage of each module. Memory corruption check helps you locate memory corruptions.
- **[Memory Information Statistics](kernel-mini-memory-debug-mes.md)**
-- **[Memory Leak Check](kernel-mini-imemory-debug-det.md)**
+- **[Memory Leak Check](kernel-mini-memory-debug-det.md)**
- **[Memory Corruption Check](kernel-mini-memory-debug-cet.md)**
diff --git a/en/device-dev/kernel/kernel-mini-memory-exception.md b/en/device-dev/kernel/kernel-mini-memory-exception.md
index bdbb43b4b1f9637a7167525c912f57c85dccbff9..a5fa385993177947d5884643fd3186cb65d2bfa8 100644
--- a/en/device-dev/kernel/kernel-mini-memory-exception.md
+++ b/en/device-dev/kernel/kernel-mini-memory-exception.md
@@ -1,18 +1,10 @@
-# Exception Debugging
+# Exception Debugging
-- [Basic Concepts](#section2741911123412)
-- [Working Principles](#section16618124317346)
-- [Available APIs](#section16111931351)
-- [Usage Guidelines](#section16317163520350)
- - [How to Develop](#section13457839133618)
- - [How to Locate Exceptions](#section197332323815)
-
-
-## Basic Concepts
+## Basic Concepts
The OpenHarmony LiteOS-M provides exception handling and debugging measures to help locate and analyze problems. Exception handling involves a series of actions taken by the OS to respond to exceptions occurred during the OS running, for example, printing the exception type, system status, call stack information of the current function, CPU information, and call stack information of tasks.
-## Working Principles
+## Working Principles
A stack frame contains information such as function parameters, variables, and return value in a function call process. When a function is called, a stack frame of the subfunction is created, and the input parameters, local variables, and registers of the function are stored into the stack. Stack frames grow towards lower addresses. The ARM32 CPU architecture is used as an example. Each stack frame stores the historical values of the program counter \(PC\), LR \(link register\), stack pointer \(SP\), and frame pointer \(FP\) registers. The LR points to the return address of a function, and the FP points to the start address of the stack frame of the function's parent function. The FP helps locate the parent function's stack frame, which further helps locate the parent function's FP. The parent function's FP helps locate the grandparent function's stack frame and FP... In this way, the call stack of the program can be traced to obtain the relationship between the functions called.
@@ -20,12 +12,12 @@ When an exception occurs in the system, the system prints the register informati
The following figure illustrates the stack analysis mechanism for your reference. The actual stack information varies depending on the CPU architecture.
-**Figure 1** Stack analysis mechanism
+**Figure 1** Stack analysis mechanism

In the figure, the registers in different colors indicate different functions. The registers save related data when functions are called. The FP register helps track the stack to the parent function of the abnormal function and further presents the relationships between the functions called.
-## Available APIs
+## Available APIs
The following table describes APIs available for the OpenHarmony LiteOS-M stack trace module. For more details about the APIs, see the API reference.
@@ -55,9 +47,9 @@ The following table describes APIs available for the OpenHarmony LiteOS-M stack
-## Usage Guidelines
+## Usage Guidelines
-### How to Develop
+### How to Develop
The typical process for enabling exception debugging is as follows:
@@ -262,7 +254,7 @@ The typical process for enabling exception debugging is as follows:
```
-### How to Locate Exceptions
+### How to Locate Exceptions
The procedure for locating the exception is as follows:
diff --git a/en/device-dev/kernel/kernel-mini-memory-lms.md b/en/device-dev/kernel/kernel-mini-memory-lms.md
index 1508f028691103ef327dcfa6afdb987195aab0f5..afce67ceeabce8acadfd993eebd32f7e968280b9 100644
--- a/en/device-dev/kernel/kernel-mini-memory-lms.md
+++ b/en/device-dev/kernel/kernel-mini-memory-lms.md
@@ -1,16 +1,6 @@
-# LMS
+# LMS
-- [Basic Concepts](#section7605453104815)
-- [Working Principles](#section8495832174910)
-- [Available APIs](#section05501853194918)
-- [Development Guidelines](#section177357243510)
- - [How to Develop](#section125863345112)
- - [Development Example](#section812115715313)
- - [Sample Code](#section614842310538)
- - [Verification](#section980212293548)
-
-
-## Basic Concepts
+## Basic Concepts
Lite Memory Sanitizer \(LMS\) is a tool used to detect memory errors on a real-time basis. LMS can detect buffer overflow, Use-After-Free \(UAF\), and double free errors in real time, and notify the operating system immediately. Together with locating methods such as Backtrace, LMS can locate the code line that causes the memory error. It greatly improves the efficiency of locating memory errors.
@@ -21,7 +11,7 @@ The LMS module of the OpenHarmony LiteOS-M kernel provides the following functio
- Checks the memory when bounds-checking functions are called \(enabled by default\).
- Checks the memory when libc frequently accessed functions, including **memset**, **memcpy**, **memmove**, **strcat**, **strcpy**, **strncat** and **strncpy**, are called.
-## Working Principles
+## Working Principles
LMS uses shadow memory mapping to mark the system memory state. There are three states: **Accessible**, **RedZone**, and **Freed**. The shadow memory is located in the tail of the memory pool.
@@ -30,7 +20,7 @@ LMS uses shadow memory mapping to mark the system memory state. There are three
- During code compilation, a function is inserted before the read/write instructions in the code to check the address validity. The tool checks the state value of the shadow memory that accesses the memory. If the shadow memory is in the **RedZone** statue, an overflow error will be reported. If the shadow memory is in the **Freed** state, a UAF error will be reported.
- When memory is released, the tool checks the state value of the shadow memory at the released address. If the shadow memory is in the **RedZone** state, a double free error will be reported.
-## Available APIs
+## Available APIs
The LMS module of the OpenHarmony LiteOS-M kernel provides the following APIs. For more details about the APIs, see the [API](https://gitee.com/openharmony/kernel_liteos_m/blob/master/components/lms/los_lms.h) reference.
@@ -76,9 +66,9 @@ The LMS module of the OpenHarmony LiteOS-M kernel provides the following APIs. F
-## Development Guidelines
+## Development Guidelines
-### How to Develop
+### How to Develop
The typical process for enabling LMS is as follows:
@@ -173,7 +163,7 @@ The typical process for enabling LMS is as follows:
3. Recompile the code and check the serial port output. The memory problem detected will be displayed.
-### Development Example
+### Development Example
This example implements the following:
@@ -181,7 +171,7 @@ This example implements the following:
2. Construct a buffer overflow error and a UAF error.
3. Add "-fsanitize=kernel-address", execute the compilation, and check the output.
-### Sample Code
+### Sample Code
The code is as follows:
@@ -240,7 +230,7 @@ UINT32 Example_Lms_test(VOID){
}
```
-### Verification
+### Verification
The output is as follows:
diff --git a/en/device-dev/kernel/kernel-mini-memory-perf.md b/en/device-dev/kernel/kernel-mini-memory-perf.md
index 5d20af7b12d138286132a2c1b726197229c62b04..3da1dd5dc276a844ed393af9b7d73bed23a4b767 100644
--- a/en/device-dev/kernel/kernel-mini-memory-perf.md
+++ b/en/device-dev/kernel/kernel-mini-memory-perf.md
@@ -1,28 +1,11 @@
-# perf
+# perf
-- [Basic Concepts](#section531482192018)
-- [Working Principles](#section5125124532010)
-- [Available APIs](#section17747184017458)
- - [Kernel Mode](#section104473014465)
- - [User Mode](#section1996920294531)
-- [Development Guidelines](#section10302175017543)
- - [Kernel-mode Development Process](#section04021008552)
-
-- [Kernel-mode Development Example](#section112034213583)
-- [Kernel-mode Sample Code](#section10348549155812)
- - [Kernel-mode Verification](#section61719481795)
- - [User-mode Development Process](#section1425821711114)
- - [User-mode Development Example](#section3470546163)
- - [User-Mode Sample Code](#section183253286161)
- - [User-mode Verification](#section5665123516214)
-
-
-## Basic Concepts
+## Basic Concepts
perf is a performance analysis tool. It uses the performance monitoring unit \(PMU\) to count sampling events and collect context information and provides hot spot distribution and hot paths.
-## Working Principles
+## Working Principles
When a performance event occurs, the corresponding event counter overflows and triggers an interrupt. The interrupt handler records the event information, including the current PC, task ID, and call stack.
@@ -30,9 +13,9 @@ perf provides two working modes: counting mode and sampling mode.
In counting mode, perf collects only the number of event occurrences and duration. In sampling mode, perf also collects context data and stores the data in a circular buffer. The IDE then analyzes the data and provides information about hotspot functions and paths.
-## Available APIs
+## Available APIs
-### Kernel Mode
+### Kernel Mode
The perf module of the OpenHarmony LiteOS-A kernel provides the following APIs. For more details about the APIs, see the [API](https://gitee.com/openharmony/kernel_liteos_a/blob/master/kernel/include/los_perf.h) reference.
@@ -117,7 +100,7 @@ The perf module of the OpenHarmony LiteOS-A kernel provides the following APIs.
The API for flushing the cache is configured based on the platform.
-### User Mode
+### User Mode
The perf character device is located in **/dev/perf**. You can read, write, and control the user-mode perf by running the following commands on the device node:
@@ -134,11 +117,11 @@ The perf character device is located in **/dev/perf**. You can read, write, and
The operations correspond to **LOS\_PerfStart** and **LOS\_PerfStop**.
-For more details, see [User-mode Development Example](#section3470546163).
+For more details, see [User-mode Development Example](#user-mode-development-example).
-## Development Guidelines
+## Development Guidelines
-### Kernel-mode Development Process
+### Kernel-mode Development Process
The typical process of enabling perf is as follows:
@@ -235,7 +218,7 @@ The typical process of enabling perf is as follows:
4. Call **LOS\_PerfStop** at the end of the code to be sampled.
5. Call **LOS\_PerfDataRead** to read the sampling data and use IDE to analyze the collected data.
-## Kernel-mode Development Example
+## Kernel-mode Development Example
This example implements the following:
@@ -246,7 +229,7 @@ This example implements the following:
5. Stop perf.
6. Export the result.
-## Kernel-mode Sample Code
+## Kernel-mode Sample Code
Prerequisites: The perf module configuration is complete in **menuconfig**.
@@ -333,7 +316,7 @@ UINT32 Example_Perf_test(VOID){
LOS_MODULE_INIT(perfTestHwEvent, LOS_INIT_LEVEL_KMOD_EXTENDED);
```
-### Kernel-mode Verification
+### Kernel-mode Verification
The output is as follows:
@@ -362,7 +345,7 @@ hex: 00 ef ef ef 00 00 00 00 14 00 00 00 60 00 00 00 00 00 00 00 70 88 36 40 08
You can also call **LOS\_PerfDataRead** to read data to a specified address for further analysis. In the example, **OsPrintBuff** is a test API, which prints the sampled data by byte. **num** indicates the sequence number of the byte, and **hex** indicates the value in the byte.
-### User-mode Development Process
+### User-mode Development Process
Choose **Driver** \> **Enable PERF DRIVER** in **menuconfig** to enable the perf driver. This option is available in **Driver** only after **Enable Perf Feature** is selected in the kernel.
@@ -440,10 +423,10 @@ time used: 0.059000(s)
save perf data success at /storage/data/perf.data
```
-> **NOTE:**
+> **NOTE**
>After running the **./perf stat/record** command, you can run the **./perf start** and **./perf stop** commands multiple times. The sampling event configuration is as per the parameters set in the latest **./perfstat/record** command.
-### User-mode Development Example
+### User-mode Development Example
This example implements the following:
@@ -453,7 +436,7 @@ This example implements the following:
4. Stop perf.
5. Read the perf sampling data.
-### User-Mode Sample Code
+### User-Mode Sample Code
The code is as follows:
@@ -523,7 +506,7 @@ int main(int argc, char **argv)
}
```
-### User-mode Verification
+### User-mode Verification
The output is as follows:
diff --git a/en/device-dev/kernel/kernel-mini-memory-trace.md b/en/device-dev/kernel/kernel-mini-memory-trace.md
index bd9b0553e9fe8efa2c220f95666deef2708604c2..1417442602eee705b8541acd9547f3dd55267d23 100644
--- a/en/device-dev/kernel/kernel-mini-memory-trace.md
+++ b/en/device-dev/kernel/kernel-mini-memory-trace.md
@@ -1,20 +1,10 @@
-# Trace
+# Trace
-- [Basic Concepts](#section44851752123712)
-- [Working Principles](#section5282148123813)
-- [Available APIs](#section16304193215387)
-- [Development Guidelines](#section498695853819)
- - [How to Develop](#section1875652316393)
- - [Development Example](#section0403134913395)
- - [Sample Code](#section1492711418400)
- - [Verification](#section869613984012)
-
-
-## Basic Concepts
+## Basic Concepts
Trace helps you learn about the kernel running process and the execution sequence of modules and tasks. With the information, you can better understand the code running process of the kernel and locate time sequence problems.
-## Working Principles
+## Working Principles
The kernel provides a hook framework to embed hooks in the main process of each module. In the initial startup phase of the kernel, the trace function is initialized and the trace handlers are registered with the hooks.
@@ -28,7 +18,7 @@ In offline mode, trace frames are stored in a circular buffer. If too many frame
The online mode must be used with the integrated development environment \(IDE\). Trace frames are sent to the IDE in real time. The IDE parses the records and displays them in a visualized manner.
-## Available APIs
+## Available APIs
The trace module of the OpenHarmony LiteOS-M kernel provides the following functions. For more details about the APIs, see the API reference.
@@ -178,9 +168,9 @@ The trace module of the OpenHarmony LiteOS-M kernel provides the following funct
The interrupt events with interrupt ID of **TIMER\_INT** or **DMA\_INT** are not traced.
-## Development Guidelines
+## Development Guidelines
-### How to Develop
+### How to Develop
The typical trace process is as follows:
@@ -271,7 +261,7 @@ The methods in steps 3 to 7 are encapsulated with shell commands. After the shel
- LOS\_TraceStop —— trace\_stop
- LOS\_TraceRecordDump —— trace\_dump
-### Development Example
+### Development Example
This example implements the following:
@@ -281,7 +271,7 @@ This example implements the following:
4. Stop trace.
5. Output trace data in the specified format.
-### Sample Code
+### Sample Code
The sample code is as follows:
@@ -330,7 +320,7 @@ UINT32 Example_Trace_test(VOID){
}
```
-### Verification
+### Verification
The output is as follows:
diff --git a/en/device-dev/kernel/kernel-mini-overview.md b/en/device-dev/kernel/kernel-mini-overview.md
index c960444afb9c9596cf6689637701228e34e303ac..3ff627c00e0d0569b018b1a15a4113632cc2e7b7 100644
--- a/en/device-dev/kernel/kernel-mini-overview.md
+++ b/en/device-dev/kernel/kernel-mini-overview.md
@@ -1,20 +1,15 @@
-# Kernel Overview
+# Kernel Overview
-- [Overview](#section1429342661510)
- - [CPU Architecture Support](#section48891456112819)
- - [Working Principles](#section4599142312817)
-
-
-## Overview
+## Overview
The OpenHarmony LiteOS-M kernel is a lightweight operating system \(OS\) kernel designed for the IoT field. It features small size, low power consumption, and high performance. The LiteOS-M kernel has simple code structure, including the minimum function set, kernel abstraction layer \(KAL\), optional components, and project directory. It supports the Hardware Driver Foundation \(HDF\), which provides unified driver standards and access mode for device vendors to simplify porting of drivers and allow one-time development for multi-device deployment.
The OpenHarmony LiteOS-M kernel architecture consists of the hardware layer and hardware-irrelevant layers, as shown in [Figure 1](#fig1287712172318). The hardware layer is classified based on the compiler toolchain and chip architecture, and provides a unified Hardware Abstraction Layer \(HAL\) interface to improve hardware adaptation and facilitate the expansion of various types of AIoT hardware and compilation toolchains. The other modules are irrelevant to the hardware. The basic kernel module provides basic kernel capabilities. The extended modules provide capabilities of components, such as the network and file systems, as well as exception handling and debug tools. The KAL provides unified standard APIs.
-**Figure 1** Kernel architecture
+**Figure 1** Kernel architecture

-### CPU Architecture Support
+### CPU Architecture Support
The CPU architecture includes two layers: general architecture definition layer and specific architecture definition layer. The former provides interfaces supported and implemented by all architectures. The latter is specific to an architecture. For a new architecture to be added, the general architecture definition layer must be implemented first and the architecture-specific functions can be implemented at the specific architecture definition layer.
@@ -55,10 +50,10 @@ The CPU architecture includes two layers: general architecture definition layer
LiteOS-M supports mainstream architectures, such as ARM Cortex-M3, ARM Cortex-M4, ARM Cortex-M7, ARM Cortex-M33, and RISC-V. If you need to expand the CPU architecture, see [Chip Architecture Adaptation](../porting/porting-chip-kernel-overview.md#section137431650339).
-### Working Principles
+### Working Principles
Configure the system clock and number of ticks per second in the **target\_config.h** file of the development board. Configure the task, memory, inter-process communication \(IPC\), and exception handling modules based on service requirements. When the system boots, the modules are initialized based on the configuration. The kernel startup process includes peripheral initialization, system clock configuration, kernel initialization, and OS boot. For details, see [Figure 2](#fig74259220441).
-**Figure 2** Kernel startup process
+**Figure 2** Kernel startup process

diff --git a/en/device-dev/kernel/kernel-mini.md b/en/device-dev/kernel/kernel-mini.md
index 8239d9975cfac2e4085380f1ddf2670f567578d2..16f0e597cd0e2d2ba5e928657545d62ae243c22b 100644
--- a/en/device-dev/kernel/kernel-mini.md
+++ b/en/device-dev/kernel/kernel-mini.md
@@ -1,4 +1,4 @@
-# Kernel for the Mini System
+# Mini-System Kernel
- **[Kernel Overview](kernel-mini-overview.md)**
@@ -10,4 +10,3 @@
- **[Appendix](kernel-mini-app.md)**
-
diff --git a/en/device-dev/kernel/kernel-small-apx-bitwise.md b/en/device-dev/kernel/kernel-small-apx-bitwise.md
index ffeae41515eac857df100180c8c002633d747971..a3760fc0c586a410de798654e2d4c3f75c2c39ce 100644
--- a/en/device-dev/kernel/kernel-small-apx-bitwise.md
+++ b/en/device-dev/kernel/kernel-small-apx-bitwise.md
@@ -1,13 +1,8 @@
-# Bitwise Operation
+# Bitwise Operation
-- [Basic Concepts](#section1990715203418)
-- [Available APIs](#section848334511411)
-- [Development Example](#section67569495514)
- - [Example Description](#section33551554391)
- - [Verification](#section8931859194)
-## Basic Concepts
+## Basic Concepts
A bitwise operation operates on a binary number at the level of its individual bits. For example, a variable can be set as a program status word \(PSW\), and each bit \(flag bit\) in the PSW can have a self-defined meaning.
@@ -110,7 +105,7 @@ static UINT32 BitSample(VOID)
}
```
-### Verification
+### Verification
The development is successful if the return result is as follows:
diff --git a/en/device-dev/kernel/kernel-small-apx-dll.md b/en/device-dev/kernel/kernel-small-apx-dll.md
index 7862c000c87443d6ecf927fd4432166801a033a1..2e7bb0d0fadcf92e14ea957b89728e240542c18a 100644
--- a/en/device-dev/kernel/kernel-small-apx-dll.md
+++ b/en/device-dev/kernel/kernel-small-apx-dll.md
@@ -1,16 +1,12 @@
-# Doubly Linked List
+# Doubly Linked List
-- [Basic Concepts](#section1990715203418)
-- [Available APIs](#section848334511411)
-- [How to Develop](#section01781261552)
- - [Development Example](#section8354175218128)
-## Basic Concepts
+## Basic Concepts
A doubly linked list is a linked data structure that consists of a set of sequentially linked records called nodes. Each node contains a pointer to the previous node and a pointer to the next node in the sequence of nodes. The pointer head is unique. A doubly linked list allows access from a list node to its next node and also the previous node on the list. This data structure facilitates data search, especially traversal of a large amount of data. The symmetry of the doubly linked list also makes operations, such as insertion and deletion, easy. However, pay attention to the pointer direction when performing operations.
-## Available APIs
+## Available APIs
The following table describes APIs available for the doubly linked list. For more details about the APIs, see the API reference.
diff --git a/en/device-dev/kernel/kernel-small-apx-library.md b/en/device-dev/kernel/kernel-small-apx-library.md
index ffba0b91f7385c047d5d51b9e5b6072b69e94c01..c99d339880983a28403409a2caf157a20875c47b 100644
--- a/en/device-dev/kernel/kernel-small-apx-library.md
+++ b/en/device-dev/kernel/kernel-small-apx-library.md
@@ -1,18 +1,9 @@
-# Standard Library
-
-- [Standard Library API Framework](#section149319478561)
-- [Development Example](#section20874620185915)
-- [Differences from the Linux Standard Library](#section6555642165713)
- - [Process](#section11299104511409)
- - [Memory](#section175754484116)
- - [File System](#section118191113134220)
- - [Signal](#section195939264421)
- - [Time](#section20825124304213)
+# Standard Library
The OpenHarmony kernel uses the musl libc library that supports the Portable Operating System Interface \(POSIX\). You can develop components and applications working on the kernel based on the POSIX.
-## Standard Library API Framework
+## Standard Library API Framework
**Figure 1** POSIX framework

@@ -21,7 +12,7 @@ The musl libc library supports POSIX standards. The OpenHarmony kernel adapts th
For details about the APIs supported by the standard library, see the API document of the C library, which also covers the differences between the standard library and the POSIX standard library.
-## Development Example
+## Development Example
In this example, the main thread creates **THREAD\_NUM** child threads. Once a child thread is started, it enters the standby state. After the main thread successfully wakes up all child threads, they continue to execute until the lifecycle ends. The main thread uses the **pthread\_join** method to wait until all child threads are executed.
@@ -197,17 +188,17 @@ int main(int argc, char *argv[])
#endif /* __cplusplus */
```
-## Differences from the Linux Standard Library
+## Differences from the Linux Standard Library
This section describes the key differences between the standard library carried by the OpenHarmony kernel and the Linux standard library. For more differences, see the API document of the C library.
-### Process
+### Process
1. The OpenHarmony user-mode processes support only static priorities, which range from 10 \(highest\) to 31 \(lowest\).
2. The OpenHarmony user-mode threads support only static priorities, which range from 0 \(highest\) to 31 \(lowest\).
3. The OpenHarmony process scheduling supports **SCHED\_RR** only, and thread scheduling supports **SCHED\_RR** or **SCHED\_FIFO**.
-### Memory
+### Memory
**h2****Difference with Linux mmap**
@@ -266,7 +257,7 @@ int main(int argc, char *argv[])
}
```
-### File System
+### File System
**System directories**: You cannot modify system directories and device mount directories, which include **/dev**, **/proc**, **/app**, **/bin**, **/data**, **/etc**, **/lib**, **/system** and **/usr**.
@@ -274,14 +265,14 @@ int main(int argc, char *argv[])
Except in the system and user directories, you can create directories and mount devices. Note that nested mount is not allowed, that is, a mounted folder and its subfolders cannot be mounted repeatedly. A non-empty folder cannot be mounted.
-### Signal
+### Signal
- The default behavior for signals does not include **STOP**, **CONTINUE**, or **COREDUMP**.
- A sleeping process \(for example, a process enters the sleeping status by calling the sleep function\) cannot be woken up by a signal. The signal mechanism does not support the wakeup function. The behavior for a signal can be processed only when the process is scheduled by the CPU.
- After a process exits, **SIGCHLD** is sent to the parent process. The sending action cannot be canceled.
- Only signals 1 to 30 are supported. The callback is executed only once even if the same signal is received multiple times.
-### Time
+### Time
The OpenHarmony time precision is based on tick. The default value is 10 ms/tick. The time error of the **sleep** and **timeout** functions is less than or equal to 20 ms.
diff --git a/en/device-dev/kernel/kernel-small-apx-structure.md b/en/device-dev/kernel/kernel-small-apx-structure.md
index 7e27b4cea1df8c36fdfc218b8d5fc9919dde5e44..79d704c39b2d73f29bf804b24464c35aa8b18a6c 100644
--- a/en/device-dev/kernel/kernel-small-apx-structure.md
+++ b/en/device-dev/kernel/kernel-small-apx-structure.md
@@ -1,4 +1,4 @@
-# Basic Data Structure
+# Basic Data Structure
- **[Doubly Linked List](kernel-small-apx-dll.md)**
diff --git a/en/device-dev/kernel/kernel-small-apx.md b/en/device-dev/kernel/kernel-small-apx.md
index 4855425ba469d0f00f1c7e9539d3622ba16e6fa6..1f6a972e95f1dbe1cb18c612b4f813fc3c90517b 100644
--- a/en/device-dev/kernel/kernel-small-apx.md
+++ b/en/device-dev/kernel/kernel-small-apx.md
@@ -1,4 +1,4 @@
-# Appendix
+# Appendix
- **[Basic Data Structure](kernel-small-apx-structure.md)**
diff --git a/en/device-dev/kernel/kernel-small-basic-atomic.md b/en/device-dev/kernel/kernel-small-basic-atomic.md
index 6ab30f5b86ec8e8d8c2b9f034b5592cfd800fd26..12045b51bfb493d204ddde26a55c9f8bc29a28d7 100644
--- a/en/device-dev/kernel/kernel-small-basic-atomic.md
+++ b/en/device-dev/kernel/kernel-small-basic-atomic.md
@@ -1,14 +1,7 @@
-# Atomic Operation
+# Atomic Operation
-- [Basic Concepts](#section1792118384594)
-- [Working Principles](#section1786635117596)
-- [Development Guidelines](#section2911115308)
- - [Available APIs](#section335914201010)
- - [How to Develop](#section12207371304)
- - [Development Example](#section8538651511)
-
-## Basic Concepts
+## Basic Concepts
In an OS that supports multiple tasks, modifying data in a memory area requires three steps: read data, modify data, and write data. However, data in a memory area may be simultaneously accessed by multiple tasks. If the data modification is interrupted by another task, the execution result of the operation is unpredictable.
@@ -16,7 +9,7 @@ Although you can enable or disable interrupts to ensure that the multi-task exec
The ARMv6 architecture has introduced the **LDREX** and **STREX** instructions to support more discreet non-blocking synchronization of the shared memory. The atomic operations implemented thereby can ensure that the "read-modify-write" operations on the same data will not be interrupted, that is, the operation atomicity is ensured.
-## Working Principles
+## Working Principles
The OpenHarmony system has encapsulated the **LDREX** and **STREX** in the ARMv6 architecture to provide a set of atomic operation APIs.
@@ -45,9 +38,9 @@ The OpenHarmony system has encapsulated the **LDREX** and **STREX** in the A
- If the flag register is **1**, the system continues the loop and performs the atomic operation again.
-## Development Guidelines
+## Development Guidelines
-### Available APIs
+### Available APIs
The following table describes the APIs available for the OpenHarmony LiteOS-A kernel atomic operation module. For more details about the APIs, see the API reference.
@@ -197,11 +190,11 @@ The following table describes the APIs available for the OpenHarmony LiteOS-A ke
-### How to Develop
+### How to Develop
When multiple tasks perform addition, subtraction, and swap operations on the same memory data, use atomic operations to ensure predictability of results.
-> **NOTE:**
+> **NOTE**
>Atomic operation APIs support only integer data.
### Development Example
diff --git a/en/device-dev/kernel/kernel-small-basic-inner-reflect.md b/en/device-dev/kernel/kernel-small-basic-inner-reflect.md
index e98b00d36193ce7a80f1ccb1cfc27671207e7c89..a90d63bcfb05ea1e78e3620fbd8fc0cd5334defe 100644
--- a/en/device-dev/kernel/kernel-small-basic-inner-reflect.md
+++ b/en/device-dev/kernel/kernel-small-basic-inner-reflect.md
@@ -1,20 +1,14 @@
-# Virtual-to-Physical Mapping
+# Virtual-to-Physical Mapping
-- [Basic Concepts](#section9108144913615)
-- [Working Principles](#section12392621871)
-- [Development Guidelines](#section10264102013713)
- - [Available APIs](#section195320251578)
- - [How to Develop](#section152774210712)
-
-## Basic Concepts
+## Basic Concepts
The Memory Management Unit \(MMU\) is used to map the virtual addresses in the process space and the actual physical addresses and specify corresponding access permissions and cache attributes. When a program is executed, the CPU accesses the virtual memory, locates the corresponding physical memory based on the MMU page table entry, and executes the code or performs data read/write operations. The page tables of the MMU store the mappings between virtual and physical addresses and the access permission. A page table is created when each process is created. The page table contains page table entries \(PTEs\), and each PTE describes a mapping between a virtual address region and a physical address region. The MMU has a Translation Lookaside Buffer \(TLB\) for address translation. During address translation, the MMU first searches the TLB for the corresponding PTE. If a match is found, the address can be returned directly. The following figure illustrates how the CPU accesses the memory or peripherals.
-**Figure 1** CPU accessing the memory or peripheral
+**Figure 1** CPU accessing the memory or peripheral

-## Working Principles
+## Working Principles
Virtual-to-physical address mapping is a process of establishing page tables. The MMU supports multi-level page tables. The LiteOS-A kernel uses the level-2 page tables to describe the process space. Each level-1 PTE descriptor occupies 4 bytes, which indicate a mapping record of 1 MiB memory space. The 1 GiB user space of the LiteOS-A kernel has 1024 level-1 PTEs. When a user process is created, a 4 KiB memory block is requested from the memory as the storage area of the level-1 page table. Memory is dynamically allocated for the level-2 page table based on requirements of the process.
@@ -22,12 +16,12 @@ Virtual-to-physical address mapping is a process of establishing page tables. Th
- When the program is executed, as shown by the bold arrow in the following figure, the CPU accesses the virtual address and checks for the corresponding physical memory in the MMU. If the virtual address does not have the corresponding physical address, a page missing fault is triggered. The kernel requests the physical memory, writes the virtual-physical address mapping and the related attributes to the page table, and caches the PTE in the TLB. Then, the CPU can directly access the actual physical memory.
- If the PTE already exists in the TLB, the CPU can access the physical memory without accessing the page table stored in the memory.
-**Figure 2** CPU accessing the memory
+**Figure 2** CPU accessing the memory

-## Development Guidelines
+## Development Guidelines
-### Available APIs
+### Available APIs
**Table 1** APIs of the virtual-to-physical address mapping module
@@ -70,7 +64,7 @@ Virtual-to-physical address mapping is a process of establishing page tables. Th
-### How to Develop
+### How to Develop
To use virtual-to-physical address mapping APIs:
@@ -83,6 +77,6 @@ To use virtual-to-physical address mapping APIs:
3. Call **LOS\_ArchMmuUnmap** to remove the mapping.
-> **NOTE:**
+> **NOTE**
>The preceding APIs can be used after the MMU initialization is complete and the page tables of the related process are created. The MMU initialization is complete during system startup, and page tables are created when the processes are created. You do not need to perform any operation.
diff --git a/en/device-dev/kernel/kernel-small-basic-interrupt.md b/en/device-dev/kernel/kernel-small-basic-interrupt.md
index d7e0c6a695d5737427c6c8c331e84d4b9585fe13..b84a71b17ddd6c99f9278514a7c514bfc4bc5781 100644
--- a/en/device-dev/kernel/kernel-small-basic-interrupt.md
+++ b/en/device-dev/kernel/kernel-small-basic-interrupt.md
@@ -1,12 +1,4 @@
-# Interrupt and Exception Handling
-
-- [Basic Concepts](#section439816296117)
-- [Working Principles](#section2792838318)
-- [Development Guidelines](#section15415165510110)
- - [Available APIs](#section57441612024)
- - [How to Develop](#section64332181221)
- - [Development Example](#section204698276478)
- - [Verification](#section1466144215476)
+# Interrupt and Exception Handling
## Basic Concepts
diff --git a/en/device-dev/kernel/kernel-small-basic-memory-heap.md b/en/device-dev/kernel/kernel-small-basic-memory-heap.md
index cb1745a27b45cc85968922293683f05a1274dff5..07750dbbc3ec0d3768f675149b050dccd02274f3 100644
--- a/en/device-dev/kernel/kernel-small-basic-memory-heap.md
+++ b/en/device-dev/kernel/kernel-small-basic-memory-heap.md
@@ -1,13 +1,4 @@
-# Heap Memory Management
-
-- [Basic Concepts](#section449414395916)
-- [Working Principles](#section465085575911)
-- [Development Guidelines](#section577019272015)
- - [When to Use](#section326917198583)
- - [Available APIs](#section1032331584)
- - [How to Develop](#section07271773592)
- - [Development Example](#section84931234145913)
- - [Verification](#section165233233917)
+# Heap Memory Management
## Basic Concepts
diff --git a/en/device-dev/kernel/kernel-small-basic-memory-physical.md b/en/device-dev/kernel/kernel-small-basic-memory-physical.md
index cb47d9ba6408e3a9cca816949e162a5676192af1..8369ea50799c91e9a07c154a0c7e5d0afe454cc6 100644
--- a/en/device-dev/kernel/kernel-small-basic-memory-physical.md
+++ b/en/device-dev/kernel/kernel-small-basic-memory-physical.md
@@ -1,12 +1,4 @@
-# Physical Memory Management
-
-- [Basic Concepts](#section210891719217)
-- [Working Principles](#section111355315213)
-- [Development Guidelines](#section393116496217)
- - [Available APIs](#section13210155619214)
- - [How to Develop](#section178441091231)
- - [Development Example](#section1258174015319)
- - [Verification](#section515091342819)
+# Physical Memory Management
## Basic Concepts
diff --git a/en/device-dev/kernel/kernel-small-basic-memory-virtual.md b/en/device-dev/kernel/kernel-small-basic-memory-virtual.md
index f5fa060ecb1bfa877c6b74f8fe069dc3b3be58f7..1c3b440fd5ecc5741b2cad1a49ef59b90d9082aa 100644
--- a/en/device-dev/kernel/kernel-small-basic-memory-virtual.md
+++ b/en/device-dev/kernel/kernel-small-basic-memory-virtual.md
@@ -1,10 +1,4 @@
-# Virtual Memory Management
-
-- [Basic Concepts](#section650193717411)
-- [Working Principles](#section072885512412)
-- [Development Guidelines](#section20956116050)
- - [Available APIs](#section166137221657)
- - [How to Develop](#section8752103914513)
+# Virtual Memory Management
## Basic Concepts
diff --git a/en/device-dev/kernel/kernel-small-basic-memory.md b/en/device-dev/kernel/kernel-small-basic-memory.md
index ebe667d5bc9b8b81b1d916ab03ce151a9bac4c94..b023754cfe8ae8a219693e6cdbfc66dc5ef595a6 100644
--- a/en/device-dev/kernel/kernel-small-basic-memory.md
+++ b/en/device-dev/kernel/kernel-small-basic-memory.md
@@ -1,4 +1,4 @@
-# Memory Management
+# Memory Management
- **[Heap Memory Management](kernel-small-basic-memory-heap.md)**
diff --git a/en/device-dev/kernel/kernel-small-basic-process-process.md b/en/device-dev/kernel/kernel-small-basic-process-process.md
index bc06994143d0e0376d64f25a3274bbf74138aa64..413951926be6282146304660a198bc0546014067 100644
--- a/en/device-dev/kernel/kernel-small-basic-process-process.md
+++ b/en/device-dev/kernel/kernel-small-basic-process-process.md
@@ -1,10 +1,4 @@
-# Process
-
-- [Basic Concepts](#section89346055119)
-- [Working Principles](#section174514474512)
-- [Development Guidelines](#section159637182521)
- - [Available APIs](#section1153124135212)
- - [How to Develop](#section1533674618526)
+# Process
## Basic Concepts
diff --git a/en/device-dev/kernel/kernel-small-basic-process-scheduler.md b/en/device-dev/kernel/kernel-small-basic-process-scheduler.md
index 32892cb91e9a795325fdc9da2db0f44796a3c9a9..fdd199036e7bcb51cbdd57e52bdce0b273fec998 100644
--- a/en/device-dev/kernel/kernel-small-basic-process-scheduler.md
+++ b/en/device-dev/kernel/kernel-small-basic-process-scheduler.md
@@ -1,10 +1,4 @@
-# Scheduler
-
-- [Basic Concepts](#section123882355719)
-- [Working Principles](#section143015396572)
-- [Development Guidelines](#section10604192145816)
- - [Available APIs](#section207985910582)
- - [How to Develop](#section1015110331584)
+# Scheduler
## Basic Concepts
diff --git a/en/device-dev/kernel/kernel-small-basic-process-thread.md b/en/device-dev/kernel/kernel-small-basic-process-thread.md
index 9a2b06d76b5b7d13932ef55439f1408aee0d7f0c..5631cf62fb43f48d26b5016ac96534e24bdd7f37 100644
--- a/en/device-dev/kernel/kernel-small-basic-process-thread.md
+++ b/en/device-dev/kernel/kernel-small-basic-process-thread.md
@@ -1,12 +1,4 @@
-# Task
-
-- [Basic Concepts](#section138411646175417)
-- [Working Principles](#section1381918945512)
-- [Development Guidelines](#section10649727135519)
- - [Available APIs](#section78333315555)
- - [How to Develop](#section16229657115514)
- - [Development Example](#section2809723165612)
-
+# Task
## Basic Concepts
diff --git a/en/device-dev/kernel/kernel-small-basic-process.md b/en/device-dev/kernel/kernel-small-basic-process.md
index 86a31d5ac93bbcbb5bf71dd0e1b2b93c7c69ab94..e7fb2b6210780c3efaf4efdf680595852dc8e751 100644
--- a/en/device-dev/kernel/kernel-small-basic-process.md
+++ b/en/device-dev/kernel/kernel-small-basic-process.md
@@ -1,4 +1,4 @@
-# Process Management
+# Process Management
- **[Process](kernel-small-basic-process-process.md)**
diff --git a/en/device-dev/kernel/kernel-small-basic-softtimer.md b/en/device-dev/kernel/kernel-small-basic-softtimer.md
index 2616bbe0bbc78216b07ee2923bedfe6697e75ba5..daa7ca000027e5723cb9e905b55aa9449ce537c9 100644
--- a/en/device-dev/kernel/kernel-small-basic-softtimer.md
+++ b/en/device-dev/kernel/kernel-small-basic-softtimer.md
@@ -1,11 +1,4 @@
-# Software Timer
-
-- [Basic Concepts](#section4118241563)
-- [Working Principles](#section31079397569)
-- [Development Guidelines](#section18576131520577)
- - [Available APIs](#section3138019145719)
- - [How to Develop](#section1344817403575)
- - [Development Example](#section114416313585)
+# Software Timer
## Basic Concepts
diff --git a/en/device-dev/kernel/kernel-small-basic-time.md b/en/device-dev/kernel/kernel-small-basic-time.md
index e6d49f70128ca2eec1eb89aa764dd255b04e6004..2918e7f62039e98d996290e3a845487dec14ccba 100644
--- a/en/device-dev/kernel/kernel-small-basic-time.md
+++ b/en/device-dev/kernel/kernel-small-basic-time.md
@@ -1,10 +1,4 @@
-# Time Management
-
-- [Basic Concepts](#section12903185785119)
-- [Development Guidelines](#section430981720522)
- - [Available APIs](#section1040142705214)
- - [How to Develop](#section1381224710522)
- - [Development Example](#section1344610245416)
+# Time Management
## Basic Concepts
diff --git a/en/device-dev/kernel/kernel-small-basic-trans-event.md b/en/device-dev/kernel/kernel-small-basic-trans-event.md
index 33d824f7e8c6a14d8d4720e0b5708e64bfa2c38b..2aba10352fbf9691cb4ab825f00ec28564d14c44 100644
--- a/en/device-dev/kernel/kernel-small-basic-trans-event.md
+++ b/en/device-dev/kernel/kernel-small-basic-trans-event.md
@@ -1,19 +1,4 @@
-# Event
-
-- [Basic Concepts](#section122115620816)
-- [Working Principles](#section94611116593)
- - [Event Control Block](#section1161415384467)
- - [Working Principles](#section187761153144617)
-
-- [Development Guidelines](#section44744471891)
- - [Available APIs](#section172373513919)
- - [How to Develop](#section1118215161013)
-
-- [Development Example](#section5837165132911)
- - [Example Description](#section128221510145718)
- - [Sample Code](#section71507479577)
- - [Verification](#section16570171645813)
-
+# Event
## Basic Concepts
diff --git a/en/device-dev/kernel/kernel-small-basic-trans-mutex.md b/en/device-dev/kernel/kernel-small-basic-trans-mutex.md
index 1d9c5c1a1435e490376606a47d04c5ba9394ce5b..a911f97e1f894004b5cf48fea296982fe1d4d9b5 100644
--- a/en/device-dev/kernel/kernel-small-basic-trans-mutex.md
+++ b/en/device-dev/kernel/kernel-small-basic-trans-mutex.md
@@ -1,11 +1,5 @@
-# Mutex
-
-- [Basic Concepts](#section85865329185)
-- [Working Principles](#section8547454201819)
-- [Development Guidelines](#section2038861117194)
- - [Available APIs](#section11168318131917)
- - [How to Develop](#section4201191122116)
- - [Development Example](#section10679328202117)
+# Mutex
+
## Basic Concepts
diff --git a/en/device-dev/kernel/kernel-small-basic-trans-queue.md b/en/device-dev/kernel/kernel-small-basic-trans-queue.md
index f266c92e27c7768a53610842f8fc0d3e2ba2699d..5e2cbc062c4b9c3ba2066e37594d01d0fd871a7e 100644
--- a/en/device-dev/kernel/kernel-small-basic-trans-queue.md
+++ b/en/device-dev/kernel/kernel-small-basic-trans-queue.md
@@ -1,4 +1,4 @@
-# Queue
+# Queue
## Basic Concepts
diff --git a/en/device-dev/kernel/kernel-small-basic-trans-rwlock.md b/en/device-dev/kernel/kernel-small-basic-trans-rwlock.md
index 389a713074904ba1261871915ca1bf3f4c35a19b..97f8b77622ee03c6701df1e0b426778c8a956ddd 100644
--- a/en/device-dev/kernel/kernel-small-basic-trans-rwlock.md
+++ b/en/device-dev/kernel/kernel-small-basic-trans-rwlock.md
@@ -1,10 +1,4 @@
-# RW Lock
-
-- [Basic Concepts](#section4692105214260)
-- [Working Principles](#section1239111562720)
-- [Development Guidelines](#section11643194275)
- - [Available APIs](#section15335332122717)
- - [How to Develop](#section14774114882714)
+# RW Lock
## Basic Concepts
diff --git a/en/device-dev/kernel/kernel-small-basic-trans-semaphore.md b/en/device-dev/kernel/kernel-small-basic-trans-semaphore.md
index b701c8d2fb999a5c278b33284b89d97aa912ad47..31cf7a943e55c174be94905d70ad7c5a6d102dcb 100644
--- a/en/device-dev/kernel/kernel-small-basic-trans-semaphore.md
+++ b/en/device-dev/kernel/kernel-small-basic-trans-semaphore.md
@@ -1,14 +1,4 @@
-# Semaphore
-
-- [Basic Concepts](#section1577111168131)
-- [Working Principles](#section118423019134)
-- [Development Guidelines](#section01419503131)
- - [Available APIs](#section1232345431312)
- - [How to Develop](#section154261711141419)
- - [Development Example](#section658135571417)
- - [Example Description](#section125244411653)
- - [Sample Code](#section1742105514512)
- - [Verification](#section11297301617)
+# Semaphore
## Basic Concepts
diff --git a/en/device-dev/kernel/kernel-small-basic-trans-user-mutex.md b/en/device-dev/kernel/kernel-small-basic-trans-user-mutex.md
index 1d6064c08d48f6c5170a8859b588dc3fd1db9ac5..423e46492a8944ddacf62b5d332de1f3ed9a219b 100644
--- a/en/device-dev/kernel/kernel-small-basic-trans-user-mutex.md
+++ b/en/device-dev/kernel/kernel-small-basic-trans-user-mutex.md
@@ -1,7 +1,5 @@
-# Futex
+# Futex
-- [Basic Concepts](#section643519912920)
-- [Working Principles](#section16834132502910)
## Basic Concepts
diff --git a/en/device-dev/kernel/kernel-small-basic-trans-user-signal.md b/en/device-dev/kernel/kernel-small-basic-trans-user-signal.md
index f559f6ea2773e28b32963459241fcdb8f5933081..39fc0bc11507f9d70c5af1d8db203ed50b2866bd 100644
--- a/en/device-dev/kernel/kernel-small-basic-trans-user-signal.md
+++ b/en/device-dev/kernel/kernel-small-basic-trans-user-signal.md
@@ -1,7 +1,5 @@
-# Signal
+# Signal
-- [Basic Concepts](#section172788254307)
-- [Working Principles](#section1249693812301)
## Basic Concepts
diff --git a/en/device-dev/kernel/kernel-small-basic-trans.md b/en/device-dev/kernel/kernel-small-basic-trans.md
index bc7fe50a1f4e337820e456823ba9ceb698276b3f..90a34f413bf49d690e619528bf261b7dc2d643c7 100644
--- a/en/device-dev/kernel/kernel-small-basic-trans.md
+++ b/en/device-dev/kernel/kernel-small-basic-trans.md
@@ -1,4 +1,4 @@
-# Kernel Communication Mechanisms
+# Kernel Communication Mechanisms
- **[Event](kernel-small-basic-trans-event.md)**
diff --git a/en/device-dev/kernel/kernel-small-basics.md b/en/device-dev/kernel/kernel-small-basics.md
index 68ba677548dbfa2ad8f60f841663fe02cd158ede..4bf850db238b8a12c498633723c90183783da0a1 100644
--- a/en/device-dev/kernel/kernel-small-basics.md
+++ b/en/device-dev/kernel/kernel-small-basics.md
@@ -1,4 +1,4 @@
-# Basic Kernel
+# Basic Kernel
- **[Interrupt and Exception Handling](kernel-small-basic-interrupt.md)**
diff --git a/en/device-dev/kernel/kernel-small-bundles-fs-new.md b/en/device-dev/kernel/kernel-small-bundles-fs-new.md
index 749d7441a85792b447a419df2347d8ac8979acef..e62877e605dce84f471280191ca42ca47a0e7a2d 100644
--- a/en/device-dev/kernel/kernel-small-bundles-fs-new.md
+++ b/en/device-dev/kernel/kernel-small-bundles-fs-new.md
@@ -1,9 +1,5 @@
-# File System Adaptation
+# File System Adaptation
-- [Basic Concepts](#section19480121811422)
-- [Adapting the Mount API](#section147051940104212)
-- [Adapting the Lookup API](#section11930181394317)
-- [Summary and Precautions](#section5617183014319)
## Basic Concepts
@@ -28,7 +24,7 @@ struct VnodeOps g_yourFsVnodeOps = {
FSMAP_ENTRY(yourfs_fsmap, "your fs name", g_yourFsMountOps, TRUE, TRUE); // Register the file system.
```
-> **NOTE:**
+> **NOTE**
>1. The **open** and **close** APIs are not necessarily implemented because they are used to operate files and are imperceptible to the underlying file system. You need to implement them only when special operations need to be performed during the open and close operations on the file system.
>2. Basic file system knowledge is required for file system adaptation. You need to have a deep understanding of the principles and implementation of the target file system. This section does not include the file system basics in detail. If you have any questions during the adaptation process, refer to the code in the **kernel/liteos\_a/fs** directory.
@@ -215,7 +211,7 @@ The general adaptation procedure is as follows:
The core logic is how to use the private data to implement API functions. These APIs implement common functions of the file systems and are generally implemented before the files systems are ported. Therefore, the key is to determine the private data required by the file system and store the data in the Vnode for later use. Generally, the private data is information that can uniquely locate a file on a storage medium. Most file systems have similar data structures, for example, the inode data structure in JFFS2.
-> **CAUTION:**
+> **CAUTION:**
>1. When a file is accessed, the **Lookup** API of the file system is not necessarily called. The **Lookup** API is called only when the PathCache is invalid.
>2. Do not directly return the Vnode located by using **VfsHashGet** as the result. The information stored in the Vnode may be invalid. Update the fields and return it.
>3. Vnodes are automatically released in the background based on memory usage. If data needs to be stored persistently, do not save it only in Vnodes.
diff --git a/en/device-dev/kernel/kernel-small-bundles-fs-support-fat.md b/en/device-dev/kernel/kernel-small-bundles-fs-support-fat.md
index fc4e7dc85a15f36c303d37af8f642b800c63d355..d82858014b528de1c82b4313cfc3a0e0312a9540 100644
--- a/en/device-dev/kernel/kernel-small-bundles-fs-support-fat.md
+++ b/en/device-dev/kernel/kernel-small-bundles-fs-support-fat.md
@@ -1,9 +1,4 @@
-# FAT
-
-- [Basic Concepts](#section621393911385)
-- [Working Principles](#section10796155213381)
-- [Development Guidelines](#section144094483919)
- - [How to Develop](#section139086116394)
+# FAT
## Basic Concepts
@@ -32,7 +27,7 @@ Example:
mount("/dev/mmcblk0p0", "/mnt", "vfat", 0, NULL);
```
-> **NOTE:**
+> **NOTE**
>- The size of a single FAT file cannot be greater than 4 GiB.
>- When there are two SD card slots, the first card inserted is card 0, and that inserted later is card 1.
>- When multi-partition is enabled and there are multiple partitions, the device node **/dev/mmcblk0** \(primary device\) registered by card 0 and **/dev/mmcblk0p0** \(secondary device\) are the same device. In this case, you cannot perform operations on the primary device.
diff --git a/en/device-dev/kernel/kernel-small-bundles-fs-support-jffs2.md b/en/device-dev/kernel/kernel-small-bundles-fs-support-jffs2.md
index e266e552caf20803a0bc5188f8e05d41a8e115bb..7fc87805f3521f62e36421a9d5db6ba35e5c0020 100644
--- a/en/device-dev/kernel/kernel-small-bundles-fs-support-jffs2.md
+++ b/en/device-dev/kernel/kernel-small-bundles-fs-support-jffs2.md
@@ -1,9 +1,4 @@
-# JFFS2
-
-- [Basic Concepts](#section11411110155919)
-- [Working Principles](#section23911025195913)
-- [Development Guidelines](#section179711119014)
-
+# JFFS2
## Basic Concepts
Journalling Flash File System Version 2 \(JFFS2\) is a log-structured file system designed for Memory Technology Devices \(MTDs\).
diff --git a/en/device-dev/kernel/kernel-small-bundles-fs-support-nfs.md b/en/device-dev/kernel/kernel-small-bundles-fs-support-nfs.md
index fc24e1bcb1771e43fd73efaf266ba2f2667fc5ad..d205531eb3d7ac83645ce872669a645d0d4d5aa5 100644
--- a/en/device-dev/kernel/kernel-small-bundles-fs-support-nfs.md
+++ b/en/device-dev/kernel/kernel-small-bundles-fs-support-nfs.md
@@ -1,8 +1,5 @@
-# NFS
+# NFS
-- [Basic Concepts](#section195414101464)
-- [Working Principles](#section165621321194618)
-- [Development Guidelines](#section7454935184611)
## Basic Concepts
diff --git a/en/device-dev/kernel/kernel-small-bundles-fs-support-procfs.md b/en/device-dev/kernel/kernel-small-bundles-fs-support-procfs.md
index 75902b5ea9669b102346d3cb559537d42d4986a9..a9b031e9f72b535f22f3083491c5b76c08459e3f 100644
--- a/en/device-dev/kernel/kernel-small-bundles-fs-support-procfs.md
+++ b/en/device-dev/kernel/kernel-small-bundles-fs-support-procfs.md
@@ -1,9 +1,4 @@
-# procfs
-
-- [Basic Concepts](#section146801917174017)
-- [Working Principles](#section479762916408)
-- [Development Guidelines](#section1221174524014)
- - [Development Example](#section52016575401)
+# procfs
## Basic Concepts
diff --git a/en/device-dev/kernel/kernel-small-bundles-fs-support-ramfs.md b/en/device-dev/kernel/kernel-small-bundles-fs-support-ramfs.md
index 854086afd3536905c9a2b5172b09fc559a24d0cb..975baff8c25166e4e9afa703c4208aa03af5d066 100644
--- a/en/device-dev/kernel/kernel-small-bundles-fs-support-ramfs.md
+++ b/en/device-dev/kernel/kernel-small-bundles-fs-support-ramfs.md
@@ -1,8 +1,4 @@
-# Ramfs
-
-- [Basic Concepts](#section9507151014420)
-- [Working Principles](#section1859711263447)
-- [Development Guidelines](#section163554380448)
+# Ramfs
## Basic Concepts
diff --git a/en/device-dev/kernel/kernel-small-bundles-fs-support.md b/en/device-dev/kernel/kernel-small-bundles-fs-support.md
index ee0741ca974b0fa21236abeb956f48adf43ebd38..036673f74ca1e7f0a62eadbaaa629c33dcf4a74c 100644
--- a/en/device-dev/kernel/kernel-small-bundles-fs-support.md
+++ b/en/device-dev/kernel/kernel-small-bundles-fs-support.md
@@ -1,4 +1,4 @@
-# Supported File Systems
+# Supported File Systems
- **[FAT](kernel-small-bundles-fs-support-fat.md)**
diff --git a/en/device-dev/kernel/kernel-small-bundles-fs-virtual.md b/en/device-dev/kernel/kernel-small-bundles-fs-virtual.md
index a98ff3cd6c6ad292523ab9353856854adcc4c879..2d90df4720aafd107b21196ecd589878f3b191ff 100644
--- a/en/device-dev/kernel/kernel-small-bundles-fs-virtual.md
+++ b/en/device-dev/kernel/kernel-small-bundles-fs-virtual.md
@@ -1,11 +1,4 @@
-# Virtual File System
-
-- [Basic Concepts](#section1253851143520)
-- [Working Principles](#section14915913123510)
-- [Development Guidelines](#section1759563620358)
- - [Available APIs](#section17865142133511)
- - [How to Develop](#section64113023616)
- - [Development Example](#section236041883618)
+# Virtual File System
## Basic Concepts
diff --git a/en/device-dev/kernel/kernel-small-bundles-fs.md b/en/device-dev/kernel/kernel-small-bundles-fs.md
index 5ad3391eef2850f5ebee600a333f991cb9b29765..9a80b886e7af11385f8350d26c539de9764d1136 100644
--- a/en/device-dev/kernel/kernel-small-bundles-fs.md
+++ b/en/device-dev/kernel/kernel-small-bundles-fs.md
@@ -1,10 +1,10 @@
-# File Systems
+# File Systems
A file system \(often abbreviated to FS\) provides an input and output manner for an OS. It implements the interaction with internal and external storage devices.
The file system provides standard POSIX operation APIs for the upper-layer system through the C library. For details, see the API reference of the C library. The Virtual File System \(VFS\) layer in kernel mode shields the differences between file systems. The basic architecture is as follows:
-**Figure 1** Overall file system architecture
+**Figure 1** Overall file system architecture

- **[Virtual File System](kernel-small-bundles-fs-virtual.md)**
diff --git a/en/device-dev/kernel/kernel-small-bundles-ipc.md b/en/device-dev/kernel/kernel-small-bundles-ipc.md
index 1d906c36d8eb658ea5b97ba0f60c68b745b84d2f..cdde2e4e602dfe73c76158b2fd9119fcfc4d347b 100644
--- a/en/device-dev/kernel/kernel-small-bundles-ipc.md
+++ b/en/device-dev/kernel/kernel-small-bundles-ipc.md
@@ -1,9 +1,4 @@
-# LiteIPC
-
-- [Basic Concepts](#section1980994712918)
-- [Working Principles](#section849811592918)
-- [Development Guidelines](#section17571315171017)
- - [Available APIs](#section725022011103)
+# LiteIPC
## Basic Concepts
diff --git a/en/device-dev/kernel/kernel-small-bundles-linking.md b/en/device-dev/kernel/kernel-small-bundles-linking.md
index 1d7956e2af1c4255abb745c1f47226a84b8eca16..78a6076a0239d6fa922c470425dccdf96990117a 100644
--- a/en/device-dev/kernel/kernel-small-bundles-linking.md
+++ b/en/device-dev/kernel/kernel-small-bundles-linking.md
@@ -1,11 +1,4 @@
-# Dynamic Loading and Linking
-
-- [Basic Concepts](#section208951139453)
-- [Working Principles](#section14140155320511)
-- [Development Guidelines](#section133501496612)
- - [Available APIs](#section874113201669)
- - [How to Develop](#section196712561563)
-
+# Dynamic Loading and Linking
## Basic Concepts
diff --git a/en/device-dev/kernel/kernel-small-bundles-share.md b/en/device-dev/kernel/kernel-small-bundles-share.md
index 90410e8ab61eef7630bb03b876eb3d53cdf1893d..23f6b68a3e4601e0dc4d10783f15bb4616caee88 100644
--- a/en/device-dev/kernel/kernel-small-bundles-share.md
+++ b/en/device-dev/kernel/kernel-small-bundles-share.md
@@ -1,7 +1,4 @@
-# Virtual Dynamic Shared Object
-
-- [Basic Concepts](#section174577181688)
-- [Working Principles](#section546363114810)
+# Virtual Dynamic Shared Object
## Basic Concepts
diff --git a/en/device-dev/kernel/kernel-small-bundles-system.md b/en/device-dev/kernel/kernel-small-bundles-system.md
index ddca52646afbc930e3d2b60aab25471c11dc86e9..9b3bf1c07d19ec36af8ffdd4a3975ad204ed705f 100644
--- a/en/device-dev/kernel/kernel-small-bundles-system.md
+++ b/en/device-dev/kernel/kernel-small-bundles-system.md
@@ -1,10 +1,4 @@
-# System Call
-
-- [Basic Concepts](#section889710401734)
-- [Working Principles](#section195177541314)
-- [Development Guidelines](#section193492047135419)
- - [How to Develop](#section7165741122210)
- - [Development Example](#section107131418224)
+# System Call
## Basic Concepts
diff --git a/en/device-dev/kernel/kernel-small-bundles.md b/en/device-dev/kernel/kernel-small-bundles.md
index 755e2693bd7fd674e2cdef257ff3ede8aaeddf61..9e98cbcd4e18dc47d154b75919d7523de699ccd2 100644
--- a/en/device-dev/kernel/kernel-small-bundles.md
+++ b/en/device-dev/kernel/kernel-small-bundles.md
@@ -1,4 +1,4 @@
-# Extended Components
+# Extended Components
- **[System Call](kernel-small-bundles-system.md)**
diff --git a/en/device-dev/kernel/kernel-small-debug-memory-corrupt.md b/en/device-dev/kernel/kernel-small-debug-memory-corrupt.md
index 32b0c74cf507c03a7778366505a423e10a3b1e15..86e96a509e36d8b451fadb2b17543c82c7fe8d70 100644
--- a/en/device-dev/kernel/kernel-small-debug-memory-corrupt.md
+++ b/en/device-dev/kernel/kernel-small-debug-memory-corrupt.md
@@ -1,10 +1,4 @@
-# Memory Corruption Check
-
-- [Basic Concepts](#section17368154517335)
-- [Function Configuration](#section4696190123420)
-- [Development Guidelines](#section672362973417)
- - [How to Develop](#section026014863416)
- - [Development Example](#section186311302356)
+# Memory Corruption Check
## Basic Concepts
diff --git a/en/device-dev/kernel/kernel-small-debug-memory-info.md b/en/device-dev/kernel/kernel-small-debug-memory-info.md
index d87652c782de7f205d4cd5d9eda743b396656daf..7e49011370211aab32ba94e1a578b99f77e857b7 100644
--- a/en/device-dev/kernel/kernel-small-debug-memory-info.md
+++ b/en/device-dev/kernel/kernel-small-debug-memory-info.md
@@ -1,11 +1,4 @@
-# Memory Information Statistics
-
-- [Basic Concepts](#section52691565235)
-- [Function Configuration](#section470611682411)
-- [Development Guidelines](#section9368374243)
- - [How to Develop](#section679912407257)
- - [Development Example](#section1025453412611)
-
+# Memory Information Statistics
## Basic Concepts
diff --git a/en/device-dev/kernel/kernel-small-debug-memory-leak.md b/en/device-dev/kernel/kernel-small-debug-memory-leak.md
index 4934e5eab7679f6a28806b96f5ff063680b1a2d1..d67b32bff12085d5f85c831aef31cae9a5f76491 100644
--- a/en/device-dev/kernel/kernel-small-debug-memory-leak.md
+++ b/en/device-dev/kernel/kernel-small-debug-memory-leak.md
@@ -1,10 +1,4 @@
-# Memory Leak Check
-
-- [Basic Concepts](#section1026719436293)
-- [Function Configuration](#section13991354162914)
-- [Development Guidelines](#section95828159308)
- - [How to Develop](#section369844416304)
- - [Development Example](#section460801313313)
+# Memory Leak Check
## Basic Concepts
diff --git a/en/device-dev/kernel/kernel-small-debug-memory.md b/en/device-dev/kernel/kernel-small-debug-memory.md
index cc8bc8d2c5bd2d84682608ef8ee168b5f63e3d7a..ecd2a8013ec8d1f11a8c044cd27685b1fe609cc7 100644
--- a/en/device-dev/kernel/kernel-small-debug-memory.md
+++ b/en/device-dev/kernel/kernel-small-debug-memory.md
@@ -1,4 +1,4 @@
-# Kernel-Mode Memory Debugging
+# Kernel-Mode Memory Debugging
- **[Memory Information Statistics](kernel-small-debug-memory-info.md)**
diff --git a/en/device-dev/kernel/kernel-small-debug-other.md b/en/device-dev/kernel/kernel-small-debug-other.md
index b4a19694532ce220b4db5de55169d3c225a9d50a..904dc139c01e9c6524b3461e476080f8bfb4d1db 100644
--- a/en/device-dev/kernel/kernel-small-debug-other.md
+++ b/en/device-dev/kernel/kernel-small-debug-other.md
@@ -1,4 +1,4 @@
-# Other Kernel Debugging Methods
+# Other Kernel Debugging Methods
- **[Dying Gasp](kernel-small-debug-trace-other-lastwords.md)**
diff --git a/en/device-dev/kernel/kernel-small-debug-process-cpu.md b/en/device-dev/kernel/kernel-small-debug-process-cpu.md
index 54507fed19ae0d7f731b44b69335af5b52b6434c..5801bb007bc9edc1b075363a34ba57eb67e3c498 100644
--- a/en/device-dev/kernel/kernel-small-debug-process-cpu.md
+++ b/en/device-dev/kernel/kernel-small-debug-process-cpu.md
@@ -1,14 +1,7 @@
-# CPUP
+# Process Debugging
-- [Basic Concepts](#section17683419227)
-- [Working Principles](#section593718536227)
-- [Development Guidelines](#section11284210152311)
- - [Available APIs](#section3745151592312)
- - [How to Develop](#section122901429182316)
- - [Development Example](#section1765785212310)
-
-## Basic Concepts
+## Basic Concepts
The central processing unit percent \(CPUP\) includes the system CPUP, process CPUP, task CPUP, and interrupt CPUP. With the system CPUP, you can determine whether the current system load exceeds the designed specifications. With the CPUP of each task/process/interrupt, you can determine whether their CPU usage meets expectations of the design.
diff --git a/en/device-dev/kernel/kernel-small-debug-process.md b/en/device-dev/kernel/kernel-small-debug-process.md
index a57488bf665341f048fc60b512596660bd1cb951..6464dfadcc406ffd8febaf3e7d07c7e17e056564 100644
--- a/en/device-dev/kernel/kernel-small-debug-process.md
+++ b/en/device-dev/kernel/kernel-small-debug-process.md
@@ -1,4 +1,4 @@
-# Process Commissioning
+# Process Debugging
- **[CPUP](kernel-small-debug-process-cpu.md)**
diff --git a/en/device-dev/kernel/kernel-small-debug-shell-build.md b/en/device-dev/kernel/kernel-small-debug-shell-build.md
index c6758e46cf32a7a6c63feb9116b57223b9a7fdb2..df3f598e9245da67c047327ccb61fbb95701b4a5 100644
--- a/en/device-dev/kernel/kernel-small-debug-shell-build.md
+++ b/en/device-dev/kernel/kernel-small-debug-shell-build.md
@@ -1,10 +1,4 @@
-# Shell Command Programming Example
-
-- [Example Description](#section87143612316)
-- [Static Registration](#section1660495712314)
-- [Static Registration Programming Example](#section1233411684113)
-- [Dynamic Registration](#section6804126192412)
-- [Dynamic Registration Programming Example](#section2335121613418)
+# Shell Command Programming Example
## Example Description
diff --git a/en/device-dev/kernel/kernel-small-debug-shell-cmd-cpup.md b/en/device-dev/kernel/kernel-small-debug-shell-cmd-cpup.md
index bb52c6ead06f5015d2d48118f7eb37b6dd0ebaac..746b920933106047cb22d223404e4b090425fe9f 100644
--- a/en/device-dev/kernel/kernel-small-debug-shell-cmd-cpup.md
+++ b/en/device-dev/kernel/kernel-small-debug-shell-cmd-cpup.md
@@ -1,11 +1,5 @@
-# cpup
-
-- [Command Function](#section1842161614217)
-- [Syntax](#section5629527427)
-- [Parameters](#section133651361023)
-- [Usage](#section156611948521)
-- [Example](#section68501605319)
-- [Output](#section19871522144219)
+# cpup
+
## Command Function
diff --git a/en/device-dev/kernel/kernel-small-debug-shell-cmd-date.md b/en/device-dev/kernel/kernel-small-debug-shell-cmd-date.md
index 247af2bf57820176806cb88db46ab51d1fec1ed1..b232540382d344f2a18fb8424665e759f6301013 100644
--- a/en/device-dev/kernel/kernel-small-debug-shell-cmd-date.md
+++ b/en/device-dev/kernel/kernel-small-debug-shell-cmd-date.md
@@ -1,11 +1,4 @@
-# date
-
-- [Command Function](#section56472016338)
-- [Syntax](#section16635112512316)
-- [Parameters](#section15896030039)
-- [Usage](#section116361036636)
-- [Example](#section021711411237)
-- [Output](#section17950184414312)
+# date
## Command Function
diff --git a/en/device-dev/kernel/kernel-small-debug-shell-cmd-dmesg.md b/en/device-dev/kernel/kernel-small-debug-shell-cmd-dmesg.md
index 7d97c159890f022c8220162b611020e6b89a9cd0..71950cfa70ab6e746e2f958a9d59bc5612698a3c 100644
--- a/en/device-dev/kernel/kernel-small-debug-shell-cmd-dmesg.md
+++ b/en/device-dev/kernel/kernel-small-debug-shell-cmd-dmesg.md
@@ -1,11 +1,4 @@
-# dmesg
-
-- [Command Function](#section4643204919313)
-- [Syntax](#section6553153635)
-- [Parameters](#section208971157532)
-- [Usage](#section213115219413)
-- [Example](#section13736564418)
-- [Output](#section194005101413)
+# dmesg
## Command Function
diff --git a/en/device-dev/kernel/kernel-small-debug-shell-cmd-exec.md b/en/device-dev/kernel/kernel-small-debug-shell-cmd-exec.md
index dcfa9e2fd5802a80efce3d0381facfcedf03ceaf..d928f722e2a0dd97883b1305b601d4198d345bf6 100644
--- a/en/device-dev/kernel/kernel-small-debug-shell-cmd-exec.md
+++ b/en/device-dev/kernel/kernel-small-debug-shell-cmd-exec.md
@@ -1,11 +1,5 @@
-# exec
-
-- [Command Function](#section4643204919313)
-- [Syntax](#section6553153635)
-- [Parameters](#section208971157532)
-- [Usage](#section213115219413)
-- [Example](#section13736564418)
-- [Output](#section194005101413)
+# exec
+
## Command Function
diff --git a/en/device-dev/kernel/kernel-small-debug-shell-cmd-free.md b/en/device-dev/kernel/kernel-small-debug-shell-cmd-free.md
index ad01ce8a0b79b86ee86a217b0f471ca3586ac856..7922bd0a47ef4172d90aacdea2061f45eac7f9c9 100644
--- a/en/device-dev/kernel/kernel-small-debug-shell-cmd-free.md
+++ b/en/device-dev/kernel/kernel-small-debug-shell-cmd-free.md
@@ -1,11 +1,4 @@
-# free
-
-- [Command Function](#section175151514841)
-- [Syntax](#section8488721749)
-- [Parameters](#section27272181949)
-- [Usage](#section148661259410)
-- [Example](#section68081530242)
-- [Output](#section171235517543)
+# free
## Command Function
diff --git a/en/device-dev/kernel/kernel-small-debug-shell-cmd-help.md b/en/device-dev/kernel/kernel-small-debug-shell-cmd-help.md
index 34789511faf83b45c40f78d6a5005f17c261b412..afdf6852c2381d5d2ba09920016a197611c85fcc 100644
--- a/en/device-dev/kernel/kernel-small-debug-shell-cmd-help.md
+++ b/en/device-dev/kernel/kernel-small-debug-shell-cmd-help.md
@@ -1,11 +1,4 @@
-# help
-
-- [Command Function](#section991211345413)
-- [Syntax](#section19103204016410)
-- [Parameters](#section1533416233432)
-- [Usage](#section4156445417)
-- [Example](#section12776124712417)
-- [Output](#section092662412544)
+# help
## Command Function
diff --git a/en/device-dev/kernel/kernel-small-debug-shell-cmd-hwi.md b/en/device-dev/kernel/kernel-small-debug-shell-cmd-hwi.md
index 7c6bf50c2d60cef6b7a6b437fb4094ea93a0cc43..52854b1cfa54f3aa3607f9ca2e43ac506d2edfce 100644
--- a/en/device-dev/kernel/kernel-small-debug-shell-cmd-hwi.md
+++ b/en/device-dev/kernel/kernel-small-debug-shell-cmd-hwi.md
@@ -1,11 +1,4 @@
-# hwi
-
-- [Command Function](#section445335110416)
-- [Syntax](#section1795712553416)
-- [Parameters](#section92544592410)
-- [Usage](#section104151141252)
-- [Example](#section11545171957)
-- [Output](#section075617368542)
+# hwi
## Command Function
diff --git a/en/device-dev/kernel/kernel-small-debug-shell-cmd-kill.md b/en/device-dev/kernel/kernel-small-debug-shell-cmd-kill.md
index 0dd40f285677989a859a6b49b132aa74cf4cfa06..841bcc90ac36ced0dc75a32e52defdcb89d51aff 100644
--- a/en/device-dev/kernel/kernel-small-debug-shell-cmd-kill.md
+++ b/en/device-dev/kernel/kernel-small-debug-shell-cmd-kill.md
@@ -1,11 +1,4 @@
-# kill
-
-- [Command Function](#section366714216619)
-- [Syntax](#section8833164614615)
-- [Parameters](#section12809111019453)
-- [Usage](#section15935131220717)
-- [Example](#section79281818476)
-- [Output](#section12742311179)
+# kill
## Command Function
diff --git a/en/device-dev/kernel/kernel-small-debug-shell-cmd-log.md b/en/device-dev/kernel/kernel-small-debug-shell-cmd-log.md
index 66ae0755beab755907997673c43f044dec89b9c8..9809d169a35146e4a886a8706dbb30fb56162322 100644
--- a/en/device-dev/kernel/kernel-small-debug-shell-cmd-log.md
+++ b/en/device-dev/kernel/kernel-small-debug-shell-cmd-log.md
@@ -1,11 +1,4 @@
-# log
-
-- [Command Function](#section128219131856)
-- [Syntax](#section3894181710519)
-- [Parameters](#section7693122310515)
-- [Usage](#section1982111281512)
-- [Example](#section176301333259)
-- [Output](#section14354765415)
+# log
## Command Function
diff --git a/en/device-dev/kernel/kernel-small-debug-shell-cmd-memcheck.md b/en/device-dev/kernel/kernel-small-debug-shell-cmd-memcheck.md
index 2436cc1ae331bfc904cd5dff3090efcbf9b124ec..673393acbf78cce8379196dc0b8436565c4a9c2d 100644
--- a/en/device-dev/kernel/kernel-small-debug-shell-cmd-memcheck.md
+++ b/en/device-dev/kernel/kernel-small-debug-shell-cmd-memcheck.md
@@ -1,11 +1,4 @@
-# memcheck
-
-- [Command Function](#section191633812516)
-- [Syntax](#section428816435510)
-- [Parameters](#section1939943304411)
-- [Usage](#section228914491951)
-- [Example](#section17373205314515)
-- [Output](#section13406205385413)
+# memcheck
## Command Function
diff --git a/en/device-dev/kernel/kernel-small-debug-shell-cmd-oom.md b/en/device-dev/kernel/kernel-small-debug-shell-cmd-oom.md
index b3800327facc82e7f3ade1936f9197c0a9c91419..9372b8ae18ee255fba9f5abd8c9ca7c1a3a3946b 100644
--- a/en/device-dev/kernel/kernel-small-debug-shell-cmd-oom.md
+++ b/en/device-dev/kernel/kernel-small-debug-shell-cmd-oom.md
@@ -1,11 +1,4 @@
-# oom
-
-- [Command Function](#section366714216619)
-- [Syntax](#section8833164614615)
-- [Parameters](#section12809111019453)
-- [Usage](#section15935131220717)
-- [Example](#section387104374416)
-- [Output](#section12742311179)
+# oom
## Command Function
diff --git a/en/device-dev/kernel/kernel-small-debug-shell-cmd-pmm.md b/en/device-dev/kernel/kernel-small-debug-shell-cmd-pmm.md
index 1ccae97356712321962498ac9f1ab416879615c4..ffa823db63ab1ff65a94f364c5f461e158b20096 100644
--- a/en/device-dev/kernel/kernel-small-debug-shell-cmd-pmm.md
+++ b/en/device-dev/kernel/kernel-small-debug-shell-cmd-pmm.md
@@ -1,11 +1,4 @@
-# pmm
-
-- [Command Function](#section445335110416)
-- [Syntax](#section1795712553416)
-- [Parameters](#section92544592410)
-- [Usage](#section104151141252)
-- [Example](#section11545171957)
-- [Output](#section075617368542)
+# pmm
## Command Function
diff --git a/en/device-dev/kernel/kernel-small-debug-shell-cmd-reboot.md b/en/device-dev/kernel/kernel-small-debug-shell-cmd-reboot.md
index 46769ef3e32863534b5a438ea1c689a7dfa53952..000cc3873b7069ad2711a73b818a5330ebb775c3 100644
--- a/en/device-dev/kernel/kernel-small-debug-shell-cmd-reboot.md
+++ b/en/device-dev/kernel/kernel-small-debug-shell-cmd-reboot.md
@@ -1,11 +1,4 @@
-# reboot
-
-- [Command Function](#section20643141481314)
-- [Syntax](#section1075441721316)
-- [Parameters](#section1472810220135)
-- [Usage](#section186772414131)
-- [Example](#section4764192791314)
-- [Output](#section5791253155517)
+# reboot
## Command Function
diff --git a/en/device-dev/kernel/kernel-small-debug-shell-cmd-reset.md b/en/device-dev/kernel/kernel-small-debug-shell-cmd-reset.md
index 601e31f1b6a0bd4ac6d3d12d25318ee7a2aa3567..7fca8b04a7cebdd6fb998c3f8472c7b1950faa3e 100644
--- a/en/device-dev/kernel/kernel-small-debug-shell-cmd-reset.md
+++ b/en/device-dev/kernel/kernel-small-debug-shell-cmd-reset.md
@@ -1,11 +1,4 @@
-# reset
-
-- [Command Function](#section366714216619)
-- [Syntax](#section8833164614615)
-- [Parameters](#section12809111019453)
-- [Usage](#section15935131220717)
-- [Example](#section79281818476)
-- [Output](#section12742311179)
+# reset
## Command Function
diff --git a/en/device-dev/kernel/kernel-small-debug-shell-cmd-sem.md b/en/device-dev/kernel/kernel-small-debug-shell-cmd-sem.md
index bc05dc4b3ef377764d392579d2d4075c036cbb02..97d64d282623b79259c004dd96bf7bc69339cdb5 100644
--- a/en/device-dev/kernel/kernel-small-debug-shell-cmd-sem.md
+++ b/en/device-dev/kernel/kernel-small-debug-shell-cmd-sem.md
@@ -1,11 +1,4 @@
-# sem
-
-- [Command Function](#section366714216619)
-- [Syntax](#section8833164614615)
-- [Parameters](#section12809111019453)
-- [Usage](#section15935131220717)
-- [Example](#section79281818476)
-- [Output](#section1975118519456)
+# sem
## Command Function
diff --git a/en/device-dev/kernel/kernel-small-debug-shell-cmd-stack.md b/en/device-dev/kernel/kernel-small-debug-shell-cmd-stack.md
index 161fd252a77805676e2c236693b93ba666e0049f..da1aad64eac9f0e54ce8fe75f41a8da78ef344ef 100644
--- a/en/device-dev/kernel/kernel-small-debug-shell-cmd-stack.md
+++ b/en/device-dev/kernel/kernel-small-debug-shell-cmd-stack.md
@@ -1,11 +1,5 @@
-# stack
-
-- [Command Function](#section445335110416)
-- [Syntax](#section1795712553416)
-- [Parameters](#section92544592410)
-- [Usage](#section104151141252)
-- [Example](#section11545171957)
-- [Output](#section075617368542)
+# stack
+
## Command Function
diff --git a/en/device-dev/kernel/kernel-small-debug-shell-cmd-su.md b/en/device-dev/kernel/kernel-small-debug-shell-cmd-su.md
index 68360718dec7491cca25430b56b70524072aa670..7e23b3b60dcd0ee80701d5d42b0f4ac267e444d2 100644
--- a/en/device-dev/kernel/kernel-small-debug-shell-cmd-su.md
+++ b/en/device-dev/kernel/kernel-small-debug-shell-cmd-su.md
@@ -1,11 +1,4 @@
-# su
-
-- [Command Function](#section297810431676)
-- [Syntax](#section157131147876)
-- [Parameters](#section04145521671)
-- [Usage](#section14615155610719)
-- [Example](#section13338150985)
-- [Output](#section125021924194613)
+# su
## Command Function
diff --git a/en/device-dev/kernel/kernel-small-debug-shell-cmd-swtmr.md b/en/device-dev/kernel/kernel-small-debug-shell-cmd-swtmr.md
index 73676a220aa541367eb746f104344b5a07341242..a764d66fc83e1d7d8b2e2eabacfbefc3a61462f7 100644
--- a/en/device-dev/kernel/kernel-small-debug-shell-cmd-swtmr.md
+++ b/en/device-dev/kernel/kernel-small-debug-shell-cmd-swtmr.md
@@ -1,11 +1,5 @@
-# swtmr
-
-- [Command Function](#section166171064814)
-- [Syntax](#section424011111682)
-- [Parameters](#section1268410459465)
-- [Usage](#section169806213815)
-- [Example](#section16676026389)
-- [Output](#section1541991614710)
+# swtmr
+
## Command Function
diff --git a/en/device-dev/kernel/kernel-small-debug-shell-cmd-sysinfo.md b/en/device-dev/kernel/kernel-small-debug-shell-cmd-sysinfo.md
index d28355447b0b8d10bd647a996e437d0c6c579ac4..c1a81444f8b4af508906bd02a7ca500a36e7c0ad 100644
--- a/en/device-dev/kernel/kernel-small-debug-shell-cmd-sysinfo.md
+++ b/en/device-dev/kernel/kernel-small-debug-shell-cmd-sysinfo.md
@@ -1,11 +1,4 @@
-# systeminfo
-
-- [Command Function](#section863016434820)
-- [Syntax](#section139791817795)
-- [Parameters](#section19472339164813)
-- [Usage](#section285522592)
-- [Example](#section9471171015105)
-- [Output](#section1657011114915)
+# systeminfo
## Command Function
diff --git a/en/device-dev/kernel/kernel-small-debug-shell-cmd-task.md b/en/device-dev/kernel/kernel-small-debug-shell-cmd-task.md
index 3eceba9af02fe37ab24ee34fe8282092a8e5a199..2510d417ccf6bc7e9d398daadf9941bd87e0cb1c 100644
--- a/en/device-dev/kernel/kernel-small-debug-shell-cmd-task.md
+++ b/en/device-dev/kernel/kernel-small-debug-shell-cmd-task.md
@@ -1,11 +1,4 @@
-# task
-
-- [Command Function](#section0533181714106)
-- [Syntax](#section1014412308101)
-- [Parameters](#section116057158506)
-- [Usage](#section2053502951112)
-- [Example](#section12629113381116)
-- [Output](#section19299103465015)
+# task
## Command Function
diff --git a/en/device-dev/kernel/kernel-small-debug-shell-cmd-top.md b/en/device-dev/kernel/kernel-small-debug-shell-cmd-top.md
index 3f605a6d21a6e44ccaa8a3ab8d567313e381f2b7..4fa4959b1b082d0394b78ef271ac9b89a4f29901 100644
--- a/en/device-dev/kernel/kernel-small-debug-shell-cmd-top.md
+++ b/en/device-dev/kernel/kernel-small-debug-shell-cmd-top.md
@@ -1,11 +1,4 @@
-# top
-
-- [Command Function](#section20643141481314)
-- [Syntax](#section1075441721316)
-- [Parameters](#section1472810220135)
-- [Usage](#section186772414131)
-- [Example](#section4764192791314)
-- [Output](#section5791253155517)
+# top
## Command Function
diff --git a/en/device-dev/kernel/kernel-small-debug-shell-cmd-uname.md b/en/device-dev/kernel/kernel-small-debug-shell-cmd-uname.md
index 781a427e634db8e478120f7ab6cb2ca1fde324e2..770a11ceb5171ba3ab3f33c7dd58f96984a02399 100644
--- a/en/device-dev/kernel/kernel-small-debug-shell-cmd-uname.md
+++ b/en/device-dev/kernel/kernel-small-debug-shell-cmd-uname.md
@@ -1,10 +1,4 @@
-# uname
-
-- [Command Function](#section107697383115)
-- [Syntax](#section162824341116)
-- [Usage](#section2652124861114)
-- [Example](#section0107995132)
-- [Output](#section1215113245511)
+# uname
## Command Function
diff --git a/en/device-dev/kernel/kernel-small-debug-shell-cmd-vmm.md b/en/device-dev/kernel/kernel-small-debug-shell-cmd-vmm.md
index 3a207165b81d1ad47dcb37bd7a51026f86829d8a..cce14dd6bbca807f007073d792efcfb8e3577823 100644
--- a/en/device-dev/kernel/kernel-small-debug-shell-cmd-vmm.md
+++ b/en/device-dev/kernel/kernel-small-debug-shell-cmd-vmm.md
@@ -1,11 +1,4 @@
-# vmm
-
-- [Command Function](#section445335110416)
-- [Syntax](#section1795712553416)
-- [Parameters](#section92544592410)
-- [Usage](#section104151141252)
-- [Example](#section11545171957)
-- [Output](#section075617368542)
+# vmm
## Command Function
diff --git a/en/device-dev/kernel/kernel-small-debug-shell-cmd-watch.md b/en/device-dev/kernel/kernel-small-debug-shell-cmd-watch.md
index df743e04bb4b8628338bedf864b9616374a11a96..343634d384010dd73dc69708e9d000a92925900e 100644
--- a/en/device-dev/kernel/kernel-small-debug-shell-cmd-watch.md
+++ b/en/device-dev/kernel/kernel-small-debug-shell-cmd-watch.md
@@ -1,11 +1,4 @@
-# watch
-
-- [Command Function](#section20643141481314)
-- [Syntax](#section1075441721316)
-- [Parameters](#section1472810220135)
-- [Usage](#section186772414131)
-- [Example](#section4764192791314)
-- [Output](#section5791253155517)
+# watch
## Command Function
diff --git a/en/device-dev/kernel/kernel-small-debug-shell-cmd.md b/en/device-dev/kernel/kernel-small-debug-shell-cmd.md
index 7d486f835fb2e3793ea4e5f1e7190fef26001f90..25e4f66d922ed4a9b0dc07abc0d7465e96d34724 100644
--- a/en/device-dev/kernel/kernel-small-debug-shell-cmd.md
+++ b/en/device-dev/kernel/kernel-small-debug-shell-cmd.md
@@ -1,4 +1,4 @@
-# System Commands
+# System Commands
- **[cpup](kernel-small-debug-shell-cmd-cpup.md)**
diff --git a/en/device-dev/kernel/kernel-small-debug-shell-details.md b/en/device-dev/kernel/kernel-small-debug-shell-details.md
index 177f26cb93d388705c5fa93911b377f248451cb5..8a119b8cc16f378ba4877ec6622768ca11fa73eb 100644
--- a/en/device-dev/kernel/kernel-small-debug-shell-details.md
+++ b/en/device-dev/kernel/kernel-small-debug-shell-details.md
@@ -1,4 +1,4 @@
-# Shell Command Reference
+# Shell Command Reference
This chapter describes the functions, syntax, parameter ranges, usage, and examples of key system commands.
diff --git a/en/device-dev/kernel/kernel-small-debug-shell-error.md b/en/device-dev/kernel/kernel-small-debug-shell-error.md
index 7dd0c56ef7625d085029512d109b0fd1efe07e9b..7ada09e5653cd9d2174405071efa43c53b85c228 100644
--- a/en/device-dev/kernel/kernel-small-debug-shell-error.md
+++ b/en/device-dev/kernel/kernel-small-debug-shell-error.md
@@ -1,4 +1,4 @@
-# User-Mode Exception Information
+# User-Mode Exception Information
During the running of the user mode, the following system exception may occur:
diff --git a/en/device-dev/kernel/kernel-small-debug-shell-file-cat.md b/en/device-dev/kernel/kernel-small-debug-shell-file-cat.md
index b3c4600aae569992fa8accbb47d71d9610e24e06..7a4fd54ccea998e7a1621eeb2a7d082f1ab5865d 100644
--- a/en/device-dev/kernel/kernel-small-debug-shell-file-cat.md
+++ b/en/device-dev/kernel/kernel-small-debug-shell-file-cat.md
@@ -1,11 +1,4 @@
-# cat
-
-- [Command Function](#section16710153391315)
-- [Syntax](#section1699392313158)
-- [Parameters](#section1677217374136)
-- [Usage](#section186772414131)
-- [Example](#section12158131814561)
-- [Output](#section183926225561)
+# cat
## Command Function
diff --git a/en/device-dev/kernel/kernel-small-debug-shell-file-cd.md b/en/device-dev/kernel/kernel-small-debug-shell-file-cd.md
index 8730d3dfc6a0df0d5af604e3713e03bb08b8eee8..187e454a2ad69814abdd8f15adab12cb39370872 100644
--- a/en/device-dev/kernel/kernel-small-debug-shell-file-cd.md
+++ b/en/device-dev/kernel/kernel-small-debug-shell-file-cd.md
@@ -1,11 +1,5 @@
-# cd
-
-- [Command Function](#section11690184921316)
-- [Syntax](#section75695409569)
-- [Parameters](#section71961353181311)
-- [Usage](#section3629759111317)
-- [Example](#section211620301412)
-- [Output](#section1968117214577)
+# cd
+
## Command Function
diff --git a/en/device-dev/kernel/kernel-small-debug-shell-file-chgrp.md b/en/device-dev/kernel/kernel-small-debug-shell-file-chgrp.md
index e80f1ee4cc3fd61330659ebbf84ea9a5dee50af7..af1df3355499e935a6df4931e722282d5826c268 100644
--- a/en/device-dev/kernel/kernel-small-debug-shell-file-chgrp.md
+++ b/en/device-dev/kernel/kernel-small-debug-shell-file-chgrp.md
@@ -1,11 +1,4 @@
-# chgrp
-
-- [Command Function](#section6103119161418)
-- [Syntax](#section186958132141)
-- [Parameters](#section81796174141)
-- [Usage](#section14330152417140)
-- [Example](#section951823119149)
-- [Output](#section14271133125715)
+# chgrp
## Command Function
diff --git a/en/device-dev/kernel/kernel-small-debug-shell-file-chmod.md b/en/device-dev/kernel/kernel-small-debug-shell-file-chmod.md
index ebf41f5105b8cc6d98ea76116f704ff412f96845..200131874538c91c07404b94982ec77e30dcb7d4 100644
--- a/en/device-dev/kernel/kernel-small-debug-shell-file-chmod.md
+++ b/en/device-dev/kernel/kernel-small-debug-shell-file-chmod.md
@@ -1,11 +1,4 @@
-# chmod
-
-- [Command Function](#section13992936121418)
-- [Syntax](#section63342439147)
-- [Parameter Description](#section894414671411)
-- [Usage](#section182415221419)
-- [Example](#section8518195718147)
-- [Output](#section127391818158)
+# chmod
## Command Function
diff --git a/en/device-dev/kernel/kernel-small-debug-shell-file-chown.md b/en/device-dev/kernel/kernel-small-debug-shell-file-chown.md
index 87588554ccf7b1e2e12f6e273e15495bad29b466..3a4006df874d5723184968c92472a6aeefed8f1e 100644
--- a/en/device-dev/kernel/kernel-small-debug-shell-file-chown.md
+++ b/en/device-dev/kernel/kernel-small-debug-shell-file-chown.md
@@ -1,11 +1,4 @@
-# chown
-
-- [Command Function](#section247414691513)
-- [Syntax](#section14773151018159)
-- [Parameters](#section598731391517)
-- [Usage](#section16524152071510)
-- [Example](#section17901152561510)
-- [Output](#section15513163115816)
+# chown
## Command Function
diff --git a/en/device-dev/kernel/kernel-small-debug-shell-file-cp.md b/en/device-dev/kernel/kernel-small-debug-shell-file-cp.md
index 93119d0a803fb36f6123c789f0cb1183c8501af7..b191a7fb5260b869905b47bad385db78c273afe4 100644
--- a/en/device-dev/kernel/kernel-small-debug-shell-file-cp.md
+++ b/en/device-dev/kernel/kernel-small-debug-shell-file-cp.md
@@ -1,11 +1,4 @@
-# cp
-
-- [Command Function](#section6841203041513)
-- [Syntax](#section24286359150)
-- [Parameters](#section558617385152)
-- [Usage](#section16128156162)
-- [Example](#section19354171211618)
-- [Output](#section16754183195914)
+# cp
## Command Function
diff --git a/en/device-dev/kernel/kernel-small-debug-shell-file-du.md b/en/device-dev/kernel/kernel-small-debug-shell-file-du.md
index 9a53aaa3568229d099729e7f45da73580cc90d74..8dd89bfaa3a1f573d8ec82be44b0b54704d5f309 100644
--- a/en/device-dev/kernel/kernel-small-debug-shell-file-du.md
+++ b/en/device-dev/kernel/kernel-small-debug-shell-file-du.md
@@ -1,11 +1,4 @@
-# du
-
-- [Command Function](#section201149459368)
-- [Syntax](#section579813484364)
-- [Parameters](#section168065311366)
-- [Usage](#section19190125723612)
-- [Example](#section10383416372)
-- [Output](#section16633113552815)
+# du
## Command Function
diff --git a/en/device-dev/kernel/kernel-small-debug-shell-file-format.md b/en/device-dev/kernel/kernel-small-debug-shell-file-format.md
index b2a5c18f5551d1e65d2631f17cb8cd3fb335396b..7801ff31c3b49d0318f49b2957ec6e9eda3049f0 100644
--- a/en/device-dev/kernel/kernel-small-debug-shell-file-format.md
+++ b/en/device-dev/kernel/kernel-small-debug-shell-file-format.md
@@ -1,11 +1,5 @@
-# format
-
-- [Command Function](#section1922331919169)
-- [Syntax](#section249226169)
-- [Parameters](#section985173416177)
-- [Usage](#section1510162714162)
-- [Example](#section25691431161611)
-- [Output](#section17368112365920)
+# format
+
## Command Function
diff --git a/en/device-dev/kernel/kernel-small-debug-shell-file-ls.md b/en/device-dev/kernel/kernel-small-debug-shell-file-ls.md
index d171d10e013f51a320be240212b93049241a88ff..0c8f1abbe920bd74558301b4e2dc61a3882d8a42 100644
--- a/en/device-dev/kernel/kernel-small-debug-shell-file-ls.md
+++ b/en/device-dev/kernel/kernel-small-debug-shell-file-ls.md
@@ -1,11 +1,4 @@
-# ls
-
-- [Command Function](#section6538163771614)
-- [Syntax](#section45881743111616)
-- [Parameters](#section17528148171617)
-- [Usage](#section041212533166)
-- [Example](#section986105716167)
-- [Output](#section2036124918592)
+# ls
## Command Function
diff --git a/en/device-dev/kernel/kernel-small-debug-shell-file-lsfd.md b/en/device-dev/kernel/kernel-small-debug-shell-file-lsfd.md
index 2b03724a71684980c53afb57f1414f5f836c0273..fe035b1c141dfcda3223df3c99335f1cc7901376 100644
--- a/en/device-dev/kernel/kernel-small-debug-shell-file-lsfd.md
+++ b/en/device-dev/kernel/kernel-small-debug-shell-file-lsfd.md
@@ -1,10 +1,5 @@
-# lsfd
+# lsfd
-- [Command Function](#section2053406181716)
-- [Syntax](#section523771017172)
-- [Usage](#section27241213201719)
-- [Example](#section442617197173)
-- [Output](#section42491639151813)
## Command Function
diff --git a/en/device-dev/kernel/kernel-small-debug-shell-file-mkdir.md b/en/device-dev/kernel/kernel-small-debug-shell-file-mkdir.md
index 124ef5042df0f7fdc61b2d8c5e934918afee0957..09b1935ecc8727ff43d148059c12afca27342ef9 100644
--- a/en/device-dev/kernel/kernel-small-debug-shell-file-mkdir.md
+++ b/en/device-dev/kernel/kernel-small-debug-shell-file-mkdir.md
@@ -1,11 +1,5 @@
-# mkdir
-
-- [Command Function](#section1083613274175)
-- [Syntax](#section820913118178)
-- [Parameters](#section1256834121718)
-- [Usage](#section1294234115172)
-- [Example](#section1113345211713)
-- [Output](#section10142201012)
+# mkdir
+
## Command Function
diff --git a/en/device-dev/kernel/kernel-small-debug-shell-file-mount.md b/en/device-dev/kernel/kernel-small-debug-shell-file-mount.md
index 60b96c53e120ec626fd58850e840455dd492a15f..9fccd3e4eaf981e0b072ea03cd9d71c4a41e1aac 100644
--- a/en/device-dev/kernel/kernel-small-debug-shell-file-mount.md
+++ b/en/device-dev/kernel/kernel-small-debug-shell-file-mount.md
@@ -1,11 +1,5 @@
-# mount
-
-- [Command Function](#section11631837182)
-- [Syntax](#section1697638111820)
-- [Parameters](#section1650151221819)
-- [Usage](#section124541520171912)
-- [Example](#section7424625171917)
-- [Output](#section14757018116)
+# mount
+
## Command Function
diff --git a/en/device-dev/kernel/kernel-small-debug-shell-file-mv.md b/en/device-dev/kernel/kernel-small-debug-shell-file-mv.md
index 72bd8fef129ab86db4723c9a4c8d799d97331ed9..880b14485c22069f023f256961485e33f6afb82c 100644
--- a/en/device-dev/kernel/kernel-small-debug-shell-file-mv.md
+++ b/en/device-dev/kernel/kernel-small-debug-shell-file-mv.md
@@ -1,11 +1,5 @@
-# mv
-
-- [Command Function](#section201149459368)
-- [Syntax](#section579813484364)
-- [Parameters](#section168065311366)
-- [Usage](#section19190125723612)
-- [Example](#section10383416372)
-- [Output](#section131601649114511)
+# mv
+
## Command Function
diff --git a/en/device-dev/kernel/kernel-small-debug-shell-file-partinfo.md b/en/device-dev/kernel/kernel-small-debug-shell-file-partinfo.md
index 74139c87118d09a58ea9ec7e4bad2bc717667651..6f0ed999752060343314708afe218e1488cf0128 100644
--- a/en/device-dev/kernel/kernel-small-debug-shell-file-partinfo.md
+++ b/en/device-dev/kernel/kernel-small-debug-shell-file-partinfo.md
@@ -1,11 +1,5 @@
-# partinfo
-
-- [Command Function](#section1777503617199)
-- [Syntax](#section185501447132114)
-- [Parameters](#section1304151212252)
-- [Usage](#section4566131982520)
-- [Example](#section4351134942514)
-- [Output](#section66689331412)
+# partinfo
+
## Command Function
diff --git a/en/device-dev/kernel/kernel-small-debug-shell-file-partition.md b/en/device-dev/kernel/kernel-small-debug-shell-file-partition.md
index 03f51089facff978a5ff5ab5941565edc1351490..48e98ea48d0073d82658803bc28f37f1403aae9d 100644
--- a/en/device-dev/kernel/kernel-small-debug-shell-file-partition.md
+++ b/en/device-dev/kernel/kernel-small-debug-shell-file-partition.md
@@ -1,11 +1,5 @@
-# partition
-
-- [Command Function](#section255095212257)
-- [Syntax](#section10258056122515)
-- [Parameters](#section177200581256)
-- [Usage](#section17866411262)
-- [Example](#section1927174202610)
-- [Output](#section11321011223)
+# partition
+
## Command Function
diff --git a/en/device-dev/kernel/kernel-small-debug-shell-file-pwd.md b/en/device-dev/kernel/kernel-small-debug-shell-file-pwd.md
index be084dd5a2f194bc35b314917f196b45c1afdd90..87513f7f67fe226d6b87c8281f0a31f6444b42e7 100644
--- a/en/device-dev/kernel/kernel-small-debug-shell-file-pwd.md
+++ b/en/device-dev/kernel/kernel-small-debug-shell-file-pwd.md
@@ -1,11 +1,5 @@
-# pwd
-
-- [Command Function](#section197737712267)
-- [Syntax](#section1544061016267)
-- [Parameters](#section599112120262)
-- [Usage](#section66901116152615)
-- [Example](#section7427181922612)
-- [Output](#section116313389418)
+# pwd
+
## Command Function
diff --git a/en/device-dev/kernel/kernel-small-debug-shell-file-rm.md b/en/device-dev/kernel/kernel-small-debug-shell-file-rm.md
index 6d095508abc27c84bb77a8c8f803582b33f57381..b535c90a4feab46cedd8f82d8398ef75da4b0777 100644
--- a/en/device-dev/kernel/kernel-small-debug-shell-file-rm.md
+++ b/en/device-dev/kernel/kernel-small-debug-shell-file-rm.md
@@ -1,11 +1,5 @@
-# rm
-
-- [Command Function](#section181141523142613)
-- [Syntax](#section8800926132619)
-- [Parameters](#section15476229152617)
-- [Usage](#section10578163215262)
-- [Example](#section18548133511263)
-- [Output](#section1565323814265)
+# rm
+
## Command Function
diff --git a/en/device-dev/kernel/kernel-small-debug-shell-file-rmdir.md b/en/device-dev/kernel/kernel-small-debug-shell-file-rmdir.md
index faf656c5e40bc30e7157bac4ef140c0456863913..70cf25e12419964077362426fb5f15d58092ba50 100644
--- a/en/device-dev/kernel/kernel-small-debug-shell-file-rmdir.md
+++ b/en/device-dev/kernel/kernel-small-debug-shell-file-rmdir.md
@@ -1,11 +1,5 @@
-# rmdir
-
-- [Command Function](#section1839611420266)
-- [Syntax](#section329574512266)
-- [Parameters](#section15865747102620)
-- [Usage](#section107857508261)
-- [Example](#section11196165315262)
-- [Output](#section1073811415613)
+# rmdir
+
## Command Function
diff --git a/en/device-dev/kernel/kernel-small-debug-shell-file-statfs.md b/en/device-dev/kernel/kernel-small-debug-shell-file-statfs.md
index 06d2354bc35b838710b948b9816f1fc6174f68d8..c38afd907c2de80ad20cf76d6af622462d398a9e 100644
--- a/en/device-dev/kernel/kernel-small-debug-shell-file-statfs.md
+++ b/en/device-dev/kernel/kernel-small-debug-shell-file-statfs.md
@@ -1,10 +1,5 @@
-# statfs
+# statfs
-- [Command Function](#section153921657152613)
-- [Syntax](#section135391102717)
-- [Parameters](#section074312314279)
-- [Usage](#section133816772712)
-- [Example](#section526149182717)
## Command Function
diff --git a/en/device-dev/kernel/kernel-small-debug-shell-file-sync.md b/en/device-dev/kernel/kernel-small-debug-shell-file-sync.md
index 6e8c72e2860cedbf488af181519fdaebe5f653b6..33670c9ca1cf5026325f11b933ab7335e46a6539 100644
--- a/en/device-dev/kernel/kernel-small-debug-shell-file-sync.md
+++ b/en/device-dev/kernel/kernel-small-debug-shell-file-sync.md
@@ -1,11 +1,5 @@
-# sync
-
-- [Command Function](#section1285017122274)
-- [Syntax](#section4731516162712)
-- [Parameters](#section9352418122714)
-- [Usage](#section10725192142717)
-- [Example](#section414434814354)
-- [Output](#section19618121710317)
+# sync
+
## Command Function
diff --git a/en/device-dev/kernel/kernel-small-debug-shell-file-touch.md b/en/device-dev/kernel/kernel-small-debug-shell-file-touch.md
index 8120954beaf52a99c11fdd53697db62f720889dd..e2ef6986f051af559c6af8c77f26309b53123371 100644
--- a/en/device-dev/kernel/kernel-small-debug-shell-file-touch.md
+++ b/en/device-dev/kernel/kernel-small-debug-shell-file-touch.md
@@ -1,11 +1,5 @@
-# touch
-
-- [Command Function](#section17541924112716)
-- [Syntax](#section866182711274)
-- [Parameters](#section268912296270)
-- [Usage](#section412093332714)
-- [Example](#section414434814354)
-- [Output](#section1028419515711)
+# touch
+
## Command Function
diff --git a/en/device-dev/kernel/kernel-small-debug-shell-file-umount.md b/en/device-dev/kernel/kernel-small-debug-shell-file-umount.md
index 59740a697048884ef6adeec2ffab1003caa90211..a3b41c10707376fc70af957aeb20adcd0fdbb797 100644
--- a/en/device-dev/kernel/kernel-small-debug-shell-file-umount.md
+++ b/en/device-dev/kernel/kernel-small-debug-shell-file-umount.md
@@ -1,11 +1,5 @@
-# umount
-
-- [Command Function](#section365125133520)
-- [Syntax](#section9615254123512)
-- [Parameters](#section63446577355)
-- [Usage](#section92931509368)
-- [Example](#section144311323616)
-- [Output](#section360525113611)
+# umount
+
## Command Function
diff --git a/en/device-dev/kernel/kernel-small-debug-shell-file-write.md b/en/device-dev/kernel/kernel-small-debug-shell-file-write.md
index 1957be6872d73e92c9e4d424ddea02072a1bf62f..f48ee11f17a53f04a3e1a197942e43dc6e167af1 100644
--- a/en/device-dev/kernel/kernel-small-debug-shell-file-write.md
+++ b/en/device-dev/kernel/kernel-small-debug-shell-file-write.md
@@ -1,11 +1,5 @@
-# writeproc
-
-- [Command Function](#section366714216619)
-- [Syntax](#section8833164614615)
-- [Parameters](#section12809111019453)
-- [Usage](#section15935131220717)
-- [Example](#section79281818476)
-- [Output](#section12742311179)
+# writeproc
+
## Command Function
diff --git a/en/device-dev/kernel/kernel-small-debug-shell-file.md b/en/device-dev/kernel/kernel-small-debug-shell-file.md
index 52a4812f6c0ed497253ef8d3a1cb7d622d933ef2..c9e90ebd48e2a61e0016fabee741ae227b42da99 100644
--- a/en/device-dev/kernel/kernel-small-debug-shell-file.md
+++ b/en/device-dev/kernel/kernel-small-debug-shell-file.md
@@ -1,4 +1,4 @@
-# File Commands
+# File Commands
- **[cat](kernel-small-debug-shell-file-cat.md)**
diff --git a/en/device-dev/kernel/kernel-small-debug-shell-guide.md b/en/device-dev/kernel/kernel-small-debug-shell-guide.md
index 588af244e9bdf0bf2a306b9cde20ad577c4bdb1d..d20dd2abf4420eb5f115171aafaa697108f38ed7 100644
--- a/en/device-dev/kernel/kernel-small-debug-shell-guide.md
+++ b/en/device-dev/kernel/kernel-small-debug-shell-guide.md
@@ -1,6 +1,5 @@
-# Shell Command Development Guidelines
+# Shell Command Development Guidelines
-- [Development Guidelines](#section13408945163812)
## Development Guidelines
diff --git a/en/device-dev/kernel/kernel-small-debug-shell-magickey.md b/en/device-dev/kernel/kernel-small-debug-shell-magickey.md
index 55133e1e74fb1d191ef14a2d53a534a52fccce26..95dd7f69f0160ae301c51a210ddb51c3c357728b 100644
--- a/en/device-dev/kernel/kernel-small-debug-shell-magickey.md
+++ b/en/device-dev/kernel/kernel-small-debug-shell-magickey.md
@@ -1,7 +1,5 @@
-# Magic Key
+# Magic Key
-- [When to Use](#section2350114718546)
-- [How to Use](#section3305151511559)
## When to Use
diff --git a/en/device-dev/kernel/kernel-small-debug-shell-net-arp.md b/en/device-dev/kernel/kernel-small-debug-shell-net-arp.md
index c34a87ecc68ac9f41d46278fcb3a9a7fe3b29d70..87b2afa6260a345d8e47c09398acf62b08c2ada0 100644
--- a/en/device-dev/kernel/kernel-small-debug-shell-net-arp.md
+++ b/en/device-dev/kernel/kernel-small-debug-shell-net-arp.md
@@ -1,10 +1,5 @@
-# arp
+# arp
-- [Command Function](#section201149459368)
-- [Syntax](#section579813484364)
-- [Parameters](#section168065311366)
-- [Usage](#section19190125723612)
-- [Example](#section10383416372)
## Command Function
diff --git a/en/device-dev/kernel/kernel-small-debug-shell-net-dhclient.md b/en/device-dev/kernel/kernel-small-debug-shell-net-dhclient.md
index 78249ea694a3c76e83c04e03360c51dcd59b0df5..afb2a55f32fe6475e94f19765a822036c28fb4e1 100644
--- a/en/device-dev/kernel/kernel-small-debug-shell-net-dhclient.md
+++ b/en/device-dev/kernel/kernel-small-debug-shell-net-dhclient.md
@@ -1,10 +1,5 @@
-# dhclient
+# dhclient
-- [Command Function](#section366714216619)
-- [Syntax](#section8833164614615)
-- [Parameters](#section12809111019453)
-- [Usage](#section15935131220717)
-- [Example](#section79281818476)
## Command Function
diff --git a/en/device-dev/kernel/kernel-small-debug-shell-net-ifconfig.md b/en/device-dev/kernel/kernel-small-debug-shell-net-ifconfig.md
index aa2b178e1bd86e40a0bf24a6716bc2cdecd61e66..be7d8a835a2944e3303cf6a4a182f8bebf42da94 100644
--- a/en/device-dev/kernel/kernel-small-debug-shell-net-ifconfig.md
+++ b/en/device-dev/kernel/kernel-small-debug-shell-net-ifconfig.md
@@ -1,11 +1,5 @@
-# ifconfig
-
-- [Command Function](#section174940284379)
-- [Syntax](#section136073203715)
-- [Parameters](#section6493235203710)
-- [Usage](#section05763403371)
-- [Example](#section168802042123717)
-- [Output](#section124638211109)
+# ifconfig
+
## Command Function
diff --git a/en/device-dev/kernel/kernel-small-debug-shell-net-ipdebug.md b/en/device-dev/kernel/kernel-small-debug-shell-net-ipdebug.md
index a60ad4db5e88f9580e412caa7601d7ed79f17a13..e3dcce0bd9ac649fa5fb5ad82b8f77d714afae9c 100644
--- a/en/device-dev/kernel/kernel-small-debug-shell-net-ipdebug.md
+++ b/en/device-dev/kernel/kernel-small-debug-shell-net-ipdebug.md
@@ -1,9 +1,5 @@
-# ipdebug
+# ipdebug
-- [Command Function](#section10191115553720)
-- [Syntax](#section124061758123713)
-- [Example](#section171837113810)
-- [Output](#section561416467104)
## Command Function
diff --git a/en/device-dev/kernel/kernel-small-debug-shell-net-netstat.md b/en/device-dev/kernel/kernel-small-debug-shell-net-netstat.md
index c99cd1a796df69b7dfa92f1cd6412008fec96313..a383b945766d96178bdf52cd532a315bed2ed6b2 100644
--- a/en/device-dev/kernel/kernel-small-debug-shell-net-netstat.md
+++ b/en/device-dev/kernel/kernel-small-debug-shell-net-netstat.md
@@ -1,11 +1,5 @@
-# netstat
-
-- [Command Function](#section13469162113816)
-- [Syntax](#section795712373812)
-- [Parameters](#section17629431193817)
-- [Usage](#section5277153519380)
-- [Example](#section108141437163820)
-- [Output](#section1357015107117)
+# netstat
+
## Command Function
diff --git a/en/device-dev/kernel/kernel-small-debug-shell-net-ntpdate.md b/en/device-dev/kernel/kernel-small-debug-shell-net-ntpdate.md
index b2ad34fa981fec5863e88f049cef48fdf6916e8c..f3fa527279212dab09ad895b48872ca143a67926 100644
--- a/en/device-dev/kernel/kernel-small-debug-shell-net-ntpdate.md
+++ b/en/device-dev/kernel/kernel-small-debug-shell-net-ntpdate.md
@@ -1,11 +1,5 @@
-# ntpdate
-
-- [Command Function](#section38494293815)
-- [Syntax](#section5503114413387)
-- [Parameters](#section136934472383)
-- [Usage](#section121401651173816)
-- [Example](#section3431554203811)
-- [Output](#section18638194610115)
+# ntpdate
+
## Command Function
diff --git a/en/device-dev/kernel/kernel-small-debug-shell-net-ping.md b/en/device-dev/kernel/kernel-small-debug-shell-net-ping.md
index f9252678e13010aaa6d6c306af87c7d7907c900c..5c709aaaf0bae7a78dda6e8cc5060c6832d176fb 100644
--- a/en/device-dev/kernel/kernel-small-debug-shell-net-ping.md
+++ b/en/device-dev/kernel/kernel-small-debug-shell-net-ping.md
@@ -1,11 +1,5 @@
-# ping
-
-- [Command Function](#section119672573385)
-- [Syntax](#section869419010390)
-- [Parameters](#section9877183173918)
-- [Usage](#section1097046193914)
-- [Example](#section14564129113911)
-- [Output](#section1621732891215)
+# ping
+
## Command Function
diff --git a/en/device-dev/kernel/kernel-small-debug-shell-net-ping6.md b/en/device-dev/kernel/kernel-small-debug-shell-net-ping6.md
index 4c91d848aafb7606eec15903923744764d4b8b42..e1ec3b85298b9e1a10a048518f13339cf1f111a7 100644
--- a/en/device-dev/kernel/kernel-small-debug-shell-net-ping6.md
+++ b/en/device-dev/kernel/kernel-small-debug-shell-net-ping6.md
@@ -1,11 +1,5 @@
-# ping6
-
-- [Command Function](#section1057291313393)
-- [Syntax](#section199901315123919)
-- [Parameters](#section4679319113919)
-- [Usage](#section1127917226399)
-- [Example](#section7211192553917)
-- [Output](#section4846145221215)
+# ping6
+
## Command Function
diff --git a/en/device-dev/kernel/kernel-small-debug-shell-net-telnet.md b/en/device-dev/kernel/kernel-small-debug-shell-net-telnet.md
index 5ab95a89bcc3dd596a46a1b08d45d43a5377fd20..8f20d27c6d8f9f31ea7f77f27145e6aea87586c0 100644
--- a/en/device-dev/kernel/kernel-small-debug-shell-net-telnet.md
+++ b/en/device-dev/kernel/kernel-small-debug-shell-net-telnet.md
@@ -1,11 +1,5 @@
-# telnet
-
-- [Command Function](#section3551830123913)
-- [Syntax](#section14897133233918)
-- [Parameters](#section977718353392)
-- [Usage](#section134991538183916)
-- [Example](#section1097414426398)
-- [Output](#section11846624191310)
+# telnet
+
## Command Function
diff --git a/en/device-dev/kernel/kernel-small-debug-shell-net-tftp.md b/en/device-dev/kernel/kernel-small-debug-shell-net-tftp.md
index 21983306a479c883a6da6914cb80bbd9007cf0cf..d5fd3fb26a5f92d87861acac6ac609c95d241ff0 100644
--- a/en/device-dev/kernel/kernel-small-debug-shell-net-tftp.md
+++ b/en/device-dev/kernel/kernel-small-debug-shell-net-tftp.md
@@ -1,11 +1,5 @@
-# tftp
-
-- [Command Function](#section15142134573911)
-- [Syntax](#section20958174917394)
-- [Parameters](#section576613532395)
-- [Usage](#section149795134408)
-- [Example](#section148921918114015)
-- [Output](#section7872155631313)
+# tftp
+
## Command Function
diff --git a/en/device-dev/kernel/kernel-small-debug-shell-net.md b/en/device-dev/kernel/kernel-small-debug-shell-net.md
index aa54200f3349d62c1c385aa732efba529d3a7b04..98a9d138de82a5d2d49bed1142d18c859b9deffa 100644
--- a/en/device-dev/kernel/kernel-small-debug-shell-net.md
+++ b/en/device-dev/kernel/kernel-small-debug-shell-net.md
@@ -1,4 +1,4 @@
-# Network Commands
+# Network Commands
- **[arp](kernel-small-debug-shell-net-arp.md)**
diff --git a/en/device-dev/kernel/kernel-small-debug-shell-overview.md b/en/device-dev/kernel/kernel-small-debug-shell-overview.md
index a69788187bca2ce07c451898409cd3e6cd26e13f..5ac89f7eb900197534dca3a3d73846a9bdde0b6f 100644
--- a/en/device-dev/kernel/kernel-small-debug-shell-overview.md
+++ b/en/device-dev/kernel/kernel-small-debug-shell-overview.md
@@ -1,6 +1,5 @@
-# Introduction to the Shell
+# Introduction to the Shell
-- [Important Notes](#section12298165312328)
The shell provided by the OpenHarmony kernel supports commonly used debugging commands. You can also add and customize commands to the shell of the OpenHarmony kernel to address your service needs. The common debugging commands include the following:
@@ -13,7 +12,7 @@ The shell provided by the OpenHarmony kernel supports commonly used debugging co
For details about how to add a command, see [Shell Command Development Guidelines](kernel-small-debug-shell-guide.md) and [Shell Command Programming Example](kernel-small-debug-shell-build.md).
-## Important Notes
+## Important Notes
Note the following when using the shell:
@@ -30,7 +29,7 @@ Note the following when using the shell:
- The shell functions do not comply with the POSIX standards and are used only for debugging.
- > **NOTICE:**
+ > **NOTICE**
>The shell functions are used for debugging only and can be enabled only in the Debug version \(by enabling the **LOSCFG\_DEBUG\_VERSION** configuration item using **menuconfig**\).
diff --git a/en/device-dev/kernel/kernel-small-debug-shell.md b/en/device-dev/kernel/kernel-small-debug-shell.md
index 20453c471554d67b97c034cb4e728b50ae763666..6ba06142032d708877003a8e31c2e0e977697b24 100644
--- a/en/device-dev/kernel/kernel-small-debug-shell.md
+++ b/en/device-dev/kernel/kernel-small-debug-shell.md
@@ -1,4 +1,4 @@
-# Shell
+# Shell
- **[Introduction to the Shell](kernel-small-debug-shell-overview.md)**
diff --git a/en/device-dev/kernel/kernel-small-debug-trace-other-faqs.md b/en/device-dev/kernel/kernel-small-debug-trace-other-faqs.md
index 23ec4cbd34c981cb8d95125ebf15aaa4eec3f0d6..8cbc55530c9bfe3e7dc9069e8b810cbcf466b5f4 100644
--- a/en/device-dev/kernel/kernel-small-debug-trace-other-faqs.md
+++ b/en/device-dev/kernel/kernel-small-debug-trace-other-faqs.md
@@ -1,14 +1,10 @@
-# Common Fault Locating Methods
-
-- [Locating the Fault Based on Exception Information](#section695838161711)
-- [Checking Memory Pool Integrity](#section362917569179)
-- [Locating Memory Overwriting for a Global Variable](#section18971311121816)
+# Common Fault Locating Methods
## Locating the Fault Based on Exception Information
When the system is suspended unexpectedly, information about key registers is displayed on the serial port, as shown in the following figure. The information can be used to locate the function where the exception occurs and the related call stack.
-**Figure 1** Exception information
+**Figure 1** Exception information

The exception information in the preceding figure is described as follows:
@@ -23,13 +19,13 @@ The exception information in the preceding figure is described as follows:
You also need to check the **OHOS\_Image.asm** file \(assembly file corresponding to the burnt system image **OHOS\_Image.bin**\) in the **out** directory to determine the locations of the instructions corresponding to **pc** and **lr**. Based on the locations of the instructions, determine the functions using the instructions and the functions where **lr**s are located in sequence. In this way, you can obtain the function call relationships when the exception occurs.
-## Checking Memory Pool Integrity
+## Checking Memory Pool Integrity
You may not directly locate the fault only with the exception information. Sometimes, the fault cannot be located due to incorrect register values. If you suspect that the fault is caused by heap memory overwriting, you can call **LOS\_MemIntegrityCheck** to check the memory pool integrity. The **LOS\_MemIntegrityCheck** function traverses all nodes in the dynamic memory pool of the system. If all nodes are normal, the function returns **0** and no information is printed. Otherwise, error information is printed. This function uses **\(VOID \*\)OS\_SYS\_MEM\_ADDR** as the input parameter.
Generally, **LOS\_MemIntegrityCheck** is called before and after the suspected service logic code to locate the heap memory overwriting. If the service code is correct, **LOS\_MemIntegrityCheck** can be called successfully. By doing this, you can improve the troubleshooting efficiency.
-## Locating Memory Overwriting for a Global Variable
+## Locating Memory Overwriting for a Global Variable
If the memory of a global variable is illegally accessed, locate the address of the global variable in the **OHOS\_Image.map** file and pay special attention to the variables recently used before the address. There is a high probability that memory overwriting occurs when the preceding variables \(especially variables of the array type or variables that are forcibly converted to other types\) are used.
diff --git a/en/device-dev/kernel/kernel-small-debug-trace-other-lastwords.md b/en/device-dev/kernel/kernel-small-debug-trace-other-lastwords.md
index 30a55b45f4f77ae692f101d9e15cfb63735a1e71..094a0d208bd8541951f5f9095efee92aaf534564 100644
--- a/en/device-dev/kernel/kernel-small-debug-trace-other-lastwords.md
+++ b/en/device-dev/kernel/kernel-small-debug-trace-other-lastwords.md
@@ -1,9 +1,4 @@
-# Dying Gasp
-
-- [When to Use](#section158501652121514)
-- [Available APIs](#section1186411122215)
-- [Parameters](#section1083765723015)
-- [How to Develop](#section783435801510)
+# Dying Gasp
## When to Use
diff --git a/en/device-dev/kernel/kernel-small-debug-trace.md b/en/device-dev/kernel/kernel-small-debug-trace.md
index 915532ce6a867d63a8d3689ac476649e42877851..b808e35d2515e9ede4def18ec35fd7a06a638d59 100644
--- a/en/device-dev/kernel/kernel-small-debug-trace.md
+++ b/en/device-dev/kernel/kernel-small-debug-trace.md
@@ -1,17 +1,4 @@
-# Trace
-
-- [Basic Concepts](#section531482192018)
-- [Working Principles](#section5125124532010)
-- [Available APIs](#section17747184017458)
- - [Kernel Mode](#section104473014465)
- - [User Mode](#section1996920294531)
-
-- [Development Guidelines](#section10302175017543)
- - [Kernel-mode Development Process](#section04021008552)
-
-- [Kernel-mode Programming Example](#section112034213583)
-- [Kernel-mode Sample Code](#section10348549155812)
-- [Verification](#section8601444165916)
+# Trace
## Basic Concepts
diff --git a/en/device-dev/kernel/kernel-small-debug-user-concept.md b/en/device-dev/kernel/kernel-small-debug-user-concept.md
index e7deb11d9233d832e793fe3bd55f05adab2859de..6d9234ff74cf02724b3c6ebe404a7e760103f81f 100644
--- a/en/device-dev/kernel/kernel-small-debug-user-concept.md
+++ b/en/device-dev/kernel/kernel-small-debug-user-concept.md
@@ -1,4 +1,4 @@
-# Basic Concepts
+# Basic Concepts
The musl libc library of the debug version provides maintenance and test methods, such as memory leak check, heap memory statistics, memory corruption check, and backtrace, to improve the efficiency of locating memory problems in user space.
diff --git a/en/device-dev/kernel/kernel-small-debug-user-faqs.md b/en/device-dev/kernel/kernel-small-debug-user-faqs.md
index ec114f13d974efbdd966f916e6e905c73af42648..756cad3e586b1716aa63ef8de09b0d28413a09df 100644
--- a/en/device-dev/kernel/kernel-small-debug-user-faqs.md
+++ b/en/device-dev/kernel/kernel-small-debug-user-faqs.md
@@ -1,8 +1,5 @@
-# Typical Memory Problems
+# Typical Memory Problems
-- [Use After Free \(UAF\)](#section4427132815445)
-- [Double Free](#section827194818458)
-- [Heap Memory Node Corrupted](#section1763741216461)
## Use After Free \(UAF\)
diff --git a/en/device-dev/kernel/kernel-small-debug-user-function.md b/en/device-dev/kernel/kernel-small-debug-user-function.md
index 873cc69210029add9f52a8dcd13625b6f59e6a76..552ccee3423e29b38b97eb79360286ff2cc1926c 100644
--- a/en/device-dev/kernel/kernel-small-debug-user-function.md
+++ b/en/device-dev/kernel/kernel-small-debug-user-function.md
@@ -1,8 +1,4 @@
-# Working Principles
-
-- [Memory Leak Check](#section142061581018)
-- [Heap Memory Statistics](#section136902041337)
-- [Memory Integrity Check](#section196491231761)
+# Working Principles
## Memory Leak Check
diff --git a/en/device-dev/kernel/kernel-small-debug-user-guide-api.md b/en/device-dev/kernel/kernel-small-debug-user-guide-api.md
index dd4edac33c85d74bfb8bda00e278c2d0988675c7..aa4aa98b5ce50f7085a94ccdafc07f073ae36759 100644
--- a/en/device-dev/kernel/kernel-small-debug-user-guide-api.md
+++ b/en/device-dev/kernel/kernel-small-debug-user-guide-api.md
@@ -1,4 +1,4 @@
-# API Description
+# Available APIs
**Table 1** Memory debugging module APIs
diff --git a/en/device-dev/kernel/kernel-small-debug-user-guide-use-api.md b/en/device-dev/kernel/kernel-small-debug-user-guide-use-api.md
index 2841f08b6e801f7eb12251102f22bdb1acedf249..4160dfa63d23648e398a6e5bbc043a0ba5b48a09 100644
--- a/en/device-dev/kernel/kernel-small-debug-user-guide-use-api.md
+++ b/en/device-dev/kernel/kernel-small-debug-user-guide-use-api.md
@@ -1,9 +1,5 @@
-# Calling APIs
+# Calling APIs
-- [Sample Code](#section5490173592518)
-- [Compilation](#section534302242515)
-- [Debugging Information](#section1017419992515)
-- [Call Stack Parsing](#section1485163282417)
## Sample Code
@@ -37,13 +33,13 @@ int main()
}
```
-## Compilation
+## Compilation
```
$ clang -o mem_check mem_check.c -funwind-tables -rdynamic -g -mfloat-abi=softfp -mcpu=cortex-a7 -mfpu=neon-vfpv4 -target arm-liteos --sysroot=/home//directory/out/hispark_taurus/ipcamera_hispark_taurus/sysroot $(clang -mfloat-abi=softfp -mcpu=cortex-a7 -mfpu=neon-vfpv4 -target arm-liteos -print-file-name=libunwind.a)
```
-> **NOTE:**
+> **NOTE**
>- In this example, the compiler path is written into an environment variable in the **.bashrc** file.
>- When compiling user programs and required libraries, add the option **-funwind-tables -rdynamic -g** for stack backtracking.
>- The **-mfloat-abi=softfp**, **-mcpu=cortex-a7**, and **-mfpu=neon-vfpv4** options specify the floating-point calculation optimization, chip architecture, and FPU, which must be the same as the compilation options used by the libc library. Otherwise, the libc library file cannot be found during the link time.
@@ -51,7 +47,7 @@ $ clang -o mem_check mem_check.c -funwind-tables -rdynamic -g -mfloat-abi=softfp
>- **--sysroot=/home//directory/out/hispark\_taurus/ipcamera\_hispark\_taurus/sysroot** specifies the root directory of the compiler library files. In this example, the OpenHarmony project code is stored in **/home//directory**. The **out/hispark\_taurus/ipcamera\_hispark\_taurus** directory indicates the product specified by the **hb set** command during compilation. In this example, **ipcamera\_hispark\_taurus** is the product specified.
>- **$\(clang -mfloat-abi=softfp -mcpu=cortex-a7 -mfpu=neon-vfpv4 -target arm-liteos -print-file-name=libunwind.a\)** specifies the path of the unwind library.
-## Debugging Information
+## Debugging Information
```
OHOS # ./mem_check
@@ -102,7 +98,7 @@ Check heap integrity ok! // Heap memory integrity check
Check heap integrity ok!
```
-## Call Stack Parsing
+## Call Stack Parsing
The **parse\_mem\_info.sh** script in **kernel/liteos\_a/tools/scripts/parse\_memory/** can be used to parse the call stack. You can use the script to convert the debug information into specific source code line number. In the following command, **mem\_debug.txt** stores the memory debugging information, and **elf1** and **elf2** are the executable and linkable format \(ELF\) files to parse.
diff --git a/en/device-dev/kernel/kernel-small-debug-user-guide-use-cli.md b/en/device-dev/kernel/kernel-small-debug-user-guide-use-cli.md
index 5d6a69f907560cb76c18ded46088ee78a6866544..14843967675e1bc67e40ad5dd014c0bb18333329 100644
--- a/en/device-dev/kernel/kernel-small-debug-user-guide-use-cli.md
+++ b/en/device-dev/kernel/kernel-small-debug-user-guide-use-cli.md
@@ -1,10 +1,4 @@
-# Using the CLI
-
-- [Sample Code](#section13793104782316)
-- [Compilation](#section1676431122320)
-- [Running the mwatch Command](#section1703415132311)
-- [Call Stack Parsing](#section1880675510221)
-- [Running the mrecord Command](#section071022822210)
+# Using the CLI
In addition to calling APIs to check the memory used by user-mode processes, you can run CLI commands to collect memory statistics, check for memory leaks, and check memory integrity.
@@ -46,11 +40,11 @@ int main()
}
```
-## Compilation
+## Compilation
-For details, see [Calling APIs](kernel-small-debug-user-guide-use-api.md#section534302242515).
+For details, see [Calling APIs](kernel-small-debug-user-guide-use-api.md#compilation).
-## Running the mwatch Command
+## Running the mwatch Command
```
OHOS # ./mem_check --mwatch // Run the task command to obtain the mem_check process PID, which is 4.
@@ -114,7 +108,7 @@ Now using addr2line ...
==PID:4== SUMMARY: 0x640 byte(s) leaked in 2 allocation(s).
```
-## Running the mrecord Command
+## Running the mrecord Command
1. Run the user program and specify the path of the file that stores the memory debugging information.
@@ -224,6 +218,6 @@ Now using addr2line ...
```
-> **NOTE:**
+> **NOTE**
>The preceding information recorded gradually is added to the file specified during initialization. Therefore, running the **cat** command can also display the historical information in the file.
diff --git a/en/device-dev/kernel/kernel-small-debug-user-guide-use.md b/en/device-dev/kernel/kernel-small-debug-user-guide-use.md
index cbdc9e1152b875c46e9dadc154b906b418311d08..87d8b3da62348a62c12f6ef3b01cad785c2b919d 100644
--- a/en/device-dev/kernel/kernel-small-debug-user-guide-use.md
+++ b/en/device-dev/kernel/kernel-small-debug-user-guide-use.md
@@ -1,4 +1,4 @@
-# How to Use
+# How to Use
By default, the OpenHarmony debug version is compiled when a project is built. The libc library of the debug version has integrated the APIs for memory debugging. You can enable memory debugging as required.
@@ -7,7 +7,7 @@ You can perform heap memory debugging by using either of the following:
- API: By calling APIs, you can accurately check the heap memory information of a specific code logic segment. However, you have to modify user code.
- CLI: By using the CLI, you do not need to modify user code. However, you cannot accurately check the heap memory information of a specific logic segment.
-> **NOTE:**
+> **NOTE**
>After memory debugging is enabled, a heap memory leak check and a heap memory integrity check will be performed by default when a process exits. If memory debugging is disabled, the heap memory statistics, heap memory leak check, and heap memory integrity check cannot be enabled, and there is no response to the calling of any debug API.
- **[Calling APIs](kernel-small-debug-user-guide-use-api.md)**
diff --git a/en/device-dev/kernel/kernel-small-debug-user-guide.md b/en/device-dev/kernel/kernel-small-debug-user-guide.md
index 49ba86149d6b654a7bf652160a6d8fee09351ac0..a5f0afa8562526ba98226a29cb4976660343d78b 100644
--- a/en/device-dev/kernel/kernel-small-debug-user-guide.md
+++ b/en/device-dev/kernel/kernel-small-debug-user-guide.md
@@ -1,6 +1,6 @@
-# Usage
+# Usage
-- **[API Description](kernel-small-debug-user-guide-api.md)**
+- **[Available APIs](kernel-small-debug-user-guide-api.md)**
- **[How to Use](kernel-small-debug-user-guide-use.md)**
diff --git a/en/device-dev/kernel/kernel-small-debug-user.md b/en/device-dev/kernel/kernel-small-debug-user.md
index e9add7160c36bf17c152f406cf65e18b978fc76a..f7707851b3114c97de3453cde6b073d2205e1f0d 100644
--- a/en/device-dev/kernel/kernel-small-debug-user.md
+++ b/en/device-dev/kernel/kernel-small-debug-user.md
@@ -1,4 +1,4 @@
-# User-Mode Memory Debugging
+# User-Mode Memory Debugging
- **[Basic Concepts](kernel-small-debug-user-concept.md)**
diff --git a/en/device-dev/kernel/kernel-small-debug.md b/en/device-dev/kernel/kernel-small-debug.md
index cea060e9cd0be22529d8dce9681572b99ef50a18..3ebc6a8edf49eca067dcac19e62c75b39ad72eaf 100644
--- a/en/device-dev/kernel/kernel-small-debug.md
+++ b/en/device-dev/kernel/kernel-small-debug.md
@@ -1,4 +1,4 @@
-# Debugging and Tools
+# Debugging and Tools
- **[Shell](kernel-small-debug-shell.md)**
@@ -8,7 +8,7 @@
- **[LMS](kernel-small-memory-lms.md)**
-- **[Process Commissioning](kernel-small-debug-process.md)**
+- **[Process Debugging](kernel-small-debug-process.md)**
- **[Kernel-Mode Memory Debugging](kernel-small-debug-memory.md)**
diff --git a/en/device-dev/kernel/kernel-small-memory-lms.md b/en/device-dev/kernel/kernel-small-memory-lms.md
index c18b5bf6206af5592c264317f8eb41b3248590ab..74595cb951918bad29df9240c52395866cc5e853 100644
--- a/en/device-dev/kernel/kernel-small-memory-lms.md
+++ b/en/device-dev/kernel/kernel-small-memory-lms.md
@@ -1,21 +1,4 @@
-# LMS
-
-- [Basic Concepts](#section531482192018)
-- [Working Principles](#section5125124532010)
-- [Available APIs](#section17747184017458)
- - [Kernel Mode](#section104473014465)
- - [User Mode](#section58151229172811)
-
-- [Development Guidelines](#section10302175017543)
- - [Kernel-mode Development Process](#section04021008552)
-
-- [Kernel-mode Development Example](#section112034213583)
-- [Kernel-mode Sample Code](#section10348549155812)
- - [Kernel-mode Verification](#section61719481795)
- - [User-mode Development Process](#section1425821711114)
- - [User-mode Development Example](#section3470546163)
- - [User-Mode Sample Code](#section183253286161)
- - [User-mode Verification](#section5665123516214)
+# LMS
## Basic Concepts
diff --git a/en/device-dev/kernel/kernel-small-overview.md b/en/device-dev/kernel/kernel-small-overview.md
index bb4c1f642537d2cd08a3494baa7b6bf74dc00020..487282bb8d94453f5135596f2df393f91dbb2ae6 100644
--- a/en/device-dev/kernel/kernel-small-overview.md
+++ b/en/device-dev/kernel/kernel-small-overview.md
@@ -1,7 +1,6 @@
-# Kernel Overview
+# Kernel Overview
+
-- [Overview](#section6614133913129)
-- [Kernel Architecture](#section827143517385)
## Overview
@@ -84,7 +83,7 @@ The LiteOS-A integrates the HDF framework. The HDF framework provides a more pre
- Configurable component-based driver model
- Message-based driver interface model
- Object-based driver and device management
-- Unified hardware driver interface \(HDI\)
+- Unified hardware device interface \(HDI\)
- Power management and plug and play \(PnP\)
**Extended Components**
diff --git a/en/device-dev/kernel/kernel-small-start-kernel.md b/en/device-dev/kernel/kernel-small-start-kernel.md
index af89550ddf6ddf59b4032f4f3525d08794f09e2c..c92af04ba02216c05708e280bd427b7b8cb128d8 100644
--- a/en/device-dev/kernel/kernel-small-start-kernel.md
+++ b/en/device-dev/kernel/kernel-small-start-kernel.md
@@ -1,8 +1,4 @@
-# Startup in Kernel Mode
-
-- [Kernel Startup Process](#section9882154318299)
-- [Programming Example](#section19145114703217)
- - [Example Description](#section1045483642518)
+# Startup in Kernel Mode
## Kernel Startup Process
diff --git a/en/device-dev/kernel/kernel-small-start-user.md b/en/device-dev/kernel/kernel-small-start-user.md
index c1c910972caa8782023bbae7e37ac5e5b54c7c05..f2526dda1e39f972865de8ae98f29fbffb24fd22 100644
--- a/en/device-dev/kernel/kernel-small-start-user.md
+++ b/en/device-dev/kernel/kernel-small-start-user.md
@@ -1,10 +1,4 @@
-# Startup in User Mode
-
-- [Startup of the Root Process in User Mode](#section79911135647)
- - [Startup Process of the Root Process](#section1184317581349)
- - [Responsibilities of the Root Process](#section1590220321759)
-
-- [Running Programs in User Mode](#section194576310611)
+# Startup in User Mode
## Startup of the Root Process in User Mode
diff --git a/en/device-dev/kernel/kernel-small-start.md b/en/device-dev/kernel/kernel-small-start.md
index 72217136ac8dec2d69fcd8e62d833888cc314ac2..4f428bbb9f4dbe54cb6a3e8af4277f7b4340d962 100644
--- a/en/device-dev/kernel/kernel-small-start.md
+++ b/en/device-dev/kernel/kernel-small-start.md
@@ -1,4 +1,4 @@
-# Kernel Startup
+# Kernel Startup
- **[Startup in Kernel Mode](kernel-small-start-kernel.md)**
diff --git a/en/device-dev/kernel/kernel-small.md b/en/device-dev/kernel/kernel-small.md
index 755241d1b3ff7c8f4a7cd56707b6d505a83b8a46..07fae1d789b3870ecd390ac99d2dfdba40066be5 100644
--- a/en/device-dev/kernel/kernel-small.md
+++ b/en/device-dev/kernel/kernel-small.md
@@ -1,4 +1,4 @@
-# Kernel for the Small System
+# Small-System Kernel
- **[Kernel Overview](kernel-small-overview.md)**
diff --git a/en/device-dev/kernel/kernel-standard-build.md b/en/device-dev/kernel/kernel-standard-build.md
index 579ebeb72bfb2a37699a5eb684601114afb2331d..747c9133458aec67156d3a1200d705b1a45df4a5 100644
--- a/en/device-dev/kernel/kernel-standard-build.md
+++ b/en/device-dev/kernel/kernel-standard-build.md
@@ -1,16 +1,14 @@
-# Compiling and Building the Linux Kernel
+# Compiling and Building the Linux Kernel
-- [Example 1](#section19369206113115)
-
-## Example 1
+## Example 1
The following uses the Hi3516D V300 board and Ubuntu x86 server as an example.
Perform a full build for the project to generate the **uImage** kernel image.
```
-./build.sh --product-name Hi3516DV300 # Build the Hi3516D V300 image.
- --build-target build_kernel # Build the uImage kernel image of the Hi3516D V300 board.
+./build.sh --product-name hispark_taurus_standard # Build the hispark_taurus_standard image.
+ --build-target build_kernel # Build the uImage kernel image of the hispark_taurus_standard.
--gn-args linux_kernel_version=\"linux-5.10\" # Build the specified kernel version.
```
diff --git a/en/device-dev/kernel/kernel-standard-mm-eswap.md b/en/device-dev/kernel/kernel-standard-mm-eswap.md
index f623c62ab1685c4926b1dca19493de62ae07ee49..e44534ed70119aea30ec3b406f775d39732caaa0 100644
--- a/en/device-dev/kernel/kernel-standard-mm-eswap.md
+++ b/en/device-dev/kernel/kernel-standard-mm-eswap.md
@@ -1,4 +1,4 @@
-# Enhanced SWAP
+# Enhanced Swap
## Basic Concepts
@@ -11,7 +11,7 @@ Enhanced Swap (ESwap) allows a custom partition to serve as a swap partition and
### Enabling ESwap
1. Enable related configuration items and dependencies.
- To enable ESwap, you need to enable the corresponding configuration items and dependencies during kernel compilation. The configuration items related to ESwap are as follows:
+ To enable ESwap, you must enable the corresponding configuration items and dependencies during kernel compilation. The configuration items related to ESwap are as follows:
```
CONFIG_HYPERHOLD=y
@@ -41,13 +41,13 @@ Enhanced Swap (ESwap) allows a custom partition to serve as a swap partition and
```Bash
// Run the dd command to create the hpdisk file for ESwap. In this example, the file size is 512 MB. Set the file size based on service requirements.
dd if=/dev/random of=/data/hpdisk bs=4096 count=131072
- // Associate the hpdisk file created with the ESwap device.
+ // Associate the hpdisk file with the ESwap device.
losetup /dev/block/loop6 hpdisk
```
3. Configure ESwap.
- Bind the device created in 2 as the ESwap device.
+ Bind the device created in step 2 as the ESwap device.
```Bash
echo /dev/block/loop6 > /proc/sys/kernel/hyperhold/device
@@ -56,11 +56,11 @@ Enhanced Swap (ESwap) allows a custom partition to serve as a swap partition and
By default, ESwap encrypts the data swapped out. If the ESwap device created in step 2 supports inline encryption, you can disable the ESwap software encryption function.
```Bash
- // Check whether hardware-based encryption is supported and enabled. If not, do not perform this operation.
+ // Check whether hardware-based encryption is supported and enabled. If yes, disable software encryption. Otherwise, do not perform this operation.
echo 0 > /proc/sys/kernel/hyperhold/soft_crypt
```
- > **CAUTION**
+ >  **CAUTION**
> For security purposes, all swapped content must be encrypted. If the ESwap device created does not support inline encryption or the inline encryption macro is not enabled during compilation, ESwap cannot be enabled after software encryption is disabled.
4. Enable ESwap.
@@ -72,8 +72,8 @@ Enhanced Swap (ESwap) allows a custom partition to serve as a swap partition and
```
-> **NOTE**
-> Enable ESwap before zram is enabled. If ESwap is not used, you can enable zram only. If a device does not have the storage device for swap-out or have the corresponding storage partition created, you can enable ZRAM to reclaim memory using **zswapd**.
+>  **NOTE**
+> Enable ESwap before zram is enabled. If ESwap is not used, you can enable zram only. If a device does not have the storage device for swap-out or have the corresponding storage partition created, you can enable zram to reclaim memory using **zswapd**.
### Enabling zram
@@ -88,7 +88,7 @@ Enhanced Swap (ESwap) allows a custom partition to serve as a swap partition and
echo 512M > /sys/block/zram0/disksize
```
- > **NOTE**
+ >  **NOTE**
> The parameters and functions of **/sys/block/zram0/group** are as follows:
>
> - **disable**: disables the function.
@@ -115,11 +115,11 @@ Enhanced Swap (ESwap) allows a custom partition to serve as a swap partition and
echo force_disable > /proc/sys/kernel/hyperhold/enable
```
- > **NOTE**
+ >  **NOTE**
> The difference of the two commands is as follows:
>
- > - **disable**: If there is no data in the ESwap partition, disable ESwap. Otherwise, changes ESwap to read-only mode.
- > - **force_disable**: If there is no data in the ESwap partition, disable ESwap. Otherwise, changes ESwap to read-only mode and disable ESwap until all data in the ESWAP partition is read.
+ > - **disable**: If there is no data in the ESwap partition, disable ESwap. Otherwise, changes ESwap to **readonly** mode.
+ > - **force_disable**: If there is no data in the ESwap partition, disable ESwap. Otherwise, changes ESwap to **readonly** mode and disable ESwap until all data in the ESWAP partition is read.
2. Disable zram and zram group.
@@ -143,7 +143,7 @@ ESwap provides APIs to control swap-in and swap-out policies and record the curr
| | [stat](#stat) | Checks the real-time status of ESwap.|
| | [zswapd_vmstat_show](#zswapd_vmstat_show) | Records events during the zswapd running.|
-> **CAUTION**
+>  **CAUTION**
> Only **avail_buffers** proactively wakes up zswapd because the buffer waterline is adjusted. Other control APIs do not proactively wake up zswapd, but their configuration takes effect only after zswapd is woken up.
The APIs are described as follows:
diff --git a/en/device-dev/kernel/kernel-standard-mm.md b/en/device-dev/kernel/kernel-standard-mm.md
index 8009b6337a658386a89982efbfa662cefa341b14..43e90bd327dfe1a34644860cdf8fc21dce451a99 100644
--- a/en/device-dev/kernel/kernel-standard-mm.md
+++ b/en/device-dev/kernel/kernel-standard-mm.md
@@ -1,3 +1,4 @@
# Memory Management
-- **[Enhanced Swap] (kernel-standard-mm-eswap.md)**
+- **[Enhanced Swap](kernel-standard-mm-eswap.md)**
+
diff --git a/en/device-dev/kernel/kernel-standard-overview.md b/en/device-dev/kernel/kernel-standard-overview.md
index 0bb067e3ff7afa0bdef3c1c7001d928620095154..8c9fdc21f6e0eb3771f631843bb40e4dff2f42d4 100644
--- a/en/device-dev/kernel/kernel-standard-overview.md
+++ b/en/device-dev/kernel/kernel-standard-overview.md
@@ -1,11 +1,9 @@
-# Linux Kernel Overview
+# Linux Kernel Overview
-- [Linux Kernel Versions](#section152847516485)
-- [OpenHarmony Kernel Version Selection](#section2716416191715)
OpenHarmony adopts the Linux kernel as the basic kernel for standard-system devices \(reference memory ≥ 128 MiB\) so that appropriate OS kernels can be selected for the devices subject to resource limitations and therefore provide basic capabilities for upper-layer apps.
-## Linux Kernel Versions
+## Linux Kernel Versions
Linux kernel versions are classified into the stable version and long-term support \(LTS\) version.
@@ -13,7 +11,7 @@ The stable version is released approximately every 3 months to support the lates
The LTS version provides long-term kernel maintenance \(in fixing bugs and security vulnerabilities\). Generally, the maintenance lifespan is six years. By contrast, non-LTS kernel versions whose maintenance lifespan ranges from six months to two years cannot cover the entire lifespan of their products and may leave the products open to security vulnerabilities. In addition, new features are not added in the LTS version update, which ensures the version stability. Therefore, LTS versions are more suitable for commercial products that pursue stability and security.
-## OpenHarmony Kernel Version Selection
+## OpenHarmony Kernel Version Selection
The Linux kernel in OpenHarmony selects appropriate LTS versions as its basic versions. Currently, it supports Linux-4.19 and Linux-5.10.
diff --git a/en/device-dev/kernel/kernel-standard-patch.md b/en/device-dev/kernel/kernel-standard-patch.md
index 029de25eb881cacd4556235bc4c067b7f15b27ae..9845278874991b0c820ae147e7532ac9a41ef1cf 100644
--- a/en/device-dev/kernel/kernel-standard-patch.md
+++ b/en/device-dev/kernel/kernel-standard-patch.md
@@ -1,4 +1,4 @@
-# Applying Patches on Development Boards
+# Applying Patches on Development Boards
1. Apply the HDF patches.
@@ -32,7 +32,7 @@
DEFCONFIG_FILE := $(DEVICE_NAME)_$(BUILD_TYPE)_defconfig
```
- > **NOTICE:**
+ > **NOTICE**
>In the OpenHarmony project build process, patches are applied after the code environment of **kernel/linux/linux-\*.\*** is copied. Before running the OpenHarmony version-level build command, ensure that the source code environment of **kernel/linux/linux-\*.\*** is available.
>After the build is complete, the kernel is generated in the kernel directory in the **out** directory. Modify the **config** file based on the kernel generated, and copy the generated **.config** file to the corresponding path in the **config** repository. Then, the configuration takes effect.
diff --git a/en/device-dev/kernel/kernel-standard.md b/en/device-dev/kernel/kernel-standard.md
index 9f1780d5b146732cfc018c90703a47c72ae05173..7b17c73bbbd6875b71e1fbd55db008660c934dfa 100644
--- a/en/device-dev/kernel/kernel-standard.md
+++ b/en/device-dev/kernel/kernel-standard.md
@@ -1,4 +1,4 @@
-# Kernel for Standard Systems
+# Standard-System Kernel
- **[Linux Kernel Overview](kernel-standard-overview.md)**
@@ -7,4 +7,4 @@
- **[Compiling and Building the Linux Kernel](kernel-standard-build.md)**
-- **[Enhanced Kernel Features] (kernel-standard-enhanced-features.md)**
+- **[Enhanced Kernel Features](kernel-standard-enhanced-features.md)**
diff --git a/en/device-dev/kernel/kernel.md b/en/device-dev/kernel/kernel.md
index f633268641c19f7c3000eadec03834f1c6514d91..d62304607bb9fea5beafce206189e58e03622144 100644
--- a/en/device-dev/kernel/kernel.md
+++ b/en/device-dev/kernel/kernel.md
@@ -1,9 +1,8 @@
-# Kernel
+# Kernel
-- **[Kernel for Mini Systems](kernel-mini.md)**
+- **[Mini-System Kernel](kernel-mini.md)**
-- **[Kernel for Small Systems](kernel-small.md)**
-
-- **[User-Mode Memory Debugging](kernel-small-debug-user.md)**
+- **[Small-System Kernel](kernel-small.md)**
+- **[Standard-System Kernel](kernel-standard.md)**