On 12/05/2010 11:58 AM, Matthias Bolte wrote: > 2010/12/4 Eric Blake <ebl...@redhat.com>: >> * src/util/threads.h (virThreadID): New prototype. >> * src/util/threads-pthread.c (virThreadID): New function. >> * src/util/threads-win32.c (virThreadID): Likewise. >> * src/libvirt_private.syms (threads.h): Export it. >> * daemon/event.c (virEventInterruptLocked): Use it to avoid >> warning on BSD systems. >> --- > >> + >> +/* These next two functions are for debugging only, since they are not >> + * guaranteed to give unique values for distinct threads on all >> + * architectures. */ >> int virThreadSelfID(void); >> +int virThreadID(virThreadPtr thread); >> > > This solve the problem, but it should also be noted that > virThreadSelfID and virThreadID cannot be used for comparison as they > are not taken from the same source. > > ACK.
Thanks for the review; I'm updating the comment to this, then pushing: /* These next two functions are for debugging only, since they are not * guaranteed to give unique values for distinct threads on all * architectures, nor are the two functions guaranteed to give the same * value for the same thread. */ -- Eric Blake ebl...@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
-- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list