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