Changeset 18 for trunk/kernel/mm/page.c


Ignore:
Timestamp:
Jun 3, 2017, 4:42:49 PM (7 years ago)
Author:
max@…
Message:

cosmetic, and a few typos

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/kernel/mm/page.c

    r7 r18  
    8989        // set dirty flag in page descriptor
    9090                page_set_flag( page , PG_DIRTY );
    91  
     91
    9292        // register page in PPM dirty list
    9393                list_add_first( &ppm->dirty_root , &page->list );
     
    9797    // unlock the PPM dirty_list
    9898        spinlock_unlock( &ppm->dirty_lock );
    99  
     99
    100100        return done;
    101101}
     
    128128
    129129/////////////////////
    130 void sync_all_pages() 
     130void sync_all_pages()
    131131{
    132132        page_t   * page;
     
    138138        spinlock_lock( &ppm->dirty_lock );
    139139
    140         while( !list_is_empty( &ppm->dirty_root ) ) 
     140        while( !list_is_empty( &ppm->dirty_root ) )
    141141        {
    142142                page = LIST_FIRST( &ppm->dirty_root ,  page_t , list );
     
    147147                mapper = page->mapper;
    148148        index  = page->index;
    149  
     149
    150150        // lock the page
    151151                page_lock( page );
     
    203203    // take the spinlock protecting the PG_LOCKED flag
    204204        spinlock_lock( &page->lock );
    205  
     205
    206206    // check the page waiting list
    207207        bool_t is_empty = xlist_is_empty( XPTR( local_cxy , &page->wait_root ) );
     
    210210    {
    211211        // get an extended pointer on the first waiting thread
    212         xptr_t root_xp   = XPTR( local_cxy , &page->wait_root ); 
     212        xptr_t root_xp   = XPTR( local_cxy , &page->wait_root );
    213213        xptr_t thread_xp = XLIST_FIRST_ELEMENT( root_xp , thread_t , wait_list );
    214214
     
    244244        void    * src_base;
    245245        void    * dst_base;
    246  
     246
    247247        if( dst->order != src->order )
    248248    {
     
    272272//        size , (uint32_t)base , (uint32_t)(&LOCAL_CLUSTER->kcm_tbl[0] ) );
    273273
    274         memset( base , 0 , size ); 
     274        memset( base , 0 , size );
    275275
    276276// kmem_print_kcm_table();
     
    282282{
    283283        printk("*** Page %d : base = %x / flags = %x / order = %d / count = %d\n",
    284                 page->index, 
     284                page->index,
    285285                ppm_page2base( page ),
    286                 page->flags, 
    287                 page->order, 
     286                page->flags,
     287                page->order,
    288288                page->refcount );
    289289}
Note: See TracChangeset for help on using the changeset viewer.