TAILIEUCHUNG - Real-Time Embedded Multithreading Using ThreadX and MIPS- P12

Real-Time Embedded Multithreading Using ThreadX and MIPS- P12:Although the history of embedded systems is relatively short, 1 the advances and successes of this fi eld have been profound. Embedded systems are found in a vast array of applications such as consumer electronics, “ smart ” devices, communication equipment, automobiles, desktop computers, and medical equipment. | Synchronization of Threads Using Event Flags Groups 223 Activity 2 - Wait for slow_flags in the event flags group set it to speedy_flags and hold it for 5 timer-ticks. status tx_event_flags_get my_event_group slow_flags TX_AND_CLEAR actual_events TX_WAIT_FOREVER if status TX_SUCCESS break Check status. status tx_event_flags_set my_event_group speedy_flags TX_OR if status TX_SUCCESS break Check status. tx_thread_sleep 5 Figure Changes to Activity 2 Activity 4 - Wait for slow_flags in the event flags group set it to speedy_flags and hold it for 3 timer-ticks. status tx_event_flags_get my_event_group slow_flags TX_AND_CLEAR actual_events TX_WAIT_FOREVER if status TX_SUCCESS break Check status. status tx_event_flags_set my_event_group speedy_flags TX_OR if status TX_SUCCESS break Check status. Figure Changes to Activity 4 We arbitrarily set the event flags group to the value slowflags in the preceding statement. The only consequence of this particular initialization is that Speedy_Thread will be the first thread to execute. We could have set the event flags group to the value speedyflags thereby giving Slow_Thread the first opportunity to execute. The remaining changes occur in the function definitions section of our program. We need to change all references to a binary semaphore with references to an event flags group. We will show only the changes for the Speedy_Thread and will leave the Slow_Thread changes as an exercise for the reader. Figure contains the necessary changes for Activity 2. Figure contains the necessary changes for Activity 4. Most of the modifications involve changing binary semaphore calls to event flags group calls. coj i i e nioiv t is w ne r iiai r k Please purchase PDF Split-Merge on . 224 Chapter 12 Listing for The sample system named is located on the attached CD. The complete listing appears below line numbers have been added for easy .

TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.