Re: [PATCH 07/11] Introduce portability APIs for creating threads

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

 



On Mon, Nov 08, 2010 at 11:40:00PM +0100, Matthias Bolte wrote:
> 2010/11/8 Daniel P. Berrange <berrange@xxxxxxxxxx>:
> > 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 :|

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]