Path: blob/main/contrib/llvm-project/libc/include/llvm-libc-macros/linux/sys-wait-macros.h
213799 views
//===-- Definition of macros from sys/wait.h ------------------------------===//1//2// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.3// See https://llvm.org/LICENSE.txt for license information.4// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception5//6//===----------------------------------------------------------------------===//78#ifndef LLVM_LIBC_MACROS_LINUX_SYS_WAIT_MACROS_H9#define LLVM_LIBC_MACROS_LINUX_SYS_WAIT_MACROS_H1011#include <linux/wait.h>1213#define WCOREDUMP(status) ((status) & WCOREFLAG)14#define WEXITSTATUS(status) (((status) & 0xff00) >> 8)15#define WIFCONTINUED(status) ((status) == 0xffff)16#define WIFEXITED(status) (WTERMSIG(status) == 0)17#define WIFSIGNALED(status) ((WTERMSIG(status) + 1) >= 2)18#define WIFSTOPPED(status) (WTERMSIG(status) == 0x7f)19#define WSTOPSIG(status) WEXITSTATUS(status)20#define WTERMSIG(status) ((status) & 0x7f)2122#define WCOREFLAG 0x8023#define W_EXITCODE(ret, sig) ((ret) << 8 | (sig))24#define W_STOPCODE(sig) ((sig) << 8 | 0x7f)2526#endif // LLVM_LIBC_MACROS_LINUX_SYS_WAIT_MACROS_H272829