On 20/02/2019 11:33, Andrew Haley wrote:
> On 2/20/19 11:28 AM, Andrew Dinn wrote:
>> So, in the next webrev when force() with no args is called on a non-SYNC
>> mode buffer I will ensure it continues to call
>>
>>   force0(fd, mappingAddress(offset), mappingLength(offset))
>>
>> For a SYNC buffer I'll redirect to call
>>
>>   force(0, limit())
> 
> <panic>
> Whoa! If that first argument a file descrpitor? If it is, you do know
> that 0 is a legal fd, right?
> </panic>
No need to panic. That first argument is not a file descriptor. I was
explaining to Alan that I can (and will) implement the force() API
method for SYNC buffers by redirecting to force(int,int).

force(int,int) is a new API method to force a specific subregion of the
buffer. If it needs to do writeback via an fd it pulls that out of the
private MappedByteBuffer field (i.e this.fd) and passes it in the call
to native method force0.

n.b. for the above redirect case the force will be for a SYNC mapped
buffer so an fd will not actually be needed.

regards,


Andrew Dinn
-----------
Senior Principal Software Engineer
Red Hat UK Ltd
Registered in England and Wales under Company Registration No. 03798903
Directors: Michael Cunningham, Michael ("Mike") O'Neill, Eric Shander

Reply via email to