picofuse

Modules | Files | Macros | Functions
System Abstractions

The System module provides the runtime foundation used by higher-level Picofuse components. More...

Collaboration diagram for System Abstractions:

Modules

 Synchronization
 The SystemSync module groups the synchronization primitives - mutexes, condition variables, wait groups and atomic values - used to coordinate access to shared state across threads.
 
 Formatting and Output
 This file declares types and functions for formatted output to the system console or to a string buffer.
 
 Random Number Generation
 Generating random numbers, sometimes using hardware to provide better entropy.
 
 Data types and utilities
 Runes and strings (rune.h, string.h), the flag-driven scanner built on them (scanner.h), and the stream I/O they read from (io.h).
 
 Thread and Sleep Operations
 
 Date and Time Operations
 

Files

file  assert.h
 Defines a custom assertion macro.
 
file  halt.h
 Defines the sys_halt function.
 
file  init.h
 System initialization and cleanup hooks.
 
file  panicf.h
 Defines the sys_panicf function for formatted panic messages.
 

Macros

#define sys_assert(condition)
 Asserts that a condition is true. More...
 

Functions

_Noreturn void sys_halt (void)
 Halts the system and never returns. More...
 

Detailed Description

The System module provides the runtime foundation used by higher-level Picofuse components.

It includes cross-platform abstractions for memory, threading, synchronization, timing, event queues, runloops, diagnostics, environment metadata, and process control.

Macro Definition Documentation

◆ sys_assert

#define sys_assert (   condition)
Value:
do { \
if (!(condition)) { \
sys_panicf("[ASSERT] FAIL: %s, file %s, line %d", #condition, __FILE__, \
__LINE__); \
} \
} while (0)

Asserts that a condition is true.

Parameters
conditionThe condition to check.

If the condition is false, it will call panicf with an assertion failure message, including the condition, file name, and line number.

Definition at line 21 of file assert.h.

Function Documentation

◆ sys_halt()

_Noreturn void sys_halt ( void  )

Halts the system and never returns.

This function stops normal program execution using the platform-specific halt mechanism. Callers should treat this as terminal control flow.