1.1 --- a/libfsclient/include/fsclient/client.h Wed May 19 00:38:36 2021 +0200 1.2 +++ b/libfsclient/include/fsclient/client.h Thu May 20 00:01:53 2021 +0200 1.3 @@ -57,7 +57,7 @@ 1.4 /* Notification operations. */ 1.5 1.6 long client_set_blocking(file_t *file, int can_block); 1.7 -long client_subscribe(file_t *file, flags_t flags); 1.8 +long client_subscribe(file_t *file, notify_flags_t flags); 1.9 long client_unsubscribe(file_t *file); 1.10 long client_wait(file_t *file); 1.11
2.1 --- a/libfsclient/include/fsclient/file.h Wed May 19 00:38:36 2021 +0200 2.2 +++ b/libfsclient/include/fsclient/file.h Thu May 20 00:01:53 2021 +0200 2.3 @@ -113,7 +113,7 @@ 2.4 2.5 /* Notification functions. */ 2.6 2.7 -long file_notify_subscribe(file_t *file, flags_t flags); 2.8 +long file_notify_subscribe(file_t *file, notify_flags_t flags); 2.9 long file_notify_unsubscribe(file_t *file); 2.10 long file_notify_wait(file_t *file); 2.11
3.1 --- a/libfsclient/lib/src/client.cc Wed May 19 00:38:36 2021 +0200 3.2 +++ b/libfsclient/lib/src/client.cc Thu May 20 00:01:53 2021 +0200 3.3 @@ -424,7 +424,7 @@ 3.4 3.5 /* Subscribe from events concerning a file. */ 3.6 3.7 -long client_subscribe(file_t *file, flags_t flags) 3.8 +long client_subscribe(file_t *file, notify_flags_t flags) 3.9 { 3.10 if (file == NULL) 3.11 return -L4_EINVAL;
4.1 --- a/libfsclient/lib/src/file.cc Wed May 19 00:38:36 2021 +0200 4.2 +++ b/libfsclient/lib/src/file.cc Thu May 20 00:01:53 2021 +0200 4.3 @@ -376,7 +376,7 @@ 4.4 4.5 /* Subscribe to notification events on a file. */ 4.6 4.7 -long file_notify_subscribe(file_t *file, flags_t flags) 4.8 +long file_notify_subscribe(file_t *file, notify_flags_t flags) 4.9 { 4.10 client_Notification notify(file->ref); 4.11
5.1 --- a/libfsserver/include/fsserver/file_pager.h Wed May 19 00:38:36 2021 +0200 5.2 +++ b/libfsserver/include/fsserver/file_pager.h Thu May 20 00:01:53 2021 +0200 5.3 @@ -37,7 +37,7 @@ 5.4 public: 5.5 fileid_t fileid; 5.6 5.7 - explicit FilePager(fileid_t fileid, PageMapper *mapper, flags_t flags, 5.8 + explicit FilePager(fileid_t fileid, PageMapper *mapper, map_flags_t flags, 5.9 FilePaging *paging); 5.10 5.11 virtual void close(); 5.12 @@ -59,7 +59,7 @@ 5.13 5.14 /* Pager and mapped file methods. */ 5.15 5.16 - virtual long map(offset_t offset, address_t hot_spot, flags_t flags, 5.17 + virtual long map(offset_t offset, address_t hot_spot, map_flags_t flags, 5.18 l4_snd_fpage_t *region); 5.19 5.20 virtual long mmap(offset_t position, offset_t length, offset_t *start_pos,
6.1 --- a/libfsserver/include/fsserver/file_paging.h Wed May 19 00:38:36 2021 +0200 6.2 +++ b/libfsserver/include/fsserver/file_paging.h Thu May 20 00:01:53 2021 +0200 6.3 @@ -51,13 +51,13 @@ 6.4 6.5 PageMapper *get_mapper(const char *path, fileid_t fileid); 6.6 6.7 - Pager *get_pager(const char *path, fileid_t fileid, flags_t flags); 6.8 + Pager *get_pager(const char *path, fileid_t fileid, map_flags_t flags); 6.9 6.10 /* Configurable methods. */ 6.11 6.12 virtual fileid_t get_fileid(const char *path) = 0; 6.13 6.14 - virtual flags_t get_flags(flags_t flags); 6.15 + virtual map_flags_t get_flags(flags_t flags); 6.16 6.17 virtual Accessor *make_accessor(const char *path, fileid_t fileid) = 0; 6.18
7.1 --- a/libfsserver/include/fsserver/ipc.h Wed May 19 00:38:36 2021 +0200 7.2 +++ b/libfsserver/include/fsserver/ipc.h Thu May 20 00:01:53 2021 +0200 7.3 @@ -29,7 +29,7 @@ 7.4 7.5 long ipc_prepare_flexpage(Flexpage *flexpage, offset_t offset, 7.6 offset_t max_offset, address_t hot_spot, 7.7 - flags_t flags, l4_snd_fpage_t *region); 7.8 + map_flags_t flags, l4_snd_fpage_t *region); 7.9 7.10 void ipc_unmap_flexpage(Flexpage *flexpage); 7.11
8.1 --- a/libfsserver/include/fsserver/opener_context_resource.h Wed May 19 00:38:36 2021 +0200 8.2 +++ b/libfsserver/include/fsserver/opener_context_resource.h Thu May 20 00:01:53 2021 +0200 8.3 @@ -61,7 +61,7 @@ 8.4 8.5 /* Pager/dataspace methods. */ 8.6 8.7 - long map(unsigned long offset, address_t hot_spot, flags_t flags, 8.8 + long map(unsigned long offset, address_t hot_spot, map_flags_t flags, 8.9 l4_snd_fpage_t *region) 8.10 { return SimplePager::map(offset, hot_spot, flags, region); } 8.11
9.1 --- a/libfsserver/include/fsserver/page_mapper.h Wed May 19 00:38:36 2021 +0200 9.2 +++ b/libfsserver/include/fsserver/page_mapper.h Thu May 20 00:01:53 2021 +0200 9.3 @@ -63,7 +63,7 @@ 9.4 9.5 /* Interface for the pager. */ 9.6 9.7 - Flexpage *get(offset_t offset, flags_t flags); 9.8 + Flexpage *get(offset_t offset, map_flags_t flags); 9.9 9.10 void queue(Flexpage *flexpage); 9.11
10.1 --- a/libfsserver/include/fsserver/pager.h Wed May 19 00:38:36 2021 +0200 10.2 +++ b/libfsserver/include/fsserver/pager.h Thu May 20 00:01:53 2021 +0200 10.3 @@ -35,16 +35,16 @@ 10.4 protected: 10.5 offset_t _start, _size; 10.6 PageMapper *_mapper; 10.7 - flags_t _flags; 10.8 + map_flags_t _flags; 10.9 10.10 public: 10.11 - explicit Pager(PageMapper *mapper, flags_t flags); 10.12 + explicit Pager(PageMapper *mapper, map_flags_t flags); 10.13 10.14 virtual void close(); 10.15 10.16 /* Paging methods. */ 10.17 10.18 - virtual long map(offset_t offset, address_t hot_spot, flags_t flags, 10.19 + virtual long map(offset_t offset, address_t hot_spot, map_flags_t flags, 10.20 l4_snd_fpage_t *region); 10.21 10.22 /* Limit methods. */
11.1 --- a/libfsserver/include/fsserver/pipe_pager.h Wed May 19 00:38:36 2021 +0200 11.2 +++ b/libfsserver/include/fsserver/pipe_pager.h Thu May 20 00:01:53 2021 +0200 11.3 @@ -60,7 +60,7 @@ 11.4 11.5 /* Pager methods. */ 11.6 11.7 - virtual long map(offset_t offset, address_t hot_spot, flags_t flags, l4_snd_fpage_t *region); 11.8 + virtual long map(offset_t offset, address_t hot_spot, map_flags_t flags, l4_snd_fpage_t *region); 11.9 11.10 /* Pipe methods. */ 11.11 11.12 @@ -76,7 +76,7 @@ 11.13 11.14 /* Notification methods. */ 11.15 11.16 - virtual long subscribe(flags_t flags, l4_cap_idx_t *irq); 11.17 + virtual long subscribe(notify_flags_t flags, l4_cap_idx_t *irq); 11.18 11.19 virtual long unsubscribe(); 11.20 };
12.1 --- a/libfsserver/include/fsserver/simple_pager.h Wed May 19 00:38:36 2021 +0200 12.2 +++ b/libfsserver/include/fsserver/simple_pager.h Thu May 20 00:01:53 2021 +0200 12.3 @@ -43,9 +43,9 @@ 12.4 12.5 /* Paging methods. */ 12.6 12.7 - long map(offset_t offset, address_t hot_spot, flags_t flags, l4_snd_fpage_t *region); 12.8 + long map(offset_t offset, address_t hot_spot, map_flags_t flags, l4_snd_fpage_t *region); 12.9 12.10 - long info(offset_t *size, flags_t *flags); 12.11 + long info(offset_t *size, map_flags_t *flags); 12.12 }; 12.13 12.14 // vim: tabstop=4 expandtab shiftwidth=4
13.1 --- a/libfsserver/lib/files/file_pager.cc Wed May 19 00:38:36 2021 +0200 13.2 +++ b/libfsserver/lib/files/file_pager.cc Thu May 20 00:01:53 2021 +0200 13.3 @@ -27,7 +27,7 @@ 13.4 /* Initialise a pager for a file with a unique file identifier and shared page 13.5 mapper for moderating access to loaded pages. */ 13.6 13.7 -FilePager::FilePager(fileid_t fileid, PageMapper *mapper, flags_t flags, 13.8 +FilePager::FilePager(fileid_t fileid, PageMapper *mapper, map_flags_t flags, 13.9 FilePaging *paging) 13.10 : Pager(mapper, flags), _paging(paging), fileid(fileid) 13.11 { 13.12 @@ -79,7 +79,7 @@ 13.13 13.14 /* Generic pager operations. */ 13.15 13.16 -long FilePager::map(offset_t offset, address_t hot_spot, flags_t flags, l4_snd_fpage_t *region) 13.17 +long FilePager::map(offset_t offset, address_t hot_spot, map_flags_t flags, l4_snd_fpage_t *region) 13.18 { 13.19 return Pager::map(offset, hot_spot, flags, region); 13.20 }
14.1 --- a/libfsserver/lib/files/file_paging.cc Wed May 19 00:38:36 2021 +0200 14.2 +++ b/libfsserver/lib/files/file_paging.cc Thu May 20 00:01:53 2021 +0200 14.3 @@ -76,7 +76,7 @@ 14.4 14.5 /* Convert opening flags to map-compatible paging flags. */ 14.6 14.7 -flags_t FilePaging::get_flags(flags_t flags) 14.8 +map_flags_t FilePaging::get_flags(flags_t flags) 14.9 { 14.10 return flags & (O_WRONLY | O_RDWR) ? L4RE_DS_MAP_FLAG_RW : L4RE_DS_MAP_FLAG_RO; 14.11 } 14.12 @@ -113,7 +113,7 @@ 14.13 14.14 /* Return a pager initialised with a page mapper. */ 14.15 14.16 -Pager *FilePaging::get_pager(const char *path, fileid_t fileid, flags_t flags) 14.17 +Pager *FilePaging::get_pager(const char *path, fileid_t fileid, map_flags_t flags) 14.18 { 14.19 std::lock_guard<std::mutex> guard(_lock); 14.20
15.1 --- a/libfsserver/lib/generic/pager.cc Wed May 19 00:38:36 2021 +0200 15.2 +++ b/libfsserver/lib/generic/pager.cc Thu May 20 00:01:53 2021 +0200 15.3 @@ -28,7 +28,7 @@ 15.4 /* Initialise the pager with a page mapper and the given flags controlling 15.5 access to a file. */ 15.6 15.7 -Pager::Pager(PageMapper *mapper, flags_t flags) 15.8 +Pager::Pager(PageMapper *mapper, map_flags_t flags) 15.9 : _start(0), _size(0), _mapper(mapper), _flags(flags) 15.10 { 15.11 /* Some pagers may not be initialised with a mapper. */ 15.12 @@ -87,7 +87,7 @@ 15.13 /* Map a flexpage corresponding to the dataspace 'offset' involving a 'hot_spot' 15.14 (flexpage offset). */ 15.15 15.16 -long Pager::map(offset_t offset, address_t hot_spot, flags_t flags, 15.17 +long Pager::map(offset_t offset, address_t hot_spot, map_flags_t flags, 15.18 l4_snd_fpage_t *region) 15.19 { 15.20 offset_t file_offset = _start + offset;
16.1 --- a/libfsserver/lib/generic/simple_pager.cc Wed May 19 00:38:36 2021 +0200 16.2 +++ b/libfsserver/lib/generic/simple_pager.cc Thu May 20 00:01:53 2021 +0200 16.3 @@ -51,7 +51,7 @@ 16.4 /* Map a flexpage corresponding to the dataspace 'offset' involving a 'hot_spot' 16.5 (flexpage offset). */ 16.6 16.7 -long SimplePager::map(offset_t offset, address_t hot_spot, flags_t flags, l4_snd_fpage_t *region) 16.8 +long SimplePager::map(offset_t offset, address_t hot_spot, map_flags_t flags, l4_snd_fpage_t *region) 16.9 { 16.10 Flexpage flexpage(_region); 16.11 16.12 @@ -74,7 +74,7 @@ 16.13 return IPC_MESSAGE_SENT; 16.14 } 16.15 16.16 -long SimplePager::info(offset_t *size, flags_t *flags) 16.17 +long SimplePager::info(offset_t *size, map_flags_t *flags) 16.18 { 16.19 *size = _region->size(); 16.20 *flags = L4_FPAGE_RW;
17.1 --- a/libfsserver/lib/mapping/ipc.cc Wed May 19 00:38:36 2021 +0200 17.2 +++ b/libfsserver/lib/mapping/ipc.cc Thu May 20 00:01:53 2021 +0200 17.3 @@ -40,7 +40,7 @@ 17.4 17.5 long ipc_prepare_flexpage(Flexpage *flexpage, offset_t offset, 17.6 offset_t max_offset, address_t hot_spot, 17.7 - flags_t flags, l4_snd_fpage_t *region) 17.8 + map_flags_t flags, l4_snd_fpage_t *region) 17.9 { 17.10 SendFlexpage send_flexpage = flexpage->to_send(offset, hot_spot, flags, 17.11 max_offset);
18.1 --- a/libfsserver/lib/mapping/page_mapper.cc Wed May 19 00:38:36 2021 +0200 18.2 +++ b/libfsserver/lib/mapping/page_mapper.cc Thu May 20 00:01:53 2021 +0200 18.3 @@ -71,7 +71,7 @@ 18.4 This method locks the mapper to prevent concurrent queries with the same 18.5 details, with the lock held until the queue operation releases the lock. */ 18.6 18.7 -Flexpage *PageMapper::get(offset_t offset, flags_t flags) 18.8 +Flexpage *PageMapper::get(offset_t offset, map_flags_t flags) 18.9 { 18.10 _lock.lock(); 18.11
19.1 --- a/libfsserver/lib/pipes/pipe_pager.cc Wed May 19 00:38:36 2021 +0200 19.2 +++ b/libfsserver/lib/pipes/pipe_pager.cc Thu May 20 00:01:53 2021 +0200 19.3 @@ -63,7 +63,7 @@ 19.4 19.5 /* Support paging. */ 19.6 19.7 -long PipePager::map(offset_t offset, address_t hot_spot, flags_t flags, l4_snd_fpage_t *region) 19.8 +long PipePager::map(offset_t offset, address_t hot_spot, map_flags_t flags, l4_snd_fpage_t *region) 19.9 { 19.10 return Pager::map(offset, hot_spot, flags, region); 19.11 } 19.12 @@ -162,9 +162,11 @@ 19.13 19.14 /* Subscribe to notifications. */ 19.15 19.16 -long PipePager::subscribe(flags_t flags, l4_cap_idx_t *irq) 19.17 +long PipePager::subscribe(notify_flags_t flags, l4_cap_idx_t *irq) 19.18 { 19.19 // NOTE: Need to interpret flags. 19.20 + // NOTE: Readers can subscribe to new data (at end), and pipe closed events. 19.21 + // NOTE: Writers can subscribe to new space and pipe closed events. 19.22 19.23 *irq = _paging->subscribe(_writing); 19.24 return L4_EOK;
20.1 --- a/libmem/include/mem/flexpage.h Wed May 19 00:38:36 2021 +0200 20.2 +++ b/libmem/include/mem/flexpage.h Thu May 20 00:01:53 2021 +0200 20.3 @@ -33,7 +33,7 @@ 20.4 { 20.5 protected: 20.6 unsigned int _counter; 20.7 - flags_t _flags; 20.8 + map_flags_t _flags; 20.9 20.10 public: 20.11 Region *region; 20.12 @@ -65,11 +65,11 @@ 20.13 20.14 bool supports_position(offset_t position); 20.15 20.16 - void upgrade(flags_t flags); 20.17 + void upgrade(map_flags_t flags); 20.18 20.19 bool modified(); 20.20 20.21 - SendFlexpage to_send(offset_t offset, offset_t hot_spot, flags_t flags, 20.22 + SendFlexpage to_send(offset_t offset, offset_t hot_spot, map_flags_t flags, 20.23 offset_t max_offset=0); 20.24 20.25 SendFlexpage to_unmap();
21.1 --- a/libmem/include/mem/send_flexpage.h Wed May 19 00:38:36 2021 +0200 21.2 +++ b/libmem/include/mem/send_flexpage.h Thu May 20 00:01:53 2021 +0200 21.3 @@ -32,10 +32,10 @@ 21.4 public: 21.5 offset_t base_addr; 21.6 unsigned int order; 21.7 - flags_t flags; 21.8 + map_flags_t flags; 21.9 21.10 explicit SendFlexpage(offset_t base_addr, unsigned int order, 21.11 - flags_t flags) 21.12 + map_flags_t flags) 21.13 : base_addr(base_addr), order(order), flags(flags) 21.14 { 21.15 }
22.1 --- a/libmem/lib/src/flexpage.cc Wed May 19 00:38:36 2021 +0200 22.2 +++ b/libmem/lib/src/flexpage.cc Thu May 20 00:01:53 2021 +0200 22.3 @@ -109,7 +109,7 @@ 22.4 maximal flags employed by the different pagers, with the result being used in 22.5 unmap operations. */ 22.6 22.7 -void Flexpage::upgrade(flags_t flags) 22.8 +void Flexpage::upgrade(map_flags_t flags) 22.9 { 22.10 if (flags && (flags != _flags)) 22.11 _flags |= flags; 22.12 @@ -127,7 +127,7 @@ 22.13 to 'hot_spot' for the receive flexpage window. */ 22.14 22.15 SendFlexpage Flexpage::to_send(offset_t offset, offset_t hot_spot, 22.16 - flags_t flags, offset_t max_offset) 22.17 + map_flags_t flags, offset_t max_offset) 22.18 { 22.19 /* The dataspace offset of the flexpage base is a multiple of the flexpage 22.20 size. */