#3131 new enhancement

Move more implementation details of mmap() to the file handlers

Reported by: Sebastian Huber Owned by: chrisj@…
Priority: normal Milestone: Indefinite
Component: fs Version: 5
Severity: normal Keywords:
Cc: Blocked By:
Blocking:

Description

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.

Change History (0)

Note: See TracTickets for help on using tickets.