1.1 --- a/mapping/flexpage.cc Sun Apr 11 19:34:07 2021 +0200
1.2 +++ b/mapping/flexpage.cc Mon Apr 12 00:12:51 2021 +0200
1.3 @@ -30,7 +30,7 @@
1.4 /* Get the file offset for the base of the flexpage. This will be a
1.5 multiple of the flexpage size for alignment purposes. */
1.6
1.7 - base_offset = trunc(offset, size);
1.8 + base_offset = trunc_offset(offset, size);
1.9
1.10 /* The page being accessed is relative to the base.
1.11 (This is transient information recording the initialising access
1.12 @@ -86,23 +86,23 @@
1.13 /* Return a "send" flexpage for an access to 'offset' by positioning it relative
1.14 to 'hot_spot' for the receive flexpage window. */
1.15
1.16 -SendFlexpage Flexpage::to_send(offset_t offset, offset_t hot_spot,
1.17 +SendFlexpage Flexpage::to_send(offset_t offset, address_t hot_spot,
1.18 flags_t flags, offset_t max_offset)
1.19 {
1.20 /* The dataspace offset of the flexpage base is a multiple of the flexpage
1.21 size. */
1.22
1.23 - offset_t receive_base_offset = trunc(offset, size);
1.24 + offset_t receive_base_offset = trunc_offset(offset, size);
1.25
1.26 /* The offset of the accessed page within the flexpage is constrained by the
1.27 current flexpage size. */
1.28
1.29 - offset_t page_offset = trunc(offset - receive_base_offset, PAGE_SIZE);
1.30 + length_t page_offset = trunc(offset - receive_base_offset, PAGE_SIZE);
1.31
1.32 /* The receive flexpage offset (hot spot) must be constrained to the
1.33 flexpage, both the size and the start. */
1.34
1.35 - offset_t receive_size;
1.36 + length_t receive_size;
1.37
1.38 if (max_offset)
1.39 {
1.40 @@ -115,7 +115,7 @@
1.41 if (!receive_size)
1.42 return SendFlexpage(base_addr, page_order(0), flags);
1.43
1.44 - offset_t receive_page_offset = hot_spot % receive_size;
1.45 + length_t receive_page_offset = hot_spot % receive_size;
1.46
1.47 while ((receive_size > PAGE_SIZE) && (receive_page_offset != page_offset))
1.48 {
1.49 @@ -127,7 +127,7 @@
1.50 offsets. Where the receive flexpage offset is constained further, the
1.51 base address will be raised to become closer to the accessed page. */
1.52
1.53 - offset_t adjustment = page_offset - receive_page_offset;
1.54 + length_t adjustment = page_offset - receive_page_offset;
1.55
1.56 return SendFlexpage(base_addr + adjustment, page_order(receive_size), flags);
1.57 }