1.1 --- a/libexec/include/exec/external_pager.h Mon Mar 06 18:30:22 2023 +0100
1.2 +++ b/libexec/include/exec/external_pager.h Mon Mar 06 19:12:48 2023 +0100
1.3 @@ -23,7 +23,9 @@
1.4
1.5 #include <vector>
1.6
1.7 +#include <exec/elf.h>
1.8 #include <exec/pager.h>
1.9 +#include <exec/segment.h>
1.10 #include <fsserver/notification.h>
1.11 #include <fsserver/resource.h>
1.12
1.13 @@ -38,9 +40,20 @@
1.14 public NotificationSupport, public Resource
1.15 {
1.16 protected:
1.17 - l4_cap_idx_t _task, _mapped_task, _parent, _mapped_parent, _pager, _mapped_pager, _ipc_gate;
1.18 +
1.19 + /* Resources associated with the created process. */
1.20 +
1.21 + l4_cap_idx_t _task = L4_INVALID_CAP, _mapped_task = L4_INVALID_CAP,
1.22 + _parent = L4_INVALID_CAP, _mapped_parent = L4_INVALID_CAP,
1.23 + _pager = L4_INVALID_CAP, _mapped_pager = L4_INVALID_CAP,
1.24 + _ipc_gate = L4_INVALID_CAP;
1.25 std::vector<l4_cap_idx_t> _threads, _mapped_threads;
1.26
1.27 + /* Resources supporting the internal pager. */
1.28 +
1.29 + ExplicitSegment *_rm_stack = NULL;
1.30 + Payload *_rm_payload = NULL;
1.31 +
1.32 public:
1.33 explicit ExternalPager(address_t start = 0, address_t end = 0);
1.34
1.35 @@ -59,6 +72,11 @@
1.36 virtual void set_parent(l4_cap_idx_t cap, l4_cap_idx_t mapped_cap);
1.37 virtual void set_task(l4_cap_idx_t cap, l4_cap_idx_t mapped_cap);
1.38
1.39 + /* Internal pager resource management. */
1.40 +
1.41 + virtual void set_payload(Payload *payload);
1.42 + virtual void set_stack(ExplicitSegment *stack);
1.43 +
1.44 /* Resource methods. */
1.45
1.46 virtual void close();