diff options
| author | Legend <[email protected]> | 2023-07-04 04:03:59 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-07-03 16:03:59 -0400 |
| commit | 7122aba3974540faafec6336c1d14f8dec980291 (patch) | |
| tree | 91e044d07bcc6b8d8f4b0abba788e357f19c00b5 /documentation/thread-sync/thread-sync.md | |
| parent | 2aa4510aa8a6133ec0fc36200899289f434cc768 (diff) | |
[docs] fix a typo in documentation (#7773)
Diffstat (limited to 'documentation/thread-sync/thread-sync.md')
| -rw-r--r-- | documentation/thread-sync/thread-sync.md | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/documentation/thread-sync/thread-sync.md b/documentation/thread-sync/thread-sync.md index c1a832428f..9a6196c22d 100644 --- a/documentation/thread-sync/thread-sync.md +++ b/documentation/thread-sync/thread-sync.md @@ -783,11 +783,11 @@ static void rt_thread_entry2(void *parameter) rt_mutex_take(dynamic_mutex, RT_WAITING_FOREVER); if(number1 != number2) { - rt_kprintf("not protect.number1 = %d, mumber2 = %d \n",number1 ,number2); + rt_kprintf("not protect.number1 = %d, number2 = %d \n",number1 ,number2); } else { - rt_kprintf("mutex protect ,number1 = mumber2 is %d\n",number1); + rt_kprintf("mutex protect ,number1 = number2 is %d\n",number1); } number1++; @@ -842,13 +842,13 @@ Both thread 1 and thread 2 use mutexes to protect the operation on the 2 numbers / | \ 3.1.0 build Aug 24 2018 2006 - 2018 Copyright by rt-thread team msh >mutex_sample -msh >mutex protect ,number1 = mumber2 is 1 -mutex protect ,number1 = mumber2 is 2 -mutex protect ,number1 = mumber2 is 3 -mutex protect ,number1 = mumber2 is 4 +msh >mutex protect ,number1 = number2 is 1 +mutex protect ,number1 = number2 is 2 +mutex protect ,number1 = number2 is 3 +mutex protect ,number1 = number2 is 4 … -mutex protect ,number1 = mumber2 is 48 -mutex protect ,number1 = mumber2 is 49 +mutex protect ,number1 = number2 is 48 +mutex protect ,number1 = number2 is 49 ``` Threads use mutexes to protect the operation on the two numbers, keeping the number values consistent. |
