Changeset View
Changeset View
Standalone View
Standalone View
sys/fs/tmpfs/tmpfs_subr.c
Show First 20 Lines • Show All 100 Lines • ▼ Show 20 Lines | static __inline int tmpfs_dirtree_cmp(struct tmpfs_dirent *a, | ||||
struct tmpfs_dirent *b); | struct tmpfs_dirent *b); | ||||
RB_PROTOTYPE_STATIC(tmpfs_dir, tmpfs_dirent, uh.td_entries, tmpfs_dirtree_cmp); | RB_PROTOTYPE_STATIC(tmpfs_dir, tmpfs_dirent, uh.td_entries, tmpfs_dirtree_cmp); | ||||
size_t | size_t | ||||
tmpfs_mem_avail(void) | tmpfs_mem_avail(void) | ||||
{ | { | ||||
vm_ooffset_t avail; | vm_ooffset_t avail; | ||||
avail = swap_pager_avail + vm_cnt.v_free_count - tmpfs_pages_reserved; | /* XXX */ | ||||
avail = swap_pager_avail + vm_free_count() - tmpfs_pages_reserved; | |||||
if (__predict_false(avail < 0)) | if (__predict_false(avail < 0)) | ||||
avail = 0; | avail = 0; | ||||
return (avail); | return (avail); | ||||
} | } | ||||
size_t | size_t | ||||
tmpfs_pages_used(struct tmpfs_mount *tmp) | tmpfs_pages_used(struct tmpfs_mount *tmp) | ||||
{ | { | ||||
▲ Show 20 Lines • Show All 991 Lines • Show Last 20 Lines |