Use uint8_t instead of unsigned char.
Add function comments in the header.
Don't define __CTX_NORETURN outside of ctx.h.