PatchworkOS
Loading...
Searching...
No Matches
exit_stack.c File Reference
#include "exit_stack.h"
#include <errno.h>
#include <stdint.h>

Go to the source code of this file.

Functions

void _exit_stack_init (void)
 
uint64_t _exit_stack_push (void(*func)(void))
 
void _exit_stack_dispatch (void)
 

Variables

static void(* _stack [_EXIT_STACK_SIZE])(void)
 
static uint64_t _length = 0
 

Function Documentation

◆ _exit_stack_dispatch()

void _exit_stack_dispatch ( void  )

Definition at line 27 of file exit_stack.c.

References _length, and _stack.

Referenced by exit().

◆ _exit_stack_init()

void _exit_stack_init ( void  )

Definition at line 9 of file exit_stack.c.

References _length.

Referenced by _user_init().

◆ _exit_stack_push()

uint64_t _exit_stack_push ( void(*)(void)  func)

Definition at line 14 of file exit_stack.c.

References _EXIT_STACK_SIZE, _length, _stack, and ERR.

Variable Documentation

◆ _length

uint64_t _length = 0
static

Definition at line 7 of file exit_stack.c.

Referenced by _exit_stack_dispatch(), _exit_stack_init(), and _exit_stack_push().

◆ _stack

void(* _stack[_EXIT_STACK_SIZE])(void) ( void  )
static

Definition at line 6 of file exit_stack.c.

Referenced by _exit_stack_dispatch(), and _exit_stack_push().