1.1 --- a/ipc.cc Sun Jan 24 19:29:07 2021 +0100
1.2 +++ b/ipc.cc Mon Feb 01 00:10:21 2021 +0100
1.3 @@ -9,12 +9,10 @@
1.4
1.5 /* Make an L4 representation of the given flexpage. */
1.6
1.7 -static l4_fpage_t ipc_get_fpage(SendFlexpage *send_flexpage)
1.8 +static l4_fpage_t ipc_get_fpage(SendFlexpage *send_flexpage, unsigned long flags)
1.9 {
1.10 // NOTE: To introduce flags properly in the flexpage abstractions.
1.11
1.12 - unsigned long flags = L4_FPAGE_RW;
1.13 -
1.14 return l4_fpage(send_flexpage->base_addr, send_flexpage->order,
1.15 (flags & L4RE_DS_MAP_FLAG_RW) ? L4_FPAGE_RW : L4_FPAGE_RO);
1.16 }
1.17 @@ -30,7 +28,7 @@
1.18 if (!send_flexpage.order)
1.19 return -L4_ERANGE;
1.20
1.21 - region->fpage = ipc_get_fpage(&send_flexpage);
1.22 + region->fpage = ipc_get_fpage(&send_flexpage, flags);
1.23 region->snd_base = hot_spot;
1.24
1.25 return L4_EOK;
1.26 @@ -42,7 +40,9 @@
1.27 {
1.28 SendFlexpage send_flexpage = flexpage->to_unmap();
1.29
1.30 - l4_task_unmap(L4RE_THIS_TASK_CAP, ipc_get_fpage(&send_flexpage), L4_FP_OTHER_SPACES);
1.31 + // NOTE: To introduce flags properly in the flexpage abstractions.
1.32 +
1.33 + l4_task_unmap(L4RE_THIS_TASK_CAP, ipc_get_fpage(&send_flexpage, L4_FPAGE_RW), L4_FP_OTHER_SPACES);
1.34 }
1.35
1.36 // vim: tabstop=4 expandtab shiftwidth=4