Kernel: Implement process stopping and continuing

This commit is contained in:
2025-08-31 00:34:52 +03:00
parent 56684e753b
commit 791a541381
6 changed files with 311 additions and 125 deletions

View File

@@ -20,14 +20,17 @@ __BEGIN_DECLS
#define WNOWAIT 0x10
#define WSTOPPED 0x20
#define WEXITSTATUS(status) (((status) >> 8) & 0xFF)
#define WSTOPSIG(status) WEXITSTATUS(status)
#define WTERMSIG(status) ((status) & 0x7F)
#define WIFEXITED(status) (WTERMSIG(status) == 0)
#define WIFSIGNALED(status) (((status) & 0x7F) > 0 && ((status) & 0x7F) < 0x7F)
#define WIFSTOPPED(status) (((status) & 0xFF) == 0x7F)
#define WEXITSTATUS(status) (((status) >> 8) & 0xFF)
#define WSTOPSIG(status) WEXITSTATUS(status)
#define WTERMSIG(status) ((status) & 0x7F)
#define WIFEXITED(status) (WTERMSIG(status) == 0)
#define WIFSIGNALED(status) (((status) & 0x7F) > 0 && ((status) & 0x7F) < 0x7E)
#define WIFSTOPPED(status) (((status) & 0x7F) == 0x7F)
#define WIFCONTINUED(status) (((status) & 0x7F) == 0x7E)
#define __WGENEXITCODE(ret, sig) (((ret) << 8) | (sig))
#define __WGENSTOPCODE(sig) (((sig) << 8) | 0x7F)
#define __WGENCONTCODE() ( 0x7E)
typedef enum
{