Barrelfish
Functions
stack.c File Reference

Barrelfish collections library stack. More...

Functions

void collections_stack_create (struct collections_stack **stack)
 Initialize the stack data structure. More...
 
void * collections_stack_pop (struct collections_stack *stack)
 Returns the top element of the stack and removes it.
 
void collections_stack_push (struct collections_stack *stack, void *element)
 Push an element to the top of the stack.
 
void * collections_stack_top (struct collections_stack *stack)
 Returns the top element of the stack, does not remove it.
 
void collections_stack_release (struct collections_stack *stack)
 Free all memory associated with the stack.
 

Detailed Description

Barrelfish collections library stack.

Function Documentation

void collections_stack_create ( struct collections_stack **  stack)

Initialize the stack data structure.

Parameters
stackPointer to a pointer to a stack. Filled-in by function.

Example usage:

1 struct collections_stack *stack;
2 collections_stack_create(&stack);