Hello,
Trying to implement linux/dma-mapping.h (dma == direct memory access), I
went on to implementing mm.h (mm == memory map), and hence to vm_page.h The
following vm_page functions have been used by FreeBSD's mm.h implementation
(not yet implemented at least directly in Haiku's existing vm_page.h):
1. vm_page_dirty(page)
flags the entire page as dirty. It is expected that the page is not
currently on the cache queue
2. vm_page_reference(page)
mark the page as referenced from third-party kernel modules
3. vm_page_lock(page)
locks the page
4. vm_page_unlock(page)
unlocks a locked page
5. vm_page_hold(page)
increases the hold count on a page. This prevents the page daemon from
freeing the page
6. vm_page_unhold(page)
reduces the hold count on a page. If the hold count is zero it is
possible that the page will be freed by the page daemon
7. vm_page_wire(page)
increments the wire count on a page, and removes it from whatever queue
it is on
8. vm_page_unwire(page, PQ_ACTIVE)
releases one of the wirings on the page. When write_count reaches zero
the page is placed back onto either the active queue (if activate is
non-zero) or onto the inactive queue (if activate is zero). If the page is
unmanaged (PG_UNMANAGED is set) then the page is left on PQ_NONE
If someone could help me get these link to some existing functions in Haiku.
Thanks.