示例#1
0
struct master_item* create_master_item(struct master_item *next)
{
    struct master_item *pm = alloc_or_die_master();
    pm->slave = create_slseg();
    pm->next  = next;
    return pm;
}
void dll_insert_master(struct master_item **dll )
{   struct master_item *item ;
    struct master_item *tmp ;
    struct master_item *next ;
    unsigned int __cil_tmp5 ;
    unsigned int __cil_tmp6 ;
    unsigned int __cil_tmp7 ;
    unsigned int __cil_tmp8 ;

    {
        {
            tmp = alloc_or_die_master();
            item = tmp;
            next = *dll;
            *((struct master_item **)item) = next;
        }
        if (next) {
            __cil_tmp5 = (unsigned int )next;
            __cil_tmp6 = __cil_tmp5 + 4;
            *((struct master_item **)__cil_tmp6) = item;
        } else {

        }
        {
            __cil_tmp7 = (unsigned int )item;
            __cil_tmp8 = __cil_tmp7 + 8;
            *((struct slave_item **)__cil_tmp8) = dll_create_slave();
            *dll = item;
        }
        return;
    }
}
示例#3
0
struct master_item* create_sll_item(struct master_item *next) {
    struct master_item *pm = alloc_or_die_master();
    pm->next = next;
    pm->dll = create_dll();
    return pm;
}