166d00febSPaula Toth //===-- Linux implementation of sigdelset ---------------------------------===// 2123a5328SAlex Brachet // 3123a5328SAlex Brachet // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4123a5328SAlex Brachet // See https://llvm.org/LICENSE.txt for license information. 5123a5328SAlex Brachet // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6123a5328SAlex Brachet // 7123a5328SAlex Brachet //===----------------------------------------------------------------------===// 8123a5328SAlex Brachet 9123a5328SAlex Brachet #include "src/signal/sigdelset.h" 10f626a350SNick Desaulniers 11f626a350SNick Desaulniers #include "hdr/types/sigset_t.h" 12123a5328SAlex Brachet #include "src/__support/common.h" 13*5ff3ff33SPetr Hosek #include "src/__support/macros/config.h" 147abf6c25SSiva Chandra Reddy #include "src/errno/libc_errno.h" 15215c9fa4SSiva Chandra Reddy #include "src/signal/linux/signal_utils.h" 16215c9fa4SSiva Chandra Reddy 17*5ff3ff33SPetr Hosek namespace LIBC_NAMESPACE_DECL { 18123a5328SAlex Brachet 19a0b65a7bSMichael Jones LLVM_LIBC_FUNCTION(int, sigdelset, (sigset_t * set, int signum)) { 20215c9fa4SSiva Chandra Reddy if (set != nullptr && delete_signal(*set, signum)) 21123a5328SAlex Brachet return 0; 227abf6c25SSiva Chandra Reddy libc_errno = EINVAL; 23215c9fa4SSiva Chandra Reddy return -1; 24123a5328SAlex Brachet } 25123a5328SAlex Brachet 26*5ff3ff33SPetr Hosek } // namespace LIBC_NAMESPACE_DECL 27