Re: [gtk-vnc-devel] [RFC] GThread based coroutines



On Thu, Dec 20, 2007 at 09:00:18PM -0500, Anthony Liguori wrote:
> Daniel P. Berrange wrote:
> >On Thu, Dec 20, 2007 at 05:17:05PM -0500, Anthony Liguori wrote:
> >  
> >>I think the solution to this is to remove the gvnc functions from the 
> >>export and not install the coroutine headers.
> >>    
> >
> >We'd need to make gvnc stuff into a GObject so you can use it frrom
> >the KVM test stuff though, right ?
> >  
> 
> KVM test actually uses vncdisplay.  I wrote KVM test in python so using 
> the struct gvnc interface wasn't a good option.  I'd like to add a 
> GObject interface so that I can switch kvm test over to being headless.
> 
> >>>I observed that the structs required for ucontext vs gthread were more or
> >>>less the same except for the GThread * vs  struct continuation. So I 
> >>>unified
> >>>them into a generic 'void *context'. In the implementation this context 
> >>>points to a GThread * or a 'struct continuation *' as needed. The latter
> >>>means the 'container_of' trick doesn't work, so I simply added 'void 
> >>>*owner'
> >>>to the 'struct continuation'.
> >>> 
> >>>      
> >>Yes, you're on the right track, but I wanted to push the logic into the 
> >>continuation layer.
> >>    
> >
> >Yeah, that might be even simpler, if we just had 2 internal impls of
> >the continuation module
> >
> >
> >I'll let you carry on working against my patch now that the autoconf stuff
> >is done.
> >  
> 
> Attached is my patch incorporating your autoconf changes.  Let me know 
> if you see anything wrong with it before I apply it.

I think the header file differences are small enough that we should
have a single coroutine.h file, and just #ifdef the individual fields
in the struct which are different for gthread vs ucontext. Aside from
that, its good.

Dan.
-- 
|=- Red Hat, Engineering, Emerging Technologies, Boston.  +1 978 392 2496 -=|
|=-           Perl modules: http://search.cpan.org/~danberr/              -=|
|=-               Projects: http://freshmeat.net/~danielpb/               -=|
|=-  GnuPG: 7D3B9505   F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505  -=| 




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]