lkml.org 
[lkml]   [2015]   [May]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v10 1/4] cgroups: use bitmask to filter for_each_subsys
From
Hi Tejun,

> Hmmmm... You can either convert all masks to ulong (which is fine) or
> do something like the following.
>
> #define for_each_subsys_which(ss_mask, ss, ssid) \
> unsigned long __tmp_mask = (ss_mask); \
> for_each_set_bit(ssid, &__tmp_mask, CGROUP_SUBSYS_COUNT)\
> if ((ss) = group_subsys[ssid] && false) \
> ; \
> else

I think I'll just do casting and manually make new variables where
required. The above (and similar) doesn't work very well, generates
warnings like crazy and breaks stuff like:

if (...)
for_each_subsys_which(...)

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


\
 
 \ /
  Last update: 2015-05-13 08:21    [W:0.102 / U:0.796 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site