#ifndef _YGGDRASIL_SYS_WAIT_H
#define _YGGDRASIL_SYS_WAIT_H 1

// see headers/sys_wait/mod.rs

#define WEXITSTATUS(c) ((int) ((c) & 0xFF))

// TODO
#define WIFCONTINUED(c) \
    0
// TODO
#define WIFSTOPPED(c) \
    0
// TODO
#define WSTOPSIG(c) \
    0

#define WIFEXITED(c) \
    ((c) < 0x100 && (c) >= 0)

#define WIFSIGNALED(c) \
    ((c) > 0x100)

#define WTERMSIG(c) \
    ((c) - 0x100)

#endif
