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

Commit 99b5c8e2 authored by Maciej Żenczykowski's avatar Maciej Żenczykowski Committed by Automerger Merge Worker
Browse files

Merge "Revert "libprocessgroup: Remove __BEGIN_DECLS and __END_DECLS"" into...

Merge "Revert "libprocessgroup: Remove __BEGIN_DECLS and __END_DECLS"" into main am: 5c14720b am: 0f0df26b

Original change: https://android-review.googlesource.com/c/platform/system/core/+/3366140



Change-Id: I50c90ed016ed1218e74c0d8f24a098909beae46a
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents c27ea1cc 0f0df26b
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@

#pragma once

#include <sys/cdefs.h>
#include <sys/types.h>
#include <initializer_list>
#include <span>
@@ -23,6 +24,8 @@
#include <string_view>
#include <vector>

__BEGIN_DECLS

static constexpr std::string CGROUPV2_HIERARCHY_NAME = "cgroup2";

bool CgroupsAvailable();
@@ -36,6 +39,8 @@ bool SetTaskProfiles(pid_t tid, const std::vector<std::string>& profiles,
bool SetProcessProfiles(uid_t uid, pid_t pid, const std::vector<std::string>& profiles);
bool SetUserProfiles(uid_t uid, const std::vector<std::string>& profiles);

__END_DECLS

bool SetTaskProfiles(pid_t tid, std::initializer_list<std::string_view> profiles,
                     bool use_fd_cache = false);
bool SetProcessProfiles(uid_t uid, pid_t pid, std::initializer_list<std::string_view> profiles);
@@ -45,6 +50,7 @@ bool SetTaskProfiles(pid_t tid, std::span<const std::string_view> profiles,
bool SetProcessProfiles(uid_t uid, pid_t pid, std::span<const std::string_view> profiles);
#endif

__BEGIN_DECLS

#ifndef __ANDROID_VNDK__

@@ -90,3 +96,5 @@ bool getAttributePathForTask(const std::string& attr_name, pid_t tid, std::strin
bool isProfileValidForProcess(const std::string& profile_name, uid_t uid, pid_t pid);

#endif // __ANDROID_VNDK__

__END_DECLS