📨 chic 0.0.0
Realtime-safe channels in C
Loading...
Searching...
No Matches
err.h File Reference

Error enumeration definition. More...

Go to the source code of this file.

Enumerations

enum  chic_err {
  CHIC_OK = 0 , CHIC_ARGS_INVAL , CHIC_CLAIM_ORDER , CHIC_CHAN_UNREAD ,
  CHIC_CHAN_CLOSED , CHIC_CHAN_FULL , CHIC_CHAN_EMPTY
}
 Identifiers for channel states and errors. More...

Functions

const char * chic_strerror (enum chic_err err)
 Get a string describing an error.

Detailed Description

Error enumeration definition.

Author
Fawn rubie.nosp@m.fawn.nosp@m.@prot.nosp@m.on.m.nosp@m.e
Date
2026

Enumeration Type Documentation

◆ chic_err

enum chic_err

Identifiers for channel states and errors.

See also
chic_strerror()
Enumerator
CHIC_OK 

The operation completed successfully.

CHIC_ARGS_INVAL 

The function was called with invalid arguments.

CHIC_CLAIM_ORDER 

The channel had an uncommitted claim sequenced prior that must be committed first.

See also
mpmc_send_nbfini(), mpmc_recv_nbfini(), mpsc_send_nbfini(), spmc_recv_nbfini()
CHIC_CHAN_UNREAD 

The channel has unreceived items.

See also
mpmc_close(), mpsc_close(), spmc_close(), spsc_close()
CHIC_CHAN_CLOSED 

The channel is closed.

This error may occur either when a send operation is attempted on a closed channel, or if a read operation is attempted on a closed channel and there is not enough items remaining in the channel to fulfull that read operation.

CHIC_CHAN_FULL 

The channel's buffer is full and cannot be sent to.

CHIC_CHAN_EMPTY 

The channel's buffer is empty and cannot be received from.

Function Documentation

◆ chic_strerror()

const char * chic_strerror ( enum chic_err err)

Get a string describing an error.

See also
chic_err