Ignore:
Timestamp:
Jun 29, 2014, 12:53:25 PM (10 years ago)
Author:
alain
Message:

Introducing two modifications regarding the locks protecting
exclusive access to BDV and TTY peripherals channels:

  • use the giet_lock_t type to have only one lock per cache line.
  • store these locks in the seg_kernel_data or in seg_kernel_uncdata, depending on the GIET_NO HARD_CC configuration parameter, to have cacheable locks when it is possible.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • soft/giet_vm/giet_drivers/bdv_driver.c

    r333 r350  
    6363#include <ctx_handler.h>
    6464
     65#if !defined(GIET_NO_HARD_CC)
     66# error: You must define GIET_NO_HARD_CC in the giet_config.h file
     67#endif
     68
    6569///////////////////////////////////////////////////////////////////////////////
    6670// BDV global variables
     
    6872
    6973#define in_unckdata __attribute__((section (".unckdata")))
    70 
    71 in_unckdata unsigned int          _bdv_lock = 0;
    72 in_unckdata volatile unsigned int _bdv_status = 0;
     74#define in_kdata __attribute__((section (".kdata")))
     75
     76#if GIET_NO_HARD_CC
     77in_unckdata giet_lock_t           _bdv_lock __attribute__((aligned(64)));
     78in_unckdata volatile unsigned int _bdv_status;
    7379in_unckdata volatile unsigned int _bdv_gtid;
     80#else
     81in_kdata giet_lock_t           _bdv_lock __attribute__((aligned(64)));
     82in_kdata volatile unsigned int _bdv_status;
     83in_kdata volatile unsigned int _bdv_gtid;
     84#endif
    7485
    7586///////////////////////////////////////////////////////////////////////////////
Note: See TracChangeset for help on using the changeset viewer.