[Ace-users] Re: [ace-bugs] UUID_Generator
Wim van den Boogaard (VARIAN)
wim.van.den.boogaard at varianinc.com
Sat Sep 1 13:17:48 CDT 2007
Hello Doug,
Hereby I sent you the source files, see attachments.
Maybe it is better to rename the method get_timestamp to
get_timestampAndClocksequence.
Kind regards,
Wim van den Boogaard
> Hi Wim,
>
> Thanks for using the PRF.
>
>
>> ACE VERSION: 5.5.8 / 10
>>
>> HOST MACHINE and OPERATING SYSTEM:
>> WinXP
>>
>> TARGET MACHINE and OPERATING SYSTEM, if different from HOST:
>> COMPILER NAME AND VERSION (AND PATCHLEVEL):
>>
>> THE $ACE_ROOT/ace/config.h FILE [if you use a link to a platform-
>> specific file, simply state which one]:
>> config-win32.h
>>
>>
>> THE $ACE_ROOT/include/makeinclude/platform_macros.GNU FILE [if you
>> use a link to a platform-specific file, simply state which one
>> (unless this isn't used in this case, e.g., with Microsoft Visual
>> C++)]:
>>
>> CONTENTS OF $ACE_ROOT/bin/MakeProjectCreator/config/default.features
>> (used by MPC when you generate your own makefiles):
>> ---
>>
>> AREA/CLASS/EXAMPLE AFFECTED:
>>
>> DOES THE PROBLEM AFFECT:
>> COMPILATION?
>> LINKING
>> EXECUTION
>>
>> OTHER (please specify)?
>>
>> SYNOPSIS:
>> Double UUID generated in a multi threaded application.
>>
>> DESCRIPTION:
>> The method UUID_Generator::generateUUID is not thread safe in
>> respect to the combination uuid_state_.clockSequence
>> and timestamp.
>> The combination timestamp and clockSequence should be accessed
>> in a thread safe manner. The method
>> UUID_Generator::get_timestamp returns the timestamp thread safe,
>> but also modifies the uuid_state_.clockSequence.
>> The uuid_state_.clockSequence is accessed thread safe in
>> UUID_Generator::generateUUID, but could have been modified
>> between the moment get_timestamp is being done and the moment it
>> is being used.
>>
>> REPEAT BY:
>>
>> SAMPLE FIX/WORKAROUND:
>> Return the timestamp and clockSequence in a atomic manner via
>> the get_timestamp method. I added an other argument
>> to the get_timestamp.
>> void get_timestamp(UUID_time& timestamp, ACE_UINT16& clockSequence);
>>
>> Return the actual clockSequence in the get_timestamp method.
>>
>
> Could you please send the code that implements this and we'll add it to ACE!
>
> Thanks,
>
> Doug
>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: UUID.cpp
Type: text/x-c++src
Size: 16103 bytes
Desc: not available
Url : http://list.isis.vanderbilt.edu/pipermail/ace-users/attachments/20070901/13bf9175/UUID.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: UUID.h
Type: text/x-chdr
Size: 6116 bytes
Desc: not available
Url : http://list.isis.vanderbilt.edu/pipermail/ace-users/attachments/20070901/13bf9175/UUID-0001.bin
More information about the Ace-users
mailing list