[Vm-dev] [Vm-team] New VM builds to support Squeak 4.1 release
(was: [squeak-dev] 4.1 release tasks)
David T. Lewis
lewis at mail.msen.com
Sun Mar 28 19:09:00 UTC 2010
Oops, I forgot to attach the updated sq.h file. Here it is.
Dave
On Sun, Mar 28, 2010 at 02:33:47PM -0400, David T. Lewis wrote:
> On Fri Mar 19 07:13:18 UTC 2010, John M McIntosh wrote:
> >
> > On 2010-03-18, at 6:20 PM, David T. Lewis wrote:
> > >
> > > - Merge and adopt John's 64-bit and iPhone changes (John, need guidance
> > > as to specific things we need to include for 4.1).
> >
> > http://lists.squeakfoundation.org/pipermail/vm-dev/2010-January/003614.html
> >
> > > - Updates to support John's microsecond timer changes for profiling.
> >
> > http://bugs.squeak.org/view.php?id=7458
>
> John, I have added your microsecond clock changes (Mantis 7458) to VMMaker
> on SqueakSource, and also added #primitiveUtdWithOffset as per earlier
> thread on vm-dev.
>
> Can you please follow up with the following:
>
> 1) Check in the new sq.h into Subversion (attached, and also on Mantis). This
> is your updated sq.h plus one additional declaration for ioUtcWithOffset().
>
> 2) In your config.h for OS X and iPhone, add the following macro to override
> the default VMMaker definition and point to your actual platform function:
> #define ioMicroSecondClock ioMicroSeconds
>
> 3) Add the implementation for primitiveUtdWithOffset in OS X platform source
> by adding the following macro in your config.h:
> #define ioUtcWithOffset(clock, offset) setMicroSecondsandOffset(clock, offset)
>
> And then implement the function as:
> sqInt ioUtcWithOffset(sqLong *microSeconds, int *offset)
> {
> struct timeval timeval;
> if (gettimeofday(&timeval, NULL) == -1) return -1;
> long long seconds = timeval.tv_sec;
> suseconds_t usec = timeval.tv_usec;
> *microSeconds = seconds * 1000000 + usec;
> *offset = localtime(&seconds)->tm_gmtoff;
> return 0;
> }
>
> Note, the above ioUtcWithOffset is tested only on Linux but should be
> the same for OS X. I don't know if it would work for iPhone. If it does
> not work, just skip step 3 above and #primitiveUtcWithOffset will give
> a primitive failure at runtime.
>
> Thanks,
>
> Dave
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sq.h
Type: text/x-chdr
Size: 17512 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20100328/41935492/sq-0001.h
More information about the Vm-dev
mailing list