未验证 提交 aa03e6eb 编写于 作者: O openharmony_ci 提交者: Gitee

!8044 [翻译完成】#I5IBQQ

Merge pull request !8044 from Annie_wang/PR6992
...@@ -175,7 +175,7 @@ VOID SendEntry(VOID) ...@@ -175,7 +175,7 @@ VOID SendEntry(VOID)
ret = LOS_QueueWriteCopy(g_queue, abuf, len, 0); ret = LOS_QueueWriteCopy(g_queue, abuf, len, 0);
if(ret != LOS_OK) { if(ret != LOS_OK) {
printf("send message failure, error: %x\n", ret); printf("Failed to send the message, error: %x\n", ret);
} }
} }
...@@ -189,17 +189,17 @@ VOID RecvEntry(VOID) ...@@ -189,17 +189,17 @@ VOID RecvEntry(VOID)
usleep(1000000); usleep(1000000);
ret = LOS_QueueReadCopy(g_queue, readBuf, &readLen, 0); ret = LOS_QueueReadCopy(g_queue, readBuf, &readLen, 0);
if(ret != LOS_OK) { if(ret != LOS_OK) {
printf("recv message failure, error: %x\n", ret); printf("Failed to receive the message, error: %x\n", ret);
} }
printf("recv message: %s\n", readBuf); printf("recv message: %s\n", readBuf);
ret = LOS_QueueDelete(g_queue); ret = LOS_QueueDelete(g_queue);
if(ret != LOS_OK) { if(ret != LOS_OK) {
printf("delete the queue failure, error: %x\n", ret); printf("Failed to delete the queue, error: %x\n", ret);
} }
printf("delete the queue success.\n"); printf("Deleted the queue successfully.\n");
} }
UINT32 ExampleQueue(VOID) UINT32 ExampleQueue(VOID)
...@@ -217,7 +217,7 @@ UINT32 ExampleQueue(VOID) ...@@ -217,7 +217,7 @@ UINT32 ExampleQueue(VOID)
LOS_TaskLock(); LOS_TaskLock();
ret = LOS_TaskCreate(&task1, &initParam); ret = LOS_TaskCreate(&task1, &initParam);
if(ret != LOS_OK) { if(ret != LOS_OK) {
printf("create task1 failed, error: %x\n", ret); printf("Failed to create task1, error: %x\n", ret);
return ret; return ret;
} }
...@@ -226,16 +226,16 @@ UINT32 ExampleQueue(VOID) ...@@ -226,16 +226,16 @@ UINT32 ExampleQueue(VOID)
initParam.usTaskPrio = 10; initParam.usTaskPrio = 10;
ret = LOS_TaskCreate(&task2, &initParam); ret = LOS_TaskCreate(&task2, &initParam);
if(ret != LOS_OK) { if(ret != LOS_OK) {
printf("create task2 failed, error: %x\n", ret); printf("Failed to create task2, error: %x\n", ret);
return ret; return ret;
} }
ret = LOS_QueueCreate("queue", 5, &g_queue, 0, 50); ret = LOS_QueueCreate("queue", 5, &g_queue, 0, 50);
if(ret != LOS_OK) { if(ret != LOS_OK) {
printf("create queue failure, error: %x\n", ret); printf("Failed to create the queue, error: %x\n", ret);
} }
printf("create the queue succes.\n"); printf("Created the queue successfully.\n");
LOS_TaskUnlock(); LOS_TaskUnlock();
return ret; return ret;
} }
......
...@@ -75,7 +75,7 @@ The following table describes the APIs available for signal operations. ...@@ -75,7 +75,7 @@ The following table describes the APIs available for signal operations.
>``` >```
>You can obtain and modify the configuration of signal registration. Currently, only the **SIGINFO** options are supported. For details, see the description of the **sigtimedwait** API. >You can obtain and modify the configuration of signal registration. Currently, only the **SIGINFO** options are supported. For details, see the description of the **sigtimedwait** API.
>Transmit a signal. >Transmit a signal.
>a. Among the default signal-receiving behaviors, the process does not support **STOP**, **COTINUE**, and **COREDUMP** defined in the POSIX standard. >a. Among the default signal-receiving behaviors, the process does not support **STOP**, **CONTINUE**, and **COREDUMP** defined in the POSIX standard.
>b. The **SIGSTOP**, **SIGKILL**, and **SIGCONT** signals cannot be shielded. >b. The **SIGSTOP**, **SIGKILL**, and **SIGCONT** signals cannot be shielded.
>c. If a process killed is not reclaimed by its parent process, the process becomes a zombie process. >c. If a process killed is not reclaimed by its parent process, the process becomes a zombie process.
>d. A process will not call back the signal received until the process is scheduled. >d. A process will not call back the signal received until the process is scheduled.
......
...@@ -45,8 +45,8 @@ The typical development process of adding a system call API is as follows: ...@@ -45,8 +45,8 @@ The typical development process of adding a system call API is as follows:
#define __NR_pthread_set_detach (__NR_OHOS_BEGIN + 0) #define __NR_pthread_set_detach (__NR_OHOS_BEGIN + 0)
#define __NR_pthread_join (__NR_OHOS_BEGIN + 1) #define __NR_pthread_join (__NR_OHOS_BEGIN + 1)
#define __NR_pthread_deatch (__NR_OHOS_BEGIN + 2) #define __NR_pthread_deatch (__NR_OHOS_BEGIN + 2)
#define __NR_creat_user_thread (__NR_OHOS_BEGIN + 3) #define __NR_create_user_thread (__NR_OHOS_BEGIN + 3)
#define __NR_processcreat (__NR_OHOS_BEGIN + 4) #define __NR_processcreate (__NR_OHOS_BEGIN + 4)
#define __NR_processtart (__NR_OHOS_BEGIN + 5) #define __NR_processtart (__NR_OHOS_BEGIN + 5)
#define __NR_printf (__NR_OHOS_BEGIN + 6) #define __NR_printf (__NR_OHOS_BEGIN + 6)
#define __NR_dumpmemory (__NR_OHOS_BEGIN + 13) #define __NR_dumpmemory (__NR_OHOS_BEGIN + 13)
...@@ -91,8 +91,8 @@ The typical development process of adding a system call API is as follows: ...@@ -91,8 +91,8 @@ The typical development process of adding a system call API is as follows:
#define __NR_pthread_set_detach (__NR_OHOS_BEGIN + 0) #define __NR_pthread_set_detach (__NR_OHOS_BEGIN + 0)
#define __NR_pthread_join (__NR_OHOS_BEGIN + 1) #define __NR_pthread_join (__NR_OHOS_BEGIN + 1)
#define __NR_pthread_deatch (__NR_OHOS_BEGIN + 2) #define __NR_pthread_deatch (__NR_OHOS_BEGIN + 2)
#define __NR_creat_user_thread (__NR_OHOS_BEGIN + 3) #define __NR_create_user_thread (__NR_OHOS_BEGIN + 3)
#define __NR_processcreat (__NR_OHOS_BEGIN + 4) #define __NR_processcreate (__NR_OHOS_BEGIN + 4)
#define __NR_processtart (__NR_OHOS_BEGIN + 5) #define __NR_processtart (__NR_OHOS_BEGIN + 5)
#define __NR_printf (__NR_OHOS_BEGIN + 6) #define __NR_printf (__NR_OHOS_BEGIN + 6)
#define __NR_dumpmemory (__NR_OHOS_BEGIN + 13) #define __NR_dumpmemory (__NR_OHOS_BEGIN + 13)
......
...@@ -30,7 +30,7 @@ sem \[_ID__ / fulldata_\] ...@@ -30,7 +30,7 @@ sem \[_ID__ / fulldata_\]
</tr> </tr>
<tr id="row458mcpsimp"><td class="cellrowborder" valign="top" width="21%" headers="mcps1.2.4.1.1 "><p id="p460mcpsimp"><a name="p460mcpsimp"></a><a name="p460mcpsimp"></a>fulldata</p> <tr id="row458mcpsimp"><td class="cellrowborder" valign="top" width="21%" headers="mcps1.2.4.1.1 "><p id="p460mcpsimp"><a name="p460mcpsimp"></a><a name="p460mcpsimp"></a>fulldata</p>
</td> </td>
<td class="cellrowborder" valign="top" width="52%" headers="mcps1.2.4.1.2 "><p id="p462mcpsimp"><a name="p462mcpsimp"></a><a name="p462mcpsimp"></a>Queries information about all the semaphores in use. The information includes <strong id="b189454249533849"><a name="b189454249533849"></a><a name="b189454249533849"></a>SemID</strong>, <strong id="b162724654333849"><a name="b162724654333849"></a><a name="b162724654333849"></a>Count</strong>, <strong id="b111325307233849"><a name="b111325307233849"></a><a name="b111325307233849"></a>OriginalCount</strong>, <strong id="b182850346833849"><a name="b182850346833849"></a><a name="b182850346833849"></a>Creater(TaskEntry)</strong>, and <strong id="b213750533633849"><a name="b213750533633849"></a><a name="b213750533633849"></a>LastAccessTime</strong>.</p> <td class="cellrowborder" valign="top" width="52%" headers="mcps1.2.4.1.2 "><p id="p462mcpsimp"><a name="p462mcpsimp"></a><a name="p462mcpsimp"></a>Queries information about all the semaphores in use. The information includes <strong id="b189454249533849"><a name="b189454249533849"></a><a name="b189454249533849"></a>SemID</strong>, <strong id="b162724654333849"><a name="b162724654333849"></a><a name="b162724654333849"></a>Count</strong>, <strong id="b111325307233849"><a name="b111325307233849"></a><a name="b111325307233849"></a>OriginalCount</strong>, <strong id="b182850346833849"><a name="b182850346833849"></a><a name="b182850346833849"></a>Creator(TaskEntry)</strong>, and <strong id="b213750533633849"><a name="b213750533633849"></a><a name="b213750533633849"></a>LastAccessTime</strong>.</p>
</td> </td>
<td class="cellrowborder" valign="top" width="27%" headers="mcps1.2.4.1.3 "><p id="entry464mcpsimpp0"><a name="entry464mcpsimpp0"></a><a name="entry464mcpsimpp0"></a>N/A</p> <td class="cellrowborder" valign="top" width="27%" headers="mcps1.2.4.1.3 "><p id="entry464mcpsimpp0"><a name="entry464mcpsimpp0"></a><a name="entry464mcpsimpp0"></a>N/A</p>
</td> </td>
...@@ -103,7 +103,7 @@ OHOS # sem ...@@ -103,7 +103,7 @@ OHOS # sem
</tbody> </tbody>
</table> </table>
>![](../public_sys-resources/icon-note.gif) **NOTE:** >![](../public_sys-resources/icon-note.gif) **NOTE**
>The **ID** value can be in decimal or hexadecimal format. >The **ID** value can be in decimal or hexadecimal format.
>When **ID** is a value within \[0, 1023\], semaphore information of the specified ID is displayed. If the specified semaphore is not used, a message is displayed to inform you of this case. For other values, a message is displayed indicating that the parameter is incorrect. >When **ID** is a value within \[0, 1023\], semaphore information of the specified ID is displayed. If the specified semaphore is not used, a message is displayed to inform you of this case. For other values, a message is displayed indicating that the parameter is incorrect.
...@@ -112,7 +112,7 @@ Example 2: detailed semaphore information ...@@ -112,7 +112,7 @@ Example 2: detailed semaphore information
``` ```
OHOS # sem fulldata OHOS # sem fulldata
Used Semaphore List: Used Semaphore List:
SemID Count OriginalCount Creater(TaskEntry) LastAccessTime SemID Count OriginalCount Creator(TaskEntry) LastAccessTime
------ ------ ------------- ------------------ -------------- ------ ------ ------------- ------------------ --------------
0xb 0x0 0x0 0x404978fc 0xa1 0xb 0x0 0x0 0x404978fc 0xa1
0xc 0x0 0x0 0x404978fc 0xa1 0xc 0x0 0x0 0x404978fc 0xa1
...@@ -165,7 +165,7 @@ Used Semaphore List: ...@@ -165,7 +165,7 @@ Used Semaphore List:
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.2.3.1.2 "><p id="p282916401148"><a name="p282916401148"></a><a name="p282916401148"></a>Original count of the semaphore</p> <td class="cellrowborder" valign="top" width="50%" headers="mcps1.2.3.1.2 "><p id="p282916401148"><a name="p282916401148"></a><a name="p282916401148"></a>Original count of the semaphore</p>
</td> </td>
</tr> </tr>
<tr id="row148347401646"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.2.3.1.1 "><p id="p1782914401646"><a name="p1782914401646"></a><a name="p1782914401646"></a>Creater</p> <tr id="row148347401646"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.2.3.1.1 "><p id="p1782914401646"><a name="p1782914401646"></a><a name="p1782914401646"></a>Creator</p>
</td> </td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.2.3.1.2 "><p id="p168298407419"><a name="p168298407419"></a><a name="p168298407419"></a>Address of the entry function of the thread used to create the semaphore</p> <td class="cellrowborder" valign="top" width="50%" headers="mcps1.2.3.1.2 "><p id="p168298407419"><a name="p168298407419"></a><a name="p168298407419"></a>Address of the entry function of the thread used to create the semaphore</p>
</td> </td>
......
...@@ -631,12 +631,12 @@ The following uses the RTL8720 development board provided by Realtek as an examp ...@@ -631,12 +631,12 @@ The following uses the RTL8720 development board provided by Realtek as an examp
# Board arch, e.g. "armv7-a", "rv32imac". # Board arch, e.g. "armv7-a", "rv32imac".
board_arch = "" board_arch = ""
# Toolchain name used for system compiling. # Toolchain name used for system build.
# E.g. gcc-arm-none-eabi, arm-linux-harmonyeabi-gcc, ohos-clang, riscv32-unknown-elf. # E.g. gcc-arm-none-eabi, arm-linux-harmonyeabi-gcc, ohos-clang, riscv32-unknown-elf.
# Note: The default toolchain is "ohos-clang". It's not mandatory if you use the default toochain. # Note: The default toolchain is "ohos-clang". It's not mandatory if you use the default toochain.
board_toolchain = "gcc-arm-none-eabi" board_toolchain = "gcc-arm-none-eabi"
# The toolchain path installed, it's not mandatory if you have added toolchain path to your ~/.bashrc. # Toolchain installation path, which can be left blank if the installation path is added to ~/.bashrc.
board_toolchain_path = board_toolchain_path =
rebase_path("//prebuilts/gcc/linux-x86/arm/gcc-arm-none-eabi/bin", rebase_path("//prebuilts/gcc/linux-x86/arm/gcc-arm-none-eabi/bin",
root_build_dir) root_build_dir)
......
...@@ -777,7 +777,7 @@ After the build is complete, the test cases are automatically saved in **out/his ...@@ -777,7 +777,7 @@ After the build is complete, the test cases are automatically saved in **out/his
Run the following command to execute test cases: Run the following command to execute test cases:
``` ```
run -t UT -ts CalculatorSubTest -tc interger_sub_00l run -t UT -ts CalculatorSubTest -tc integer_sub_00l
``` ```
In the command: In the command:
``` ```
...@@ -819,7 +819,7 @@ To enable test cases to be executed on a remote Linux server or a Linux VM, map ...@@ -819,7 +819,7 @@ To enable test cases to be executed on a remote Linux server or a Linux VM, map
The test framework locates the test cases based on the command, and automatically builds and executes the test cases. The test framework locates the test cases based on the command, and automatically builds and executes the test cases.
``` ```
run -t UT -ts CalculatorSubTest -tc interger_sub_00l run -t UT -ts CalculatorSubTest -tc integer_sub_00l
``` ```
In the command: In the command:
``` ```
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册