(10) (M) RFR: 8174231: Factor out and share PlatformEvent and Parker code for POSIX systems

Robbin Ehn robbin.ehn at oracle.com
Mon May 22 08:47:05 UTC 2017


Hi David,

On 05/20/2017 03:07 PM, David Holmes wrote:
> Okay I see. Took me a few read throughs to get the gist of it - and it helps to read from the bottom functions up :)

Great! Yes, C-style with static functions tends to end up that way, since you don't want a lot of forward declarations.

> Not sure why you are returning a value from the functions though ??

I skipped (re-)moving an assert on the max_secs value,
1660   assert(abstime->tv_sec <= max_secs, "tv_sec > max_secs");
just to make the code the same.
So there are some minors/nits in the patch.

> 
> Let's see what others think. It's somewhat harder to compare against the existing code.

Yes agreed.

/Robbin

> 
> Thanks again.
> David
> 
>> Thanks!
>>
>> /Robbin
>>
>>
>>
>>>
>>> David
>>>
>>>> David
>>>> -----
>>>>
>>>>> I do not see a problem with this, only better readability?
>>>>>
>>>>> /Robbin
>>>>>
>>>>>>
>>>>>> Thanks,
>>>>>> David
>>>>>> -----
>>>>>>
>>>>>>>       struct timespec now;
>>>>>>>       int status = _clock_gettime(CLOCK_MONOTONIC, &now);
>>>>>>>       assert_status(status == 0, status, "clock_gettime");
>>>>>>>       calc_time(abstime, timeout, isAbsolute, now.tv_sec, now.tv_nsec, NANOUNITS);
>>>>>>>    } else {
>>>>>>> #else
>>>>>>>    {
>>>>>>> #endif
>>>>>>>       struct timeval now;
>>>>>>>       int status = gettimeofday(&now, NULL);
>>>>>>>       assert(status == 0, "gettimeofday");
>>>>>>>       calc_time(abstime, timeout, isAbsolute, now.tv_sec, now.tv_usec, MICROUNITS);
>>>>>>>    }
>>>>>>> #endif
>>>>>>>
>>>>>>> Thanks for fixing this!
>>>>>>>
>>>>>>> /Robbin


More information about the hotspot-dev mailing list