* <http://www.gnu.org/licenses/>.
*/
-#ifndef LIBVIRT_VIRCGROUP_H
-# define LIBVIRT_VIRCGROUP_H
+#pragma once
-# include "virutil.h"
-# include "virbitmap.h"
-# include "virenum.h"
+#include "virutil.h"
+#include "virbitmap.h"
+#include "virenum.h"
struct _virCgroup;
typedef struct _virCgroup virCgroup;
int virCgroupHasEmptyTasks(virCgroupPtr cgroup, int controller);
bool virCgroupControllerAvailable(int controller);
-#endif /* LIBVIRT_VIRCGROUP_H */
* <http://www.gnu.org/licenses/>.
*/
-#ifndef LIBVIRT_VIRCGROUPBACKEND_H
-# define LIBVIRT_VIRCGROUPBACKEND_H
+#pragma once
-# include "internal.h"
+#include "internal.h"
-# include "vircgroup.h"
-# include "virhash.h"
+#include "vircgroup.h"
+#include "virhash.h"
-# define CGROUP_MAX_VAL 512
+#define CGROUP_MAX_VAL 512
typedef enum {
VIR_CGROUP_NONE = 0, /* create subdir under each cgroup if possible. */
virCgroupBackendForController(virCgroupPtr group,
unsigned int controller);
-# define VIR_CGROUP_BACKEND_CALL(group, controller, func, ret, ...) \
+#define VIR_CGROUP_BACKEND_CALL(group, controller, func, ret, ...) \
virCgroupBackendPtr backend = virCgroupBackendForController(group, controller); \
if (!backend) { \
virReportError(VIR_ERR_INTERNAL_ERROR, \
return ret; \
} \
return backend->func(group, ##__VA_ARGS__);
-
-#endif /* LIBVIRT_VIRCGROUPBACKEND_H */
* <http://www.gnu.org/licenses/>.
*/
-#ifndef LIBVIRT_VIRCGROUPV1_H
-# define LIBVIRT_VIRCGROUPV1_H
+#pragma once
void
virCgroupV1Register(void);
-
-#endif /* LIBVIRT_VIRCGROUPV1_H */
* <http://www.gnu.org/licenses/>.
*/
-#ifndef LIBVIRT_VIRCGROUPV2_H
-# define LIBVIRT_VIRCGROUPV2_H
+#pragma once
void
virCgroupV2Register(void);
-
-#endif /* LIBVIRT_VIRCGROUPV2_H */