lkml.org 
[lkml]   [2011]   [Nov]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] new cgroup controller "fork"
From
On Thu, Nov 3, 2011 at 5:22 PM, Max Kellermann <mk@cm4all.com> wrote:
> +struct cgroup_fork {
> +       struct cgroup_subsys_state css;
> +
> +       /** protect the "remaining" attribute */
> +       spinlock_t lock;
> +
> +       /**
> +        * The remaining number of forks allowed.  -1 is the magic
> +        * value for "unlimited".
> +        */
> +       int remaining;
> +};

Wouldn't an atomic_t also do it?

--
Thanks,
//richard
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2011-11-03 18:35    [W:0.063 / U:2.704 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site