Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit caaf5eef authored by Glenn Kasten's avatar Glenn Kasten
Browse files

Build libcpustats for host

Test: builds OK; host program that uses this is still WIP
Change-Id: I9427cfadb102ab3379ecc0f9209a4f0660a838cd
parent f37a952f
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -11,3 +11,15 @@ LOCAL_MODULE := libcpustats
LOCAL_CFLAGS := -Werror -Wall

include $(BUILD_STATIC_LIBRARY)

include $(CLEAR_VARS)

LOCAL_SRC_FILES :=     \
        CentralTendencyStatistics.cpp \
        ThreadCpuUsage.cpp

LOCAL_MODULE := libcpustats

LOCAL_CFLAGS := -std=gnu++11 -Werror -Wall

include $(BUILD_HOST_STATIC_LIBRARY)
+5 −0
Original line number Diff line number Diff line
@@ -26,6 +26,11 @@

#include <cpustats/ThreadCpuUsage.h>

// implemented by host, but not declared in <string.h> as FreeBSD does
extern "C" {
    extern size_t strlcpy(char *dst, const char *src, size_t dstsize);
}

namespace android {

bool ThreadCpuUsage::setEnabled(bool isEnabled)