[RISCV] Rename a lambda to have plural nouns to reflect that it contains a loop. NFC
[llvm-project.git] / libc / src / signal / linux / sigemptyset.cpp
blobd347477695e6c05ed9598f027f8a08e971c0828d
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 //===----------------------------------------------------------------------===//
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"
14 #include "src/__support/common.h"
16 #include <signal.h>
18 namespace LIBC_NAMESPACE_DECL {
20 LLVM_LIBC_FUNCTION(int, sigemptyset, (sigset_t * set)) {
21 if (!set) {
22 libc_errno = EINVAL;
23 return -1;
25 *set = empty_set();
26 return 0;
29 } // namespace LIBC_NAMESPACE_DECL