[libvirt] [PATCH 07/11] Introduce portability APIs for creating threads
Daniel P. Berrange
berrange at redhat.com
Tue Nov 9 13:53:16 UTC 2010
On Mon, Nov 08, 2010 at 11:40:00PM +0100, Matthias Bolte wrote:
> 2010/11/8 Daniel P. Berrange <berrange at redhat.com>:
> > The util/threads.c/h code already has APIs for mutexes,
> > condition variables and thread locals. This commit adds
> > in code for actually creating threads.
> >
> > * src/libvirt_private.syms: Export new symbols
> > * src/util/threads.h: Define APIs virThreadCreate, virThreadSelf,
> > virThreadIsSelf and virThreadJoin
> > * src/util/threads-win32.c, src/util/threads-win32.h: Win32
> > impl of threads
> > * src/util/threads-pthread.c, src/util/threads-pthread.h: POSIX
> > impl of threads
>
>
> > struct virThreadLocalData {
> > @@ -33,7 +35,7 @@ typedef virThreadLocalData *virThreadLocalDataPtr;
> > virMutex virThreadLocalLock;
> > unsigned int virThreadLocalCount = 0;
> > virThreadLocalDataPtr virThreadLocalList = NULL;
> > -
> > +DWORD selfkey;
> >
> > virThreadLocal virCondEvent;
>
> Not introduced by this patch, but why are this local variables not
> marked as static?
Yes, that's a little odd. They should all be static.
Daniel
--
|: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :|
|: http://libvirt.org -o- http://virt-manager.org -o- http://deltacloud.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|
More information about the libvir-list
mailing list