1 //===-- Linux implementation of sigfillset --------------------------------===// 2 // 3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4 // See https://llvm.org/LICENSE.txt for license information. 5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6 // 7 //===----------------------------------------------------------------------===// 8 9 #include "src/signal/sigfillset.h" 10 #include "include/errno.h" 11 #include "src/errno/llvmlibc_errno.h" 12 #include "src/signal/linux/signal.h" 13 14 #include "src/__support/common.h" 15 16 namespace __llvm_libc { 17 LLVM_LIBC_ENTRYPOINT(sigfillset)18int LLVM_LIBC_ENTRYPOINT(sigfillset)(sigset_t *set) { 19 if (!set) { 20 llvmlibc_errno = EINVAL; 21 return -1; 22 } 23 auto *sigset = reinterpret_cast<__llvm_libc::Sigset *>(set); 24 *sigset = __llvm_libc::Sigset::fullset(); 25 return 0; 26 } 27 28 } // namespace __llvm_libc 29