1 //===-- Linux implementation of sigemptyset -------------------------------===// 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/sigemptyset.h" 10 #include "include/errno.h" // For E* macros. 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(sigemptyset)18int LLVM_LIBC_ENTRYPOINT(sigemptyset)(sigset_t *set) { 19 if (!set) { 20 llvmlibc_errno = EINVAL; 21 return -1; 22 } 23 *set = __llvm_libc::Sigset::emptySet(); 24 return 0; 25 } 26 27 } // namespace __llvm_libc 28