Real-Time Embedded Multithreading Using ThreadX and MIPS- P22

Real-Time Embedded Multithreading Using ThreadX and MIPS- P22: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. | H-28 Appendix H Input Parameter thread_ptr Pointer to an application Thread Control Block. Return Values TX_SUCCESS10 0x00 Successful suspension of thread. TX_THREAD_ERROR 0x0E Invalid application thread pointer. TX_SUSPEND_ERROR9 0x14 Specified thread is in a terminated or completed state. TX_CALLER_ERROR 0x13 Invalid caller of this service. Allowed From Threads and timers Preemption Possible Yes Example TX_THREAD my_thread UINT status Suspend the thread represented by my_thread . status tx_thread_suspend my_thread If status equals TX_SUCCESS the application thread is unconditionally suspended. tx_thread_terminate Terminates an application thread Prototype UINT tx_thread_terminate TX_THREAD thread_ptr 10This value is not affected by the TX_DISABLE_ERROR_CHECKING define that is used to disable API error checking. Ple se purchase PDF on to remove this watermark. Thread Services H-29 Description This service terminates the specified application thread regardless of whether or not the thread is suspended. A thread may call this service to terminate itself. This service modifies the Thread Control Block through the parameter thread_ptr. NOTE Once terminated the thread must be deleted and re-created in order for it to execute again. Input Parameter thread_ptr Pointer to a previously created application thread s Control Block. Return Values TX_SUCCESS11 0X00 Successful thread termination. TX_THREAD_ERROR 0X0E Invalid application thread pointer. TX_CALLER_ERROR 0x13 Invalid caller of this service. Allowed From Threads and timers Preemption Possible Yes Example TX_THREAD my_thread UINT status Terminate the thread represented by my_thread . status tx_thread_terminate my_thread 11This value is not affected by the TX_DISABLE_ERROR_CHECKING define that is used to disable API error checking. Please purchase PDF Split-Merge on o H-30 Appendix H If status equals TX_SUCCESS the thread is terminated and cannot execute

Không thể tạo bản xem trước, hãy bấm tải xuống
TÀI LIỆU MỚI ĐĂNG
Đã 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.