Changeset 18 for trunk/kernel/mm/page.h
- Timestamp:
- Jun 3, 2017, 4:42:49 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/mm/page.h
r14 r18 36 36 37 37 struct mapper_s; 38 38 39 39 /************************************************************************************* 40 40 * This defines the flags that can be attached to a physical page. … … 44 44 #define PG_RESERVED 0x0002 // cannot be allocated by PPM 45 45 #define PG_FREE 0x0004 // page can be allocated by PPM 46 #define PG_INLOAD 0x0008 // on-going load from disk 46 #define PG_INLOAD 0x0008 // on-going load from disk 47 47 #define PG_IO_ERR 0x0010 // mapper signals a read/write access error 48 48 #define PG_BUFFER 0x0020 // used in blockio.c … … 64 64 struct mapper_s * mapper; /*! local pointer on associated mapper (4) */ 65 65 uint32_t index; /*! page index in mapper (4) */ 66 66 67 67 union /*! (4) */ 68 68 { … … 72 72 }; 73 73 74 list_entry_t list; /*! for both dirty pages and free pages (8) */ 74 list_entry_t list; /*! for both dirty pages and free pages (8) */ 75 75 76 76 xlist_entry_t wait_root; /*! root of list of waiting threads (16) */ … … 90 90 * This function set one or several flags in page descriptor flags. 91 91 * @ page : pointer to page descriptor. 92 * @ value : all non zero bits in value will be set. 92 * @ value : all non zero bits in value will be set. 93 93 ************************************************************************************/ 94 94 inline void page_set_flag( page_t * page, … … 98 98 * This function reset one or several flags in page descriptor flags. 99 99 * @ page : pointer to page descriptor. 100 * @ value : all non zero bits in value will be cleared. 100 * @ value : all non zero bits in value will be cleared. 101 101 ************************************************************************************/ 102 102 inline void page_clear_flag( page_t * page, … … 107 107 * @ page : pointer to page descriptor. 108 108 * @ value : all non zero bits will be tested. 109 * @ returns true if at least one non zero bit in value is set / false otherwise. 109 * @ returns true if at least one non zero bit in value is set / false otherwise. 110 110 ************************************************************************************/ 111 111 inline bool_t page_is_flag( page_t * page, … … 114 114 /************************************************************************************* 115 115 * This function synchronizes (i.e. update the disk) all dirty pages in a cluster. 116 * It scan the PPM dirty list, that should be empty when this operation is completed. 116 * It scan the PPM dirty list, that should be empty when this operation is completed. 117 117 ************************************************************************************/ 118 118 void sync_all_pages(); … … 130 130 * and remove the page from the dirty list in PPM. 131 131 * @ page : pointer on page descriptor. 132 * @ returns true if page was dirty / returns false if page was not dirty 132 * @ returns true if page was dirty / returns false if page was not dirty 133 133 ************************************************************************************/ 134 134 bool_t page_undo_dirty( page_t * page ); … … 143 143 144 144 /************************************************************************************* 145 * This function reset to 0 all bytes in a given page. 145 * This function reset to 0 all bytes in a given page. 146 146 * @ page : pointer on page descriptor. 147 147 ************************************************************************************/ … … 151 151 * This blocking function set the PG_LOCKED flag on the page. 152 152 * It deschedule if the page has already been locked by another thread, 153 * and returns only when the flag has been successfully set. 153 * and returns only when the flag has been successfully set. 154 154 * @ page : pointer on page descriptor. 155 155 ************************************************************************************/
Note: See TracChangeset
for help on using the changeset viewer.