#ifndef VM_FRAME_H #define VM_FRAME_H #include "threads/thread.h" #include "threads/palloc.h" struct frame_owner { struct thread *owner; /* The thread that owns the frame. */ struct list_elem elem; /* List element for the list of owners. */ }; void frame_init (void); void *frame_alloc (enum palloc_flags, void *, struct thread *); void frame_pin (void *frame); void frame_unpin (void *frame); void frame_free (void *frame); bool frame_owner_insert (void *frame, struct thread *owner); void frame_owner_remove (void *frame, struct thread *owner); #endif /* vm/frame.h */