HARD: Mynewt FCB media results and SPIFFS append truncate space (batch 28 47298b7, after a top-up); TinyUSB CH34x control completion, TLV320 output gain encoding and ArduinoJSON decimal carry (batch 26 f20f11c); NetX Duo PPP buffered burst (batch 28 7f01d64). MEDIUM: RT-Thread ringbuffer DMA peek (batch 28 7f01d64). Task digests match the measured ones. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
23 lines
1.4 KiB
C
23 lines
1.4 KiB
C
#ifndef PREFLIGHT_RTTHREAD_H
|
|
#define PREFLIGHT_RTTHREAD_H
|
|
#include <rtdef.h>
|
|
struct rt_completion { int done; };
|
|
struct rt_spinlock { int held; };
|
|
struct rt_device;
|
|
typedef struct rt_device *rt_device_t;
|
|
void *rt_thread_self(void);
|
|
rt_device_t rt_console_get_device(void);
|
|
struct rt_device_notify { void (*notify)(struct rt_device *); struct rt_device *dev; };
|
|
struct rt_device { unsigned int open_flag; unsigned int flag; unsigned int ref_count; int type; void *user_data; rt_err_t (*rx_indicate)(rt_device_t, rt_size_t); rt_err_t (*tx_complete)(rt_device_t, void *); void *init; void *open; void *close; void *read; void *write; void *control; };
|
|
static inline rt_base_t rt_spin_lock_irqsave(struct rt_spinlock *s) { (void)s; return 0; }
|
|
static inline void rt_spin_unlock_irqrestore(struct rt_spinlock *s, rt_base_t l) { (void)s; (void)l; }
|
|
static inline void rt_spin_lock_init(struct rt_spinlock *s) { (void)s; }
|
|
static inline void rt_completion_done(struct rt_completion *c) { c->done=1; }
|
|
static inline void rt_completion_init(struct rt_completion *c) { c->done=0; }
|
|
static inline int rt_completion_wait(struct rt_completion *c, int t) { (void)c; (void)t; return 0; }
|
|
static inline int rt_atomic_load(rt_atomic_t *p) { return *p; }
|
|
static inline void rt_atomic_store(rt_atomic_t *p,int v) { *p=v; }
|
|
static inline int rt_atomic_flag_test_and_set(rt_atomic_t *p) { int v=*p; *p=1; return v; }
|
|
static inline void rt_atomic_flag_clear(rt_atomic_t *p) { *p=0; }
|
|
#endif
|