Changeset 700


Ignore:
Timestamp:
Aug 7, 2015, 5:42:07 PM (9 years ago)
Author:
guerin
Message:

kernel: add fbf_cma release, call it on task kill

Location:
soft/giet_vm/giet_kernel
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • soft/giet_vm/giet_kernel/ctx_handler.c

    r697 r700  
    6060        _sys_nic_release( 0 );
    6161        psched->context[ltid][CTX_NIC_TX_ID] = -1;
     62    }
     63
     64    // release private FBF_CMA channel if required
     65    if ( psched->context[ltid][CTX_CMA_FB_ID] < NB_CMA_CHANNELS )
     66    {
     67        _sys_fbf_cma_release();
     68        psched->context[ltid][CTX_CMA_FB_ID] = -1;
    6269    }
    6370
  • soft/giet_vm/giet_kernel/sys_handler.c

    r699 r700  
    16861686} // end sys_fbf_cma_alloc()
    16871687
     1688////////////////////////
     1689// NOTE: not a syscall
     1690int _sys_fbf_cma_release()
     1691{
     1692    unsigned int channel = _get_context_slot( CTX_CMA_FB_ID );
     1693
     1694    if ( channel >= NB_CMA_CHANNELS )
     1695    {
     1696        _printf("\n[GIET_ERROR] in _sys_fbf_cma_release() : CMA channel already released\n");
     1697        return -1;
     1698    }
     1699
     1700    // stop fb
     1701    _sys_fbf_cma_stop();
     1702
     1703    // reset CTX_CMA_FB_ID for task
     1704    _set_context_slot( CTX_CMA_FB_ID, -1 );
     1705
     1706    // release CMA channel
     1707    _cma_channel[channel] = 0;
     1708
     1709    return 0;
     1710}
    16881711
    16891712///////////////////////////////////////////////////
  • soft/giet_vm/giet_kernel/sys_handler.h

    r695 r700  
    180180int _sys_fbf_cma_alloc();
    181181
     182int _sys_fbf_cma_release();
     183
    182184int _sys_fbf_cma_init_buf(void*        buf0_vbase,
    183185                          void*        buf1_vbase,
Note: See TracChangeset for help on using the changeset viewer.