Changeset 632 for trunk/kernel/mm/page.h
- Timestamp:
- May 28, 2019, 2:56:04 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/mm/page.h
r625 r632 3 3 * 4 4 * Authors Ghassan Almalles (2008,2009,2010,2011,2012) 5 * Alain Greiner (2016 )5 * Alain Greiner (2016,2017,2018,2019) 6 6 * 7 7 * Copyright (c) UPMC Sorbonne Universites … … 68 68 69 69 /************************************************************************************* 70 * This function initializes one page descriptor. 70 * This function must be called by a thread running in the local cluster. 71 * It initializes the page descriptor. 71 72 ************************************************************************************* 72 73 * @ page : pointer to page descriptor … … 75 76 76 77 /************************************************************************************* 77 * This function atomically set one or several flags in page descriptor flags. 78 * This function must be called by a thread running in the local cluster. 79 * It atomically set one or several flags in page descriptor flags. 78 80 ************************************************************************************* 79 81 * @ page : pointer to page descriptor. … … 84 86 85 87 /************************************************************************************* 86 * This function atomically reset one or several flags in page descriptor flags. 88 * This function must be called by a thread running in the local cluster. 89 * It atomically reset one or several flags in page descriptor flags. 87 90 ************************************************************************************* 88 91 * @ page : pointer to page descriptor. … … 93 96 94 97 /************************************************************************************* 95 * This function tests the value of one or several flags in page descriptor flags. 98 * This function must be called by a thread running in the local cluster. 99 * It tests the value of one or several flags in page descriptor flags. 96 100 ************************************************************************************* 97 101 * @ page : pointer to page descriptor. … … 103 107 104 108 /************************************************************************************* 105 * This function resets to 0 all bytes in a given page. 109 * This function must be called by a thread running in the local cluster. 110 * It resets to 0 all bytes in a given page. 106 111 ************************************************************************************* 107 112 * @ page : pointer on page descriptor. … … 110 115 111 116 /************************************************************************************* 112 * This blocking function atomically increments the page refcount. 117 * This function must be called by a thread running in the local cluster. 118 * It atomically increments the page refcount. 113 119 ************************************************************************************* 114 120 * @ page : pointer on page descriptor. … … 117 123 118 124 /************************************************************************************* 119 * This blocking function atomically decrements the page refcount. 125 * This function must be called by a thread running in the local cluster. 126 * It atomically decrements the page refcount. 120 127 ************************************************************************************* 121 128 * @ page : pointer on page descriptor. … … 123 130 inline void page_refcount_down( page_t * page ); 124 131 125 /*************************************************************************************126 * This function display the values contained in a page descriptor.127 *************************************************************************************128 * @ page : pointer on page descriptor.129 ************************************************************************************/130 void page_print( page_t * page );131 132 132 133 134 135 /************************************************************************************* 136 * This function can be called by any thread running in any cluster. 137 * It atomically set one or several flags in a remote page descriptor 138 * identified by the <page_xp> argument. 139 ************************************************************************************* 140 * @ page_xp : extended pointer to page descriptor. 141 * @ value : all non zero bits in value will be set. 142 ************************************************************************************/ 143 inline void page_remote_set_flag( xptr_t page_xp, 144 uint32_t value ); 145 146 /************************************************************************************* 147 * This function can be called by any thread running in any cluster. 148 * It atomically reset one or several flags in a remote page descriptor 149 * identified by the <page_xp> argument. 150 ************************************************************************************* 151 * @ page_xp : extended pointer to page descriptor. 152 * @ value : all non zero bits in value will be cleared. 153 ************************************************************************************/ 154 inline void page_remote_clear_flag( xptr_t page_xp, 155 uint32_t value ); 156 157 /************************************************************************************* 158 * This function can be called by any thread running in any cluster. 159 * It tests the value of one or several flags in a remote page descriptor 160 * identified by the <page_xp> argument. 161 ************************************************************************************* 162 * @ page_xp : extended pointer to page descriptor. 163 * @ value : all non zero bits will be tested. 164 * @ returns true if at least one non zero bit in value is set / false otherwise. 165 ************************************************************************************/ 166 inline bool_t page_remote_is_flag( xptr_t page_xp, 167 uint32_t value ); 168 169 /************************************************************************************* 170 * This function can be called by any thread running in any cluster. 171 * It atomically increments the refcount for the remote page identified by 172 * the <page_xp> argument. 173 ************************************************************************************* 174 * @ page_xp : extended pointer on page descriptor. 175 ************************************************************************************/ 176 inline void page_remote_refcount_up( xptr_t page_xp ); 177 178 /************************************************************************************* 179 * This function can be called by any thread running in any cluster. 180 * It atomically decrements the refcount for the remote page identified by 181 * the <page_xp> argument. 182 ************************************************************************************* 183 * @ page_xp : extended pointer on page descriptor. 184 ************************************************************************************/ 185 inline void page_remote_refcount_down( xptr_t page_xp ); 186 187 /************************************************************************************* 188 * This debug function can be called by any thread running in any cluster. 189 * It displays the values contained in a page descriptor. 190 ************************************************************************************* 191 * @ page_xp : extended pointer on page descriptor. 192 ************************************************************************************/ 193 void page_remote_display( xptr_t page_xp ); 194 133 195 #endif /* _PAGE_H_ */
Note: See TracChangeset
for help on using the changeset viewer.