Zephyr Project API 4.4.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
sys_refcount Struct Reference

Reference counter. More...

#include <ref.h>

Data Fields

atomic_t value
 Counter value.

Detailed Description

Reference counter.

Saturating reference counter. This is the minimal primitive used to implement Reference counting and is not meant to be used on its own by most code. Unlike a plain atomic_t, it is pinned on overflow and underflow is caught by an assertion, turning a counting bug into a leak rather than a use-after-free.

Field Documentation

◆ value

atomic_t sys_refcount::value

Counter value.


The documentation for this struct was generated from the following file:
  • include/zephyr/sys/ref.h