lkml.org 
[lkml]   [2015]   [Apr]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v10 4/4] cgroups: implement the PIDs subsystem
From
Also,

>> +struct pids_cgroup {
>> + struct cgroup_subsys_state css;
>> +
>> + /*
>> + * Use 64-bit types so that we can safely represent "max" as
>> + * (PID_MAX_LIMIT + 1).
> ^^^^^^^^^^^^^^^^^
> ...
>> +static struct cgroup_subsys_state *
>> +pids_css_alloc(struct cgroup_subsys_state *parent)
>> +{
>> + struct pids_cgroup *pids;
>> +
>> + pids = kzalloc(sizeof(struct pids_cgroup), GFP_KERNEL);
>> + if (!pids)
>> + return ERR_PTR(-ENOMEM);
>> +
>> + pids->limit = PIDS_MAX;
> ^^^^^^^^^

%PIDS_MAX = (%PID_MAX_LIMIT + 1). I can clarify this in the comments
if you want.

--
Aleksa Sarai (cyphar)
www.cyphar.com


\
 
 \ /
  Last update: 2015-04-24 17:01    [W:0.146 / U:1.404 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site