Changeset c993e45 in mainline for kernel/generic/src/mm/as.c


Ignore:
Timestamp:
2007-02-11T22:48:43Z (18 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
bea09de6
Parents:
bd1deed
Message:

small cleanup, more work coming

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/mm/as.c

    rbd1deed rc993e45  
    8888 */
    8989as_operations_t *as_operations = NULL;
    90 #endif
    9190
    9291/**
     
    9493 */
    9594static slab_cache_t *as_slab;
     95#endif
    9696
    9797/**
     
    116116static void sh_info_remove_reference(share_info_t *sh_info);
    117117
     118#ifndef __OBJC__
    118119static int as_constructor(void *obj, int flags)
    119120{
     
    135136        return as_destructor_arch(as);
    136137}
     138#endif
    137139
    138140/** Initialize address space subsystem. */
     
    140142{
    141143        as_arch_init();
    142        
     144
     145#ifndef __OBJC__
    143146        as_slab = slab_cache_create("as_slab", sizeof(as_t), 0,
    144147            as_constructor, as_destructor, SLAB_CACHE_MAGDEFERRED);
     148#endif
    145149       
    146150        AS_KERNEL = as_create(FLAG_AS_KERNEL);
     
    158162        as_t *as;
    159163
     164#ifdef __OBJC__
     165        as = [as_t new];
     166        link_initialize(&as->inactive_as_with_asid_link);
     167        mutex_initialize(&as->lock);   
     168        (void) as_constructor_arch(as, flags);
     169#else
    160170        as = (as_t *) slab_alloc(as_slab, 0);
     171#endif
    161172        (void) as_create_arch(as, 0);
    162173       
     
    229240
    230241        interrupts_restore(ipl);
    231        
     242
     243#ifdef __OBJC__
     244        [as free];
     245#else
    232246        slab_free(as_slab, as);
     247#endif
    233248}
    234249
Note: See TracChangeset for help on using the changeset viewer.