Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* checks whether a pte_t is a swap pte, and extracts the swap
- * entry from the pte, and the type from the entry
- */
- #include <linux/swapops.h>
- unsigned pte_to_type(pte_t mypte){
- swp_entry_t myentry;
- unsigned mytype;
- if is_swap_pte(mypte)
- {
- myentry = pte_to_swp_entry(mypte);
- mytype = swp_type(myentry);
- return mytype;
- }
- return -1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement