Linux Kernel
3.7.1
|
#include <linux/cgroup.h>
Go to the source code of this file.
Data Structures | |
struct | res_counter |
Macros | |
#define | RESOURCE_MAX (unsigned long long)LLONG_MAX |
Typedefs | |
typedef int(* | write_strategy_fn )(const char *buf, unsigned long long *val) |
Enumerations | |
enum | { RES_USAGE, RES_MAX_USAGE, RES_LIMIT, RES_FAILCNT, RES_SOFT_LIMIT } |
Definition at line 56 of file res_counter.h.
Definition at line 77 of file res_counter.h.
anonymous enum |
Definition at line 89 of file res_counter.h.
int __must_check res_counter_charge | ( | struct res_counter * | counter, |
unsigned long | val, | ||
struct res_counter ** | limit_fail_at | ||
) |
Definition at line 77 of file res_counter.c.
int __must_check res_counter_charge_locked | ( | struct res_counter * | counter, |
unsigned long | val, | ||
bool | force | ||
) |
Definition at line 25 of file res_counter.c.
int res_counter_charge_nofail | ( | struct res_counter * | counter, |
unsigned long | val, | ||
struct res_counter ** | limit_fail_at | ||
) |
Definition at line 83 of file res_counter.c.
void res_counter_init | ( | struct res_counter * | counter, |
struct res_counter * | parent | ||
) |
Definition at line 17 of file res_counter.c.
Definition at line 174 of file res_counter.c.
ssize_t res_counter_read | ( | struct res_counter * | counter, |
int | member, | ||
const char __user * | buf, | ||
size_t | nbytes, | ||
loff_t * | pos, | ||
int(*)(unsigned long long val, char *s) | read_strategy | ||
) |
u64 res_counter_read_u64 | ( | struct res_counter * | counter, |
int | member | ||
) |
Helpers to interact with userspace res_counter_read_u64() - returns the value of the specified member. res_counter_read/_write - put/get the specified fields from the res_counter struct to/from the user
: the counter in question : the field to work with (see RES_xxx below) : the buffer to opeate on,... : its size... : and the offset.
Definition at line 168 of file res_counter.c.
void res_counter_uncharge | ( | struct res_counter * | counter, |
unsigned long | val | ||
) |
Definition at line 113 of file res_counter.c.
void res_counter_uncharge_locked | ( | struct res_counter * | counter, |
unsigned long | val | ||
) |
Definition at line 89 of file res_counter.c.
void res_counter_uncharge_until | ( | struct res_counter * | counter, |
struct res_counter * | top, | ||
unsigned long | val | ||
) |
Definition at line 97 of file res_counter.c.
int res_counter_write | ( | struct res_counter * | counter, |
int | member, | ||
const char * | buffer, | ||
write_strategy_fn | write_strategy | ||
) |
Definition at line 196 of file res_counter.c.