Changeset af863d0 in mainline


Ignore:
Timestamp:
2008-07-31T10:42:38Z (16 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
6e0e8c9
Parents:
2a513972
Message:

move unfinished ObjC support to a separate branch

Location:
kernel
Files:
4 deleted
7 edited

Legend:

Unmodified
Added
Removed
  • kernel/Makefile

    r2a513972 raf863d0  
    318318endif
    319319
    320 ## Experimental features
    321 #
    322 
    323 ifeq ($(CONFIG_EXPERIMENTAL),y)
    324         GENERIC_SOURCES += generic/src/lib/objc_ext.c \
    325                 generic/src/lib/objc.c
    326         EXTRA_OBJECTS = $(LIBDIR)/libobjc.a
    327         EXTRA_FLAGS += -x objective-c
    328 endif
    329 
    330320GENERIC_OBJECTS := $(addsuffix .o,$(basename $(GENERIC_SOURCES)))
    331321ARCH_OBJECTS := $(addsuffix .o,$(basename $(ARCH_SOURCES)))
  • kernel/arch/ia32/src/mm/as.c

    r2a513972 raf863d0  
    4040void as_arch_init(void)
    4141{
    42 #ifndef __OBJC__
    4342        as_operations = &as_pt_operations;
    44 #endif
    4543}
    4644
  • kernel/genarch/include/mm/page_pt.h

    r2a513972 raf863d0  
    117117#define PTE_EXECUTABLE(p)       PTE_EXECUTABLE_ARCH((p))
    118118
    119 #ifndef __OBJC__
    120119extern as_operations_t as_pt_operations;
    121 #endif
    122120extern page_mapping_operations_t pt_mapping_operations;
    123121
  • kernel/genarch/src/mm/as_pt.c

    r2a513972 raf863d0  
    5353static void pt_unlock(as_t *as, bool unlock);
    5454
    55 #ifdef __OBJC__
    56 @implementation as_t
    57 
    58 + (pte_t *) page_table_create: (int) flags
    59 {
    60         return ptl0_create(flags);
    61 }
    62 
    63 + (void) page_table_destroy: (pte_t *) page_table
    64 {
    65         ptl0_destroy(page_table);
    66 }
    67 
    68 - (void) page_table_lock: (bool) _lock
    69 {
    70         pt_lock(self, _lock);
    71 }
    72 
    73 - (void) page_table_unlock: (bool) unlock
    74 {
    75         pt_unlock(self, unlock);
    76 }
    77 
    78 @end
    79 #else
    8055as_operations_t as_pt_operations = {
    8156        .page_table_create = ptl0_create,
     
    8459        .page_table_unlock = pt_unlock
    8560};
    86 #endif
    8761
    8862/** Create PTL0.
  • kernel/generic/include/mm/as.h

    r2a513972 raf863d0  
    5454#include <lib/elf.h>
    5555
    56 #ifdef __OBJC__
    57 #include <lib/objc.h>
    58 #endif
    59 
    6056/**
    6157 * Defined to be true if user address space and kernel address space shadow each
     
    8581#define AS_PF_DEFER             2
    8682
    87 #ifdef __OBJC__
    88 @interface as_t : base_t {
    89         @public
    90                 /** Protected by asidlock. */
    91                 link_t inactive_as_with_asid_link;
    92                 /**
    93                  * Number of processors on wich is this address space active.
    94                  * Protected by asidlock.
    95                  */
    96                 count_t cpu_refcount;
    97                 /**
    98                  * Address space identifier.
    99                  * Constant on architectures that do not support ASIDs.
    100                  * Protected by asidlock. 
    101                  */
    102                 asid_t asid;
    103                
    104                 /** Number of references (i.e tasks that reference this as). */
    105                 atomic_t refcount;
    106 
    107                 mutex_t lock;
    108                
    109                 /** B+tree of address space areas. */
    110                 btree_t as_area_btree;
    111                
    112                 /** Non-generic content. */
    113                 as_genarch_t genarch;
    114                
    115                 /** Architecture specific content. */
    116                 as_arch_t arch;
    117 }
    118 
    119 + (pte_t *) page_table_create: (int) flags;
    120 + (void) page_table_destroy: (pte_t *) page_table;
    121 - (void) page_table_lock: (bool) _lock;
    122 - (void) page_table_unlock: (bool) unlock;
    123 
    124 @end
    125 
    126 #else
    127 
    12883/** Address space structure.
    12984 *
     
    169124        void (* page_table_unlock)(as_t *as, bool unlock);
    170125} as_operations_t;
    171 #endif
    172126
    173127/**
     
    250204extern as_t *AS_KERNEL;
    251205
    252 #ifndef __OBJC__
    253206extern as_operations_t *as_operations;
    254 #endif
    255 
    256207extern link_t inactive_as_with_asid_head;
    257208
  • kernel/generic/src/mm/as.c

    r2a513972 raf863d0  
    8383#endif /* CONFIG_VIRT_IDX_DCACHE */
    8484
    85 #ifndef __OBJC__
    8685/**
    8786 * Each architecture decides what functions will be used to carry out
     
    9493 */
    9594static slab_cache_t *as_slab;
    96 #endif
    9795
    9896/**
     
    120118static void sh_info_remove_reference(share_info_t *sh_info);
    121119
    122 #ifndef __OBJC__
    123120static int as_constructor(void *obj, int flags)
    124121{
     
    140137        return as_destructor_arch(as);
    141138}
    142 #endif
    143139
    144140/** Initialize address space subsystem. */
     
    147143        as_arch_init();
    148144
    149 #ifndef __OBJC__
    150145        as_slab = slab_cache_create("as_slab", sizeof(as_t), 0,
    151146            as_constructor, as_destructor, SLAB_CACHE_MAGDEFERRED);
    152 #endif
    153147       
    154148        AS_KERNEL = as_create(FLAG_AS_KERNEL);
     
    166160        as_t *as;
    167161
    168 #ifdef __OBJC__
    169         as = [as_t new];
    170         link_initialize(&as->inactive_as_with_asid_link);
    171         mutex_initialize(&as->lock, MUTEX_PASSIVE);     
    172         (void) as_constructor_arch(as, flags);
    173 #else
    174162        as = (as_t *) slab_alloc(as_slab, 0);
    175 #endif
    176163        (void) as_create_arch(as, 0);
    177164       
     
    264251        interrupts_restore(ipl);
    265252
    266 #ifdef __OBJC__
    267         [as free];
    268 #else
    269253        slab_free(as_slab, as);
    270 #endif
    271254}
    272255
     
    11641147pte_t *page_table_create(int flags)
    11651148{
    1166 #ifdef __OBJC__
    1167         return [as_t page_table_create: flags];
    1168 #else
    11691149        ASSERT(as_operations);
    11701150        ASSERT(as_operations->page_table_create);
    11711151       
    11721152        return as_operations->page_table_create(flags);
    1173 #endif
    11741153}
    11751154
     
    11821161void page_table_destroy(pte_t *page_table)
    11831162{
    1184 #ifdef __OBJC__
    1185         return [as_t page_table_destroy: page_table];
    1186 #else
    11871163        ASSERT(as_operations);
    11881164        ASSERT(as_operations->page_table_destroy);
    11891165       
    11901166        as_operations->page_table_destroy(page_table);
    1191 #endif
    11921167}
    11931168
     
    12061181void page_table_lock(as_t *as, bool lock)
    12071182{
    1208 #ifdef __OBJC__
    1209         [as page_table_lock: lock];
    1210 #else
    12111183        ASSERT(as_operations);
    12121184        ASSERT(as_operations->page_table_lock);
    12131185       
    12141186        as_operations->page_table_lock(as, lock);
    1215 #endif
    12161187}
    12171188
     
    12231194void page_table_unlock(as_t *as, bool unlock)
    12241195{
    1225 #ifdef __OBJC__
    1226         [as page_table_unlock: unlock];
    1227 #else
    12281196        ASSERT(as_operations);
    12291197        ASSERT(as_operations->page_table_unlock);
    12301198       
    12311199        as_operations->page_table_unlock(as, unlock);
    1232 #endif
    12331200}
    12341201
  • kernel/kernel.config

    r2a513972 raf863d0  
    168168# Compile kernel tests
    169169! CONFIG_TEST (y/n)
    170 
    171 
    172 ## Experimental features
    173 
    174 # Enable experimental features
    175 ! CONFIG_EXPERIMENTAL (n/y)
Note: See TracChangeset for help on using the changeset viewer.