static inline swp_entry_t swp_entry(unsigned long type, pgoff_t offset) {

swp_entry_t ret;

return ret;

A few bit operations are used to pack the parameters in an unsigned long variable that is returned as the content of a new swap_entry_t.

The kernel requires the ability to switch between the architecture-dependent and architecture-independent representations, so the pte_to_swp_entry function is provided for this purpose:

Continue reading here: Info

Was this article helpful?

0 0