[RTEMS Project] #3131: Move more implementation details of mmap() to the file handlers

RTEMS trac trac at rtems.org
Tue Sep 12 06:20:24 UTC 2017


#3131: Move more implementation details of mmap() to the file handlers
-----------------------------+------------------------
 Reporter:  Sebastian Huber  |      Owner:  chrisj@…
     Type:  enhancement      |     Status:  new
 Priority:  normal           |  Milestone:  Indefinite
Component:  filesystem       |    Version:  4.12
 Severity:  normal           |   Keywords:
-----------------------------+------------------------
 The mmap() implementation contains too many conditionals. It doesn't
 follow the object oriented design of the file system layer. The mmap() is
 basically a factory. The mmap_h handler should construct a mapping object.
 A destructor is currently missing. Maybe the mmap_h handler should use a
 flag to deal with construction and destruction.

 As a first step, pass the flags to the mmap_h handler and add a special
 flag to indicate an unmap. Use it in unmap() to destroy the mapping.

 {{{
 #define RTEMS_FILESYSTEM_MAP_UNMAP 0x8000
 }}}

 Add a static assert to ensure that RTEMS_FILESYSTEM_MAP_UNMAP is distinct
 to all other MAP flags used by RTEMS.

--
Ticket URL: <http://devel.rtems.org/ticket/3131>
RTEMS Project <http://www.rtems.org/>
RTEMS Project


More information about the bugs mailing list