Stack struct

Stack implementation.

Contents

Public variables

int max_length
Max stack size, or -1 for unlimited.
volatile gint top
Index of the top of the stack.

Variable documentation

int Stack::max_length

Max stack size, or -1 for unlimited.

If the stack has a fixed length, it will be real-time safe. If it has unlimited length, it will not be real-time safe.

volatile gint Stack::top

Index of the top of the stack.

This is an index and not a count. Eg., if there is 1 element, this will be 0.