Re: [PATCH] threads: add virThreadID for debugging use

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

 



On 12/05/2010 11:58 AM, Matthias Bolte wrote:
> 2010/12/4 Eric Blake <eblake@xxxxxxxxxx>:
>> * 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   eblake@xxxxxxxxxx    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

--
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]