跳转至

Core System Utilities

System-level utilities for error handling and emergency states. More...

Files

Name
lib/config/ah_no.h
Emergency halt helper used when unrecoverable errors occur.

Functions

Name
void CFBD_AH_NO(void )
Enter an infinite halt state for unrecoverable errors.

Detailed Description

System-level utilities for error handling and emergency states.

These utilities provide critical functionality for managing system state during error conditions and emergency scenarios.

Functions Documentation

function CFBD_AH_NO

static inline void CFBD_AH_NO(
    void 
)

Enter an infinite halt state for unrecoverable errors.

See:

Note: Because the function does not return, callers should ensure any required side-effects (flush logs, disable interrupts, etc.) are performed prior to calling.

Warning: This is a blocking operation that yields control indefinitely. It should only be called when recovery is impossible.

Par: Example

#include "lib/config/ah_no.h"

void critical_init() {
    if (!hardware_initialized) {
        // Could log error here before halt
        CFBD_AH_NO();  // Never returns
    }
}

This function never returns. It is intended to be called from fatal error paths where continuing execution would be unsafe. Callers may optionally perform architecture-specific diagnostic actions (for example writing to a debug console) before invoking this helper.

Common use cases:

  • Null pointer dereference detection
  • Memory allocation failures in critical subsystems
  • Hardware initialization failures
  • Watchdog timer expiration handling
  • Stack corruption detection

Updated on 2026-02-03 at 13:21:55 +0000