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 "src/__support/macros/config.h" 11 #include "src/errno/libc_errno.h" 12 #include "src/signal/linux/signal_utils.h" 13 14 #include "src/__support/common.h" 15 16 #include <signal.h> 17 18 namespace LIBC_NAMESPACE_DECL { 19 20 LLVM_LIBC_FUNCTION(int, sigemptyset, (sigset_t * set)) { 21 if (!set) { 22 libc_errno = EINVAL; 23 return -1; 24 } 25 *set = empty_set(); 26 return 0; 27 } 28 29 } // namespace LIBC_NAMESPACE_DECL 30