[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] xen/evtchn: rearrange fields
>>> On 24.03.14 at 15:10, <dgdegra@xxxxxxxxxxxxx> wrote: > --- a/xen/include/xen/sched.h > +++ b/xen/include/xen/sched.h > @@ -78,7 +78,8 @@ struct evtchn > #define ECS_VIRQ 5 /* Channel is bound to a virtual IRQ line. > */ > #define ECS_IPI 6 /* Channel is bound to a virtual IPI line. > */ > u8 state; /* ECS_* */ > - u8 xen_consumer; /* Consumer in Xen, if any? (0 = send to guest) */ > + u8 xen_consumer:7; /* Consumer in Xen, if any? (0 = send to guest) */ > + u8 pending:1; While the change is fine this way from a high level perspective, I'd really like this to be connected up properly: #define the number of bits you need here (3 or 4), and use it both here and in the definition of xen_consumers[] (which then would become an array of either 7 or 15 elements, depending on the number of bits you pick). That way there's going to be a single place controlling all aspects, and hence a single place needing change (and attention) when eventually needing to grow the count of Xen consumers. Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |