|
ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
|
ThreadX shim for ra8_wdt_supervisor (host unit-test build only). More...
Go to the source code of this file.
Data Structures | |
| struct | TX_MUTEX |
| Opaque mutex stand-in for the host build. More... | |
| struct | TX_THREAD |
| Opaque thread stand-in for the host build. More... | |
Macros | |
| #define | tx_mutex_create internal_tx_mutex_create |
| #define | tx_mutex_get internal_tx_mutex_get |
| #define | tx_mutex_put internal_tx_mutex_put |
| #define | tx_mutex_delete internal_tx_mutex_delete |
| #define | tx_thread_create internal_tx_thread_create |
| #define | tx_thread_terminate internal_tx_thread_terminate |
| #define | tx_thread_delete internal_tx_thread_delete |
| #define | tx_thread_sleep internal_tx_thread_sleep |
| #define | tx_time_get internal_tx_time_get |
| #define | TX_SUCCESS (0U) |
| #define | TX_NO_INHERIT (0U) |
| #define | TX_WAIT_FOREVER (0xFFFFFFFFUL) |
| #define | TX_AUTO_START (1U) |
| #define | TX_NO_TIME_SLICE (0U) |
Typedefs | |
| typedef unsigned long | ULONG |
| ThreadX-compatible unsigned long (host stub). | |
| typedef unsigned int | UINT |
| ThreadX-compatible unsigned int (host stub). | |
| typedef char | CHAR |
| ThreadX-compatible CHAR (host stub). | |
Enumerations | |
| enum | ra8_wdt_sup_tx_shim_canary_t : uint32_t { k_ra8_wdt_sup_tx_shim_mutex_canary = 0xA5A5A5A5U , k_ra8_wdt_sup_tx_shim_thread_canary } |
| Canary patterns stamped into host-stub TX_MUTEX / TX_THREAD blocks. More... | |
Functions | |
| static UINT | internal_tx_mutex_create (TX_MUTEX *m, CHAR *name, UINT inherit) |
| Host stub for tx_mutex_create. | |
| static UINT | internal_tx_mutex_get (TX_MUTEX *m, ULONG wait) |
| Host stub for tx_mutex_get. | |
| static UINT | internal_tx_mutex_put (TX_MUTEX *m) |
| Host stub for tx_mutex_put. | |
| static UINT | internal_tx_mutex_delete (TX_MUTEX *m) |
| Host stub for tx_mutex_delete. | |
| static UINT | internal_tx_thread_create (TX_THREAD *t, CHAR *name, void(*entry)(ULONG), ULONG arg, void *stack, ULONG stack_size, UINT prio, UINT preempt_thresh, UINT slice, UINT autostart) |
| Host stub for tx_thread_create. | |
| static UINT | internal_tx_thread_terminate (TX_THREAD *t) |
| Host stub for tx_thread_terminate. | |
| static UINT | internal_tx_thread_delete (TX_THREAD *t) |
| Host stub for tx_thread_delete. | |
| static UINT | internal_tx_thread_sleep (ULONG ticks) |
| Host stub for tx_thread_sleep. | |
| static ULONG | internal_tx_time_get (void) |
| Host stub for tx_time_get. | |
ThreadX shim for ra8_wdt_supervisor (host unit-test build only).
On the cross-compiled target, the supervisor pulls in the real tx_api.h. On the host unit-test build (RA8_OFF_TARGET) ThreadX is not linked, so this header provides degenerate stand-ins for the handful of TX symbols the supervisor uses. The stubs let the implementation file compile and link unchanged; tests drive the supervisor synchronously through ra8_wdt_supervisor_tick.
Definition in file ra8_wdt_sup_tx_shim_internal.h.
| #define TX_AUTO_START (1U) |
Definition at line 89 of file ra8_wdt_sup_tx_shim_internal.h.
Referenced by demo_worker_spawn_intenb0_watchdog(), internal_h_thread_create(), internal_spawn_rx_worker(), internal_spawn_rx_worker(), ra8_wdt_supervisor_start(), tx_application_define(), tx_application_define(), usb_host_keyboard_device_thread_create(), and wdt_sup_demo_spawn_workers().
| #define tx_mutex_create internal_tx_mutex_create |
Definition at line 39 of file ra8_wdt_sup_tx_shim_internal.h.
Referenced by ble_npl_mutex_init(), internal_h_create_mutex(), nx_ether_driver_c6_bind(), ra8_wdt_supervisor_init(), and tx_application_define().
| #define tx_mutex_delete internal_tx_mutex_delete |
Definition at line 45 of file ra8_wdt_sup_tx_shim_internal.h.
Referenced by internal_h_destroy_mutex(), and ra8_wdt_supervisor_deinit().
| #define tx_mutex_get internal_tx_mutex_get |
Definition at line 41 of file ra8_wdt_sup_tx_shim_internal.h.
Referenced by ble_npl_mutex_pend(), demo_fs_lock_acquire(), internal_h_lock_mutex(), internal_handle_send(), internal_rx_worker_entry(), ra8_wdt_supervisor_checkin(), ra8_wdt_supervisor_register_thread(), and ra8_wdt_supervisor_tick().
| #define tx_mutex_put internal_tx_mutex_put |
Definition at line 43 of file ra8_wdt_sup_tx_shim_internal.h.
Referenced by ble_npl_mutex_release(), demo_fs_lock_release(), internal_h_unlock_mutex(), internal_handle_send(), internal_rx_worker_entry(), ra8_wdt_supervisor_checkin(), ra8_wdt_supervisor_register_thread(), and ra8_wdt_supervisor_tick().
| #define TX_NO_INHERIT (0U) |
Definition at line 85 of file ra8_wdt_sup_tx_shim_internal.h.
Referenced by ble_npl_mutex_init(), ra8_wdt_supervisor_init(), and tx_application_define().
| #define TX_NO_TIME_SLICE (0U) |
Definition at line 91 of file ra8_wdt_sup_tx_shim_internal.h.
Referenced by demo_worker_spawn_intenb0_watchdog(), internal_h_thread_create(), internal_spawn_rx_worker(), internal_spawn_rx_worker(), ra8_wdt_supervisor_start(), tx_application_define(), tx_application_define(), usb_host_keyboard_device_thread_create(), and wdt_sup_demo_spawn_workers().
| #define TX_SUCCESS (0U) |
Definition at line 83 of file ra8_wdt_sup_tx_shim_internal.h.
Referenced by ble_npl_callout_is_active(), ble_npl_callout_reset(), ble_npl_eventq_get(), ble_npl_eventq_is_empty(), ble_npl_mutex_init(), ble_npl_mutex_pend(), ble_npl_mutex_release(), ble_npl_sem_init(), ble_npl_sem_pend(), ble_npl_sem_release(), demo_calloc(), internal_demo_calloc(), internal_h_create_mutex(), internal_h_create_queue(), internal_h_create_semaphore(), internal_h_dequeue_item(), internal_h_destroy_mutex(), internal_h_destroy_queue(), internal_h_destroy_semaphore(), internal_h_get_semaphore(), internal_h_lock_mutex(), internal_h_post_semaphore(), internal_h_post_semaphore_from_isr(), internal_h_queue_item(), internal_h_reset_queue(), internal_h_thread_cancel(), internal_h_thread_create(), internal_h_timer_start(), internal_h_timer_stop(), internal_h_unlock_mutex(), internal_spawn_rx_worker(), internal_spawn_rx_worker(), internal_timer_arm(), internal_timer_disarm(), internal_tx_mutex_create(), internal_tx_mutex_delete(), internal_tx_mutex_get(), internal_tx_mutex_put(), internal_tx_thread_create(), internal_tx_thread_delete(), internal_tx_thread_sleep(), internal_tx_thread_terminate(), internal_wait_completion(), ipc_consumer_thread_entry(), ipc_producer_thread_entry(), nx_ether_driver_c6_bind(), priv_ra8_esp_hosted_rtos_alloc(), priv_ra8_esp_hosted_rtos_pool_deinit(), priv_ra8_esp_hosted_rtos_pool_init(), priv_ra8_esp_hosted_rtos_release(), ra8_wdt_supervisor_checkin(), ra8_wdt_supervisor_init(), ra8_wdt_supervisor_register_thread(), ra8_wdt_supervisor_start(), ra8_wdt_supervisor_tick(), tx_application_define(), and wdt_sup_demo_spawn_workers().
| #define tx_thread_create internal_tx_thread_create |
Definition at line 47 of file ra8_wdt_sup_tx_shim_internal.h.
Referenced by demo_worker_spawn_intenb0_watchdog(), internal_h_thread_create(), internal_spawn_rx_worker(), internal_spawn_rx_worker(), ra8_wdt_supervisor_start(), tx_application_define(), tx_application_define(), usb_host_keyboard_device_thread_create(), and wdt_sup_demo_spawn_workers().
| #define tx_thread_delete internal_tx_thread_delete |
Definition at line 51 of file ra8_wdt_sup_tx_shim_internal.h.
Referenced by internal_h_thread_cancel(), and ra8_wdt_supervisor_deinit().
| #define tx_thread_sleep internal_tx_thread_sleep |
Definition at line 53 of file ra8_wdt_sup_tx_shim_internal.h.
Referenced by blc_device_worker(), ble_npl_time_delay(), c6_cam_http_serve(), c6_fwver_heartbeat(), c6_hosted_heartbeat(), c6_join_heartbeat(), c6_join_wait_connected(), c6_wifi_heartbeat(), cdc_echo_iter(), cdc_host_worker(), demo_echo_iter(), demo_thread_entry(), demo_worker(), demo_worker_echo_loop(), dfu_device_worker(), dfu_host_pass(), dfu_host_worker(), hid_host_worker(), hid_host_worker(), hid_send_iter(), hid_send_iter(), intenb0_watchdog_entry(), internal_c6_cam_wait_connected(), internal_demo_thread_entry(), internal_h_msleep(), internal_heartbeat(), internal_retune_thread_entry(), internal_rx_worker_entry(), internal_rx_worker_entry(), internal_sdcard_thread_entry(), internal_sys_thread_entry(), internal_thread_a_entry(), internal_thread_b_entry(), internal_thread_entry(), internal_thread_entry(), internal_thread_rx_entry(), internal_thread_tx_entry(), internal_ui_thread_entry(), internal_wait_connected(), ipc_producer_thread_entry(), microsd_device_worker(), microsd_host_worker(), mlun_device_worker(), mlun_host_worker(), ns_host_worker(), ospirw_device_worker(), ospirw_host_worker(), priv_net_ping(), ra8_delay_ms(), sdmsc_device_worker(), selftest_device_worker(), selftest_device_worker(), selftest_host_worker(), selftest_host_worker(), ui_thread_entry(), wifi_hal_heartbeat(), wlun_device_worker(), wlun_host_worker(), work_thread_entry(), worker_a_entry(), and worker_b_entry().
| #define tx_thread_terminate internal_tx_thread_terminate |
Definition at line 49 of file ra8_wdt_sup_tx_shim_internal.h.
Referenced by internal_h_thread_cancel(), and ra8_wdt_supervisor_deinit().
| #define tx_time_get internal_tx_time_get |
Definition at line 55 of file ra8_wdt_sup_tx_shim_internal.h.
Referenced by ble_npl_time_get(), internal_default_now(), internal_h_get_time_ms(), priv_ra8_esp_hosted_rtos_init(), and ra8_time_ms().
| #define TX_WAIT_FOREVER (0xFFFFFFFFUL) |
Definition at line 87 of file ra8_wdt_sup_tx_shim_internal.h.
Referenced by cdc_device_worker(), demo_fs_lock_acquire(), demo_worker(), hid_device_worker(), hid_device_worker(), internal_handle_send(), internal_rx_worker_entry(), internal_wait_completion(), ipc_consumer_thread_entry(), ipc_producer_thread_entry(), priv_ra8_esp_hosted_rtos_ms_to_ticks(), ra8_wdt_supervisor_checkin(), ra8_wdt_supervisor_register_thread(), and ra8_wdt_supervisor_tick().
| typedef char CHAR |
ThreadX-compatible CHAR (host stub).
Definition at line 80 of file ra8_wdt_sup_tx_shim_internal.h.
| typedef unsigned int UINT |
ThreadX-compatible unsigned int (host stub).
Definition at line 74 of file ra8_wdt_sup_tx_shim_internal.h.
| typedef unsigned long ULONG |
ThreadX-compatible unsigned long (host stub).
Definition at line 68 of file ra8_wdt_sup_tx_shim_internal.h.
| enum ra8_wdt_sup_tx_shim_canary_t : uint32_t |
Canary patterns stamped into host-stub TX_MUTEX / TX_THREAD blocks.
The host shim does not implement real ThreadX semantics; it only needs a way to mark a control block as "created" so unit tests that introspect the structures can tell the difference. Two distinct canaries are used so a stray pointer pun between mutex and thread is detectable. Per CLAUDE.md no integer literals are allowed in source files – these are named typed enums.
| Enumerator | |
|---|---|
| k_ra8_wdt_sup_tx_shim_mutex_canary | Stamped into TX_MUTEX::magic on create. |
| k_ra8_wdt_sup_tx_shim_thread_canary | Stamped into TX_THREAD::magic on create. |
Definition at line 105 of file ra8_wdt_sup_tx_shim_internal.h.
Host stub for tx_mutex_create.
See implementation.
| [in] | m | See implementation. |
| [in] | name | See implementation. |
| [in] | inherit | See implementation. |
| k_ra8_ok | Operation succeeded. |
Definition at line 144 of file ra8_wdt_sup_tx_shim_internal.h.
References k_ra8_wdt_sup_tx_shim_mutex_canary, TX_MUTEX::magic, RA8_INTERNAL, and TX_SUCCESS.
Host stub for tx_mutex_delete.
See implementation.
| [in] | m | See implementation. |
| k_ra8_ok | Operation succeeded. |
Definition at line 211 of file ra8_wdt_sup_tx_shim_internal.h.
References RA8_INTERNAL, and TX_SUCCESS.
Host stub for tx_mutex_get.
See implementation.
| [in] | m | See implementation. |
| [in] | wait | See implementation. |
| k_ra8_ok | Operation succeeded. |
Definition at line 170 of file ra8_wdt_sup_tx_shim_internal.h.
References RA8_INTERNAL, and TX_SUCCESS.
Host stub for tx_mutex_put.
See implementation.
| [in] | m | See implementation. |
| k_ra8_ok | Operation succeeded. |
Definition at line 191 of file ra8_wdt_sup_tx_shim_internal.h.
References RA8_INTERNAL, and TX_SUCCESS.
|
inlinestatic |
Host stub for tx_thread_create.
See implementation.
| [in] | t | See implementation. |
| [in] | name | See implementation. |
| [in] | entry | See implementation. |
| [in] | arg | See implementation. |
| [in] | stack | See implementation. |
| [in] | stack_size | See implementation. |
| [in] | prio | See implementation. |
| [in] | preempt_thresh | See implementation. |
| [in] | slice | See implementation. |
| [in] | autostart | See implementation. |
| k_ra8_ok | Operation succeeded. |
Definition at line 241 of file ra8_wdt_sup_tx_shim_internal.h.
References k_ra8_wdt_sup_tx_shim_thread_canary, TX_THREAD::magic, RA8_INTERNAL, and TX_SUCCESS.
Host stub for tx_thread_delete.
See implementation.
| [in] | t | See implementation. |
| k_ra8_ok | Operation succeeded. |
Definition at line 302 of file ra8_wdt_sup_tx_shim_internal.h.
References RA8_INTERNAL, and TX_SUCCESS.
Host stub for tx_thread_sleep.
See implementation.
| [in] | ticks | See implementation. |
| k_ra8_ok | Operation succeeded. |
Definition at line 322 of file ra8_wdt_sup_tx_shim_internal.h.
References RA8_INTERNAL, and TX_SUCCESS.
Host stub for tx_thread_terminate.
See implementation.
| [in] | t | See implementation. |
| k_ra8_ok | Operation succeeded. |
Definition at line 282 of file ra8_wdt_sup_tx_shim_internal.h.
References RA8_INTERNAL, and TX_SUCCESS.
|
inlinestatic |
Host stub for tx_time_get.
See implementation.
| k_ra8_ok | Operation succeeded. |
Definition at line 341 of file ra8_wdt_sup_tx_shim_internal.h.
References RA8_INTERNAL.