BuildSystem: Move all userpace libraries under the userspace directory
As the number of libraries is increasing, root directory starts to expand. This adds better organization for libraries
This commit is contained in:
45
userspace/libraries/LibC/include/sys/wait.h
Normal file
45
userspace/libraries/LibC/include/sys/wait.h
Normal file
@@ -0,0 +1,45 @@
|
||||
#ifndef _SYS_WAIT_H
|
||||
#define _SYS_WAIT_H 1
|
||||
|
||||
// https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/sys_wait.h.html
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
#define __need_id_t
|
||||
#define __need_pid_t
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <signal.h>
|
||||
|
||||
#define WCONTINUED 0x01
|
||||
#define WNOHANG 0x02
|
||||
#define WUNTRACED 0x04
|
||||
#define WEXITED 0x08
|
||||
#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 __WGENEXITCODE(ret, sig) (((ret) << 8) | (sig))
|
||||
|
||||
typedef enum
|
||||
{
|
||||
P_ALL,
|
||||
P_PGID,
|
||||
P_PID,
|
||||
} idtype_t;
|
||||
|
||||
pid_t wait(int* stat_loc);
|
||||
int waitid(idtype_t idtype, id_t id, siginfo_t* infop, int options);
|
||||
pid_t waitpid(pid_t pid, int* stat_loc, int options);
|
||||
|
||||
__END_DECLS
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user