mirror of
https://git.rtems.org/rtems-libbsd/
synced 2025-10-16 20:18:13 +08:00
sys/kern: Add VFS support
- Refactor the libio interface - Move syscalls into an rtemsbsd location - Provide a root directory mount point Update #4475
This commit is contained in:
@@ -1 +1,16 @@
|
||||
/* EMPTY */
|
||||
#ifndef RTEMS_VM_OBJCT_H
|
||||
#define RTEMS_VM_OBJCT_H
|
||||
|
||||
/*
|
||||
* Helpers to perform conversion between vm_object page indexes and offsets.
|
||||
* IDX_TO_OFF() converts an index into an offset.
|
||||
* OFF_TO_IDX() converts an offset into an index.
|
||||
* OBJ_MAX_SIZE specifies the maximum page index corresponding to the
|
||||
* maximum unsigned offset.
|
||||
*/
|
||||
#define IDX_TO_OFF(idx) (((vm_ooffset_t)(idx)) << PAGE_SHIFT)
|
||||
#define OFF_TO_IDX(off) ((vm_pindex_t)(((vm_ooffset_t)(off)) >> PAGE_SHIFT))
|
||||
#define UOFF_TO_IDX(off) OFF_TO_IDX(off)
|
||||
#define OBJ_MAX_SIZE (OFF_TO_IDX(UINT64_MAX) + 1)
|
||||
|
||||
#endif
|
||||
|
@@ -0,0 +1,20 @@
|
||||
#ifndef RTEMS_VM_PAGER_H
|
||||
#define RTEMS_VM_PAGER_H
|
||||
|
||||
/*
|
||||
* get/put return values
|
||||
* OK operation was successful
|
||||
* BAD specified data was out of the accepted range
|
||||
* FAIL specified data was in range, but doesn't exist
|
||||
* PEND operations was initiated but not completed
|
||||
* ERROR error while accessing data that is in range and exists
|
||||
* AGAIN temporary resource shortage prevented operation from happening
|
||||
*/
|
||||
#define VM_PAGER_OK 0
|
||||
#define VM_PAGER_BAD 1
|
||||
#define VM_PAGER_FAIL 2
|
||||
#define VM_PAGER_PEND 3
|
||||
#define VM_PAGER_ERROR 4
|
||||
#define VM_PAGER_AGAIN 5
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user