Changeset 610 for trunk/kernel/libk/list.h
- Timestamp:
- Dec 27, 2018, 7:38:58 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/libk/list.h
r457 r610 3 3 * 4 4 * Authors Ghassan Almaless (2008,2009,2010,2011,2012) 5 * Alain Greiner (2016 )5 * Alain Greiner (2016,2017,2018) 6 6 * 7 7 * Copyright (c) UPMC Sorbonne Universites … … 23 23 */ 24 24 25 #ifndef _ ALMOS_LIST_H_26 #define _ ALMOS_LIST_H_25 #ifndef _LIST_H_ 26 #define _LIST_H_ 27 27 28 28 #include <kernel_config.h> 29 29 #include <hal_kernel_types.h> 30 #include <printk.h> 30 31 31 32 #ifndef NULL … … 240 241 } 241 242 242 243 #endif /* _ALMOS_LIST_H_ */ 243 /*************************************************************************** 244 * This debug function displays all entries of a list. 245 * @ root : local pointer on the root list_entry_t. 246 * @ string : list identifier displayed in header. 247 * @ max : max number of éléments to display. 248 **************************************************************************/ 249 static inline void list_display( list_entry_t * root, 250 char * string, 251 uint32_t max ) 252 { 253 list_entry_t * iter; 254 list_entry_t * next; 255 list_entry_t * pred; 256 uint32_t index; 257 258 next = root->next; 259 pred = root->pred; 260 261 printk("\n***** root (%x) / next (%x) / pred (%x) / %s *****\n", 262 root, next, pred, string ); 263 264 if( list_is_empty( root ) == false ) 265 { 266 for( iter = next , index = 0 ; 267 (iter != root) && (index < max) ; 268 iter = next , index++ ) 269 { 270 next = iter->next; 271 pred = iter->pred; 272 273 printk(" - %d : iter (%x) / next (%x) / pred (%x)\n", 274 index, iter, next, pred ); 275 } 276 } 277 } // end list_display() 278 279 280 #endif /* _LIST_H_ */
Note: See TracChangeset
for help on using the changeset viewer.