Hello,
On Mon, Mar 04, 2013 at 11:02:37AM +0800, Li Zefan wrote:
> > Yeah, that's what I meant by the "anal" part although it seems like
> > c99 doesn't even allow that. Do we care tho? It seems like a logical
> > feature which should show up in the standard eventually. Maybe it
> > could be a pro
On 2013/3/2 4:45, Tejun Heo wrote:
> Hello, Al.
>
> On Fri, Mar 1, 2013 at 12:39 PM, Al Viro wrote:
Flexible array members can be statically initialized. If you wanna be
really anal about it, you can do it manually with a wrapping struct
but I don't think that would be necessary.
>
Hello, Al.
On Fri, Mar 1, 2013 at 12:39 PM, Al Viro wrote:
>> > Flexible array members can be statically initialized. If you wanna be
>> > really anal about it, you can do it manually with a wrapping struct
>> > but I don't think that would be necessary.
>> >
>>
>> I didn't know this difference b
On Fri, Mar 01, 2013 at 02:36:29PM +0800, Li Zefan wrote:
> On 2013/2/28 22:49, Tejun Heo wrote:
> > On Wed, Feb 27, 2013 at 10:53 PM, Li Zefan wrote:
> >>> static const struct cgroup_name root_cgroup_name = { .name = "/" };
> >>
> >> Can't... That's char name[0] not char *name.
> >
> > Flexible
On 2013/2/28 22:49, Tejun Heo wrote:
> On Wed, Feb 27, 2013 at 10:53 PM, Li Zefan wrote:
>>> static const struct cgroup_name root_cgroup_name = { .name = "/" };
>>
>> Can't... That's char name[0] not char *name.
>
> Flexible array members can be statically initialized. If you wanna be
> really an
On Wed, Feb 27, 2013 at 10:53 PM, Li Zefan wrote:
>> static const struct cgroup_name root_cgroup_name = { .name = "/" };
>
> Can't... That's char name[0] not char *name.
Flexible array members can be statically initialized. If you wanna be
really anal about it, you can do it manually with a wrapp
On 2013/2/27 21:23, Tejun Heo wrote:
> On Wed, Feb 27, 2013 at 2:49 AM, Li Zefan wrote:
>> Well, cgrp->name is a pointer to struct cgroup_name.
>>
>> At first I tried to declare cgrp->name as char *, and use container_of()
>> to get struct cgroup_name, but it didn't result in simpler code.
>
> Hm
On Wed, Feb 27, 2013 at 2:49 AM, Li Zefan wrote:
> Well, cgrp->name is a pointer to struct cgroup_name.
>
> At first I tried to declare cgrp->name as char *, and use container_of()
> to get struct cgroup_name, but it didn't result in simpler code.
Hmmm? But then what prevents defining const stru
On 2013/2/26 21:26, Tejun Heo wrote:
> Hello,
>
> On Tue, Feb 26, 2013 at 2:25 AM, Li Zefan wrote:
>> Sure we can. We'll have to allocate cgrp->name in cgroup_remount() and
>> cgroup_init(), and free cgrp->name in cgroup_kill_sb(). It looks to me
>> the current version is a bit simpler.
>
> Can'
Hello,
On Tue, Feb 26, 2013 at 2:25 AM, Li Zefan wrote:
> Sure we can. We'll have to allocate cgrp->name in cgroup_remount() and
> cgroup_init(), and free cgrp->name in cgroup_kill_sb(). It looks to me
> the current version is a bit simpler.
Can't we just set it to constant "/"? Root cgroup ini
On 2013/2/26 10:27, Tejun Heo wrote:
> On Mon, Feb 25, 2013 at 02:17:49PM +0800, Li Zefan wrote:
>> cgroup_name() returns the name of a cgroup and it must be called with
>> rcu_read_lock() held.
>>
>> This will be used by cpuset.
>>
>> Signed-off-by: Li Zefan
> ...
>> /**
>> + * cgroup_name - get
On Mon, Feb 25, 2013 at 02:17:49PM +0800, Li Zefan wrote:
> cgroup_name() returns the name of a cgroup and it must be called with
> rcu_read_lock() held.
>
> This will be used by cpuset.
>
> Signed-off-by: Li Zefan
...
> /**
> + * cgroup_name - get the name of a cgroup
> + * @cgrp: the cgroup i
12 matches
Mail list logo