[Ace-users] Re: [ace-bugs] UUID_Generator
Johnny Willemsen
jwillemsen at remedy.nl
Mon Sep 3 00:40:45 CDT 2007
Hi Wim,
Can you also create a unified diff (diff -u) of the changes, much easier to
review and integrate. Btw, ACE conventions are to use _, not capitals in the
method names.
Johnny
> 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
> >
> >
>
>
More information about the Ace-users
mailing list