[libc-commits] [libc] [libc] implement getloadavg (PR #221049)

Alexey Samsonov via libc-commits libc-commits at lists.llvm.org
Thu Sep 3 14:57:28 PDT 2026


================
@@ -0,0 +1,25 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+///
+/// \file
+/// Implementation header for getloadavg.
+///
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_LIBC_SRC_STDLIB_GETLOADAVG_H
+#define LLVM_LIBC_SRC_STDLIB_GETLOADAVG_H
+
+#include "src/__support/macros/config.h"
+
+namespace LIBC_NAMESPACE_DECL {
+
+int getloadavg(double *loadavg, int nelem);
----------------
vonosmas wrote:

Same here - can we declare it as `double loadavg[]`?

https://github.com/llvm/llvm-project/pull/221049


More information about the libc-commits mailing list