Memory Interface

Name

Memory Interface -- MEM interface to the other subsystems.

Synopsis


void        (*page_ready_callback_t)        (gint pid,
                                             gint page);
void        mem_register_page_ready         (page_ready_callback_t func);
gboolean    mem_touch_page                  (proc_t *proc,
                                             gint page,
                                             gboolean write);

Description

This functions allow the other subsystems to interact, througth the messaging service, with the Memory.

Details

page_ready_callback_t ()

void        (*page_ready_callback_t)        (gint pid,
                                             gint page);

Function pointer type for the callback used on mem_register_page_ready.

pid :the process involved.
page :the process' page which has become ready.


mem_register_page_ready ()

void        mem_register_page_ready         (page_ready_callback_t func);

Registers func to be called whenever a processes page becomes available in physical memory.

func : function to be called.


mem_touch_page ()

gboolean    mem_touch_page                  (proc_t *proc,
                                             gint page,
                                             gboolean write);

Access the page number page of process proc. The access will be for writing if write is TRUE.

proc : process involved.
page : page we pretend to use.
write : are we writing to the specified page?
Returns : TRUE if the page was available and FALSE if a page fault ocurred and the process has to wait.