ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
Loading...
Searching...
No Matches
ra8_wdt_sup_tx_shim_internal.h
Go to the documentation of this file.
1
20
21#pragma once
22
23#ifdef __cplusplus
24extern "C" {
25#endif
26
27#include <stdint.h>
28
29#include "ra8_attributes.h"
30
31/* Preserve ThreadX source spellings while keeping host-only implementations
32 * honestly file-local under the repository's private naming contract.
33 *
34 * These ten names ARE the vendor API spelling; the supervisor source calls
35 * them because the real tx_api.h defines them, so there is no alternative
36 * name to rename them to. Same reasoning as the five type aliases below. */
37// NOLINTBEGIN(readability-identifier-naming) -- external ABI or interposition seam fixes these symbol spellings.
39#define tx_mutex_create internal_tx_mutex_create
41#define tx_mutex_get internal_tx_mutex_get
43#define tx_mutex_put internal_tx_mutex_put
45#define tx_mutex_delete internal_tx_mutex_delete
47#define tx_thread_create internal_tx_thread_create
49#define tx_thread_terminate internal_tx_thread_terminate
51#define tx_thread_delete internal_tx_thread_delete
53#define tx_thread_sleep internal_tx_thread_sleep
55#define tx_time_get internal_tx_time_get
56// NOLINTEND(readability-identifier-naming)
57
58/* The five ThreadX type aliases (ULONG, UINT, CHAR, TX_MUTEX, TX_THREAD)
59 * intentionally violate the project's lower_case typedef rule because
60 * they MUST mirror the real ThreadX ``tx_api.h`` spelling: this header
61 * stands in for the vendor header on the host build, and the supervisor
62 * source uses the upper-case names the vendor API mandates. */
63
68typedef unsigned long ULONG; /* NOLINT(readability-identifier-naming) -- ThreadX name. */
69
74typedef unsigned int UINT; /* NOLINT(readability-identifier-naming) -- ThreadX name. */
75
80typedef char CHAR; /* NOLINT(readability-identifier-naming) -- ThreadX name. */
81
83#define TX_SUCCESS (0U)
85#define TX_NO_INHERIT (0U)
87#define TX_WAIT_FOREVER (0xFFFFFFFFUL)
89#define TX_AUTO_START (1U)
91#define TX_NO_TIME_SLICE (0U)
92
110
115typedef struct {
116 uint32_t magic;
117} TX_MUTEX; /* NOLINT(readability-identifier-naming) -- ThreadX name. */
118
123typedef struct {
124 uint32_t magic;
125} TX_THREAD; /* NOLINT(readability-identifier-naming) -- ThreadX name. */
126
127/* NOLINTBEGIN(readability-non-const-parameter) -- ThreadX pins CHAR* name non-const. */
145{
146 (void)name;
147 (void)inherit;
148 if (m != ((void*)0)) {
150 }
151 return TX_SUCCESS;
152}
153/* NOLINTEND(readability-non-const-parameter) */
154
171{
172 (void)m;
173 (void)wait;
174 return TX_SUCCESS;
175}
176
192{
193 (void)m;
194 return TX_SUCCESS;
195}
196
212{
213 (void)m;
214 return TX_SUCCESS;
215}
216
217/* NOLINTBEGIN(readability-non-const-parameter) -- ThreadX pins CHAR* name non-const. */
242 CHAR* name,
243 void (*entry)(ULONG),
244 ULONG arg,
245 void* stack,
246 ULONG stack_size,
247 UINT prio,
248 UINT preempt_thresh,
249 UINT slice,
250 UINT autostart)
251{
252 (void)name;
253 (void)entry;
254 (void)arg;
255 (void)stack;
256 (void)stack_size;
257 (void)prio;
258 (void)preempt_thresh;
259 (void)slice;
260 (void)autostart;
261 if (t != ((void*)0)) {
263 }
264 return TX_SUCCESS;
265}
266/* NOLINTEND(readability-non-const-parameter) */
267
283{
284 (void)t;
285 return TX_SUCCESS;
286}
287
303{
304 (void)t;
305 return TX_SUCCESS;
306}
307
323{
324 (void)ticks;
325 return TX_SUCCESS;
326}
327
342{
343 return 0UL;
344}
345
346#ifdef __cplusplus
347}
348#endif
Annotation-attribute framework macros for ra8-firmware.
#define RA8_INTERNAL
Marker that a function is intended to be static (file-local).
static UINT internal_tx_mutex_create(TX_MUTEX *m, CHAR *name, UINT inherit)
Host stub for tx_mutex_create.
static UINT internal_tx_thread_terminate(TX_THREAD *t)
Host stub for tx_thread_terminate.
unsigned int UINT
ThreadX-compatible unsigned int (host stub).
#define TX_SUCCESS
ra8_wdt_sup_tx_shim_canary_t
Canary patterns stamped into host-stub TX_MUTEX / TX_THREAD blocks.
@ 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.
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_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 UINT internal_tx_mutex_get(TX_MUTEX *m, ULONG wait)
Host stub for tx_mutex_get.
char CHAR
ThreadX-compatible CHAR (host stub).
unsigned long ULONG
ThreadX-compatible unsigned long (host stub).
static ULONG internal_tx_time_get(void)
Host stub for tx_time_get.
Opaque mutex stand-in for the host build.
uint32_t magic
Sentinel for "created".
Opaque thread stand-in for the host build.
uint32_t magic
Sentinel for "created".