19#ifndef NEXUS_OS_FREERTOS_H
20#define NEXUS_OS_FREERTOS_H
151 StackType_t* stack,
size_t stack_words,
152 UBaseType_t priority,
void (*entry)(
void*),
195 size_t storage_bytes,
size_t depth,
207 TickType_t wait_ticks);
216 TickType_t wait_ticks);
256 TaskHandle_t receiver, UBaseType_t index);
290 const char* name, StackType_t* stack,
291 size_t stack_words, UBaseType_t priority,
292 void (*entry)(
void*),
void* context);
325 size_t storage_bytes,
size_t depth,
327 size_t maximum_waiters);
nx_result_t nx_freertos_closable_queue_send_until(nx_freertos_closable_queue_t *queue, const void *item, nx_time_us_t deadline, nx_freertos_queue_waiter_t *waiter)
Send with close-aware admission and absolute deadline.
nx_result_t nx_freertos_closable_queue_receive_until(nx_freertos_closable_queue_t *queue, void *item, nx_time_us_t deadline, nx_freertos_queue_waiter_t *waiter)
Receive existing items after close, then CANCELLED.
nx_result_t nx_freertos_closable_queue_init(nx_freertos_closable_queue_t *queue, uint8_t *storage, size_t storage_bytes, size_t depth, size_t item_size, size_t maximum_waiters)
Initialize an optional reliably closable byte-copy queue.
nx_result_t nx_freertos_queue_waiter_init(nx_freertos_queue_waiter_t *waiter)
Initialize one exact caller-owned queue waiter.
nx_result_t nx_freertos_permanent_task_start(nx_freertos_permanent_task_t *task, const char *name, StackType_t *stack, size_t stack_words, UBaseType_t priority, void(*entry)(void *), void *context)
Start a task whose entry must never return.
nx_result_t nx_freertos_notify_destroy(nx_freertos_notify_t *notification)
Destroy after publishers and waiter have stopped and joined.
nx_result_t nx_freertos_queue_receive(nx_freertos_queue_t *queue, void *item, TickType_t wait_ticks)
Receive one byte-copy item.
nx_result_t nx_freertos_task_join(nx_freertos_task_t *task, nx_time_us_t deadline)
Join a cooperatively returned task and reclaim kernel state.
nx_result_t nx_freertos_direct_notify_destroy(nx_freertos_direct_notify_t *notification)
Unbind after all publishers stop and join.
struct nx_freertos_queue_waiter nx_freertos_queue_waiter_t
Caller-owned single-operation latch for a closable queue.
nx_wait_port_t nx_freertos_direct_notify_port(nx_freertos_direct_notify_t *notification)
Get a direct notification wait port.
nx_result_t nx_freertos_notify_init(nx_freertos_notify_t *notification)
Initialize unused notification storage.
nx_result_t nx_freertos_queue_destroy(nx_freertos_queue_t *queue)
Destroy after admission is stopped and all users joined.
nx_result_t nx_freertos_queue_receive_until(nx_freertos_queue_t *queue, void *item, nx_time_us_t deadline)
Receive using one absolute monotonic deadline.
nx_wait_port_t nx_freertos_notify_port(nx_freertos_notify_t *notification)
Bind a latched single-waiter notification.
nx_result_t nx_freertos_direct_notify_init(nx_freertos_direct_notify_t *notification, TaskHandle_t receiver, UBaseType_t index)
Bind an exclusive slot of one live receiver task.
nx_result_t nx_freertos_queue_waiter_destroy(nx_freertos_queue_waiter_t *waiter)
Destroy only after all operations stop and join.
nx_result_t nx_freertos_queue_send_until(nx_freertos_queue_t *queue, const void *item, nx_time_us_t deadline)
Send using one absolute monotonic deadline.
nx_result_t nx_freertos_task_discard_before_scheduler(nx_freertos_task_t *task)
Discard one created task before its wrapper has executed.
nx_result_t nx_freertos_queue_init(nx_freertos_queue_t *queue, uint8_t *storage, size_t storage_bytes, size_t depth, size_t item_size)
Create an exact-sized static byte-copy queue.
nx_result_t nx_freertos_closable_queue_close(nx_freertos_closable_queue_t *queue)
Stop sends and wake every currently registered waiter.
bool nx_freertos_isr_allowed(void)
Test whether the current context may call kernel ISR APIs.
nx_result_t nx_freertos_queue_send(nx_freertos_queue_t *queue, const void *item, TickType_t wait_ticks)
Copy an item with a bounded relative kernel wait.
nx_result_t nx_freertos_closable_queue_destroy(nx_freertos_closable_queue_t *queue)
Destroy a closed, drained and quiesced queue.
nx_result_t nx_freertos_task_start(nx_freertos_task_t *task, const char *name, StackType_t *stack, size_t stack_words, UBaseType_t priority, void(*entry)(void *), void *context)
Create one task from its exact caller-owned stack and TCB.
nx_result_t
Operation result; success at submission means admission only.
Opt-in close broadcasts; raw queue storage remains unchanged.
nx_freertos_queue_waiter_t * send_waiters
nx_freertos_queue_t queue
nx_freertos_queue_waiter_t * receive_waiters
Fixed receiver and exclusive kernel notification slot; no latch.
Static binary latch; one waiter, independently quiesced publishers.
StaticSemaphore_t storage
Permanent task control without a join completion semaphore.
Queue control only; actual depth/item byte storage is external.
Caller-owned single-operation latch for a closable queue.
struct nx_freertos_queue_waiter * next
StaticSemaphore_t storage
Task has its own TCB; stack is supplied with its actual word count.
SemaphoreHandle_t finished
StaticSemaphore_t finished_storage
Single-waiter notification port.
Absolute monotonic microsecond deadlines and wrap extension.
uint64_t nx_time_us_t
Microseconds in one boot/clock domain; no wall-clock semantics.
Optional sequence-latched waiting without hidden workers.