[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH for 2.8 3/3] sdl: Modularize
From: |
Fam Zheng |
Subject: |
Re: [Qemu-devel] [PATCH for 2.8 3/3] sdl: Modularize |
Date: |
Tue, 2 Aug 2016 09:28:17 +0800 |
User-agent: |
Mutt/1.6.1 (2016-04-27) |
On Mon, 08/01 12:31, Paolo Bonzini wrote:
> > +
> > +static void sdl_init_fn(void)
> > +{
> > + sdl_register_init_fun(sdl_display_init_do);
> > +}
> > +
> > +sdl_init(sdl_init_fn);
>
> Can you use __attribute__((constructor)) instead of going through the
> burden of defining a new type? The registration function only does a
> single assignment, so it doesn't really have ordering dependencies.
Yeah, it makes sense! Thanks.
Fam