lkml.org 
[lkml]   [2007]   [Dec]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 01/16] introduce vcpu struct
Date
On Friday 21 December 2007 00:33:41 Glauber de Oliveira Costa wrote:
> this patch introduces a vcpu struct for lguest. In upcoming patches,
> more and more fields will be moved from the lguest struct to the vcpu

Hi Glommer,

> +static inline struct lguest *lg_of_vcpu(struct lguest_vcpu *vcpu)
> +{
> + return container_of((vcpu - vcpu->vcpu_id), struct lguest, vcpus[0]);
> +}

I think this function is a bad idea: it contains implicit UP assumptions which
aren't obvious to the caller. vcpu->lg should do the same thing, no?

Rusty,


\
 
 \ /
  Last update: 2007-12-26 00:37    [W:0.083 / U:0.120 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site