Ignore:
Timestamp:
Feb 12, 2013, 6:33:31 PM (11 years ago)
Author:
meunier
Message:

Added support for memspaces and const.
Added an interrupt masking to the "giet_context_switch" syscall
Corrected two bugs in boot/boot_init.c (one minor and one regarding barriers initialization)
Reformatted the code in all files.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • soft/giet_vm/libs/libsrl/srl_hw_helpers.h

    r178 r228  
    1212
    1313/**
    14    Standard API call, expands to nothing for this implementation.
    15  */
     14  Standard API call, expands to nothing for this implementation.
     15  */
    1616#define srl_busy_cycles(n) do{}while(0)
    1717
    1818//void useless(void *pointless,...){}
    1919/**
    20    @this flushes the cache line containing the address.
    21  */
     20  @this flushes the cache line containing the address.
     21  */
    2222//TODO
    2323#define srl_dcache_flush_addr 0
    2424
    2525/*
    26 static inline cpu_dcache_invld(void *ptr){
    27          asm volatile (                                                         
    28         " cache %0, %1"                                                 
    29         : : "i" (0x11) , "R" (*(uint8_t*)(ptr))
    30         : "memory"                                                             
    31         );                                                     
    32 }
    33 */
     26   static inline cpu_dcache_invld(void *ptr){
     27   asm volatile (                               
     28   " cache %0, %1"                           
     29   : : "i" (0x11) , "R" (*(uint8_t*)(ptr))   
     30   : "memory"                               
     31   );                           
     32   }
     33   */
    3434
    3535/**
    36    @this flushes a memory zone from cache.
    37  */
     36  @this flushes a memory zone from cache.
     37  */
    3838//TODO
    3939//void dcache_flush(const void * addr, size_t size)
     
    4141
    4242/**
    43    @this waits for at least the given time (in cycles). The actual
    44    time spent in this call is not predictable.
     43  @this waits for at least the given time (in cycles). The actual
     44  time spent in this call is not predictable.
    4545
    46    @param time Number of cycles to wait for
    47  */
    48 void srl_sleep_cycles( unsigned int time );
     46  @param time Number of cycles to wait for
     47  */
     48void srl_sleep_cycles(unsigned int time);
    4949
    5050/**
    51    @this returns the absolute timestamp counter from the
    52    initialization of the platform.
     51  @this returns the absolute timestamp counter from the
     52  initialization of the platform.
    5353
    54    @return Cycles from the initialization of the system
    55  */
    56 static inline unsigned int srl_cycle_count()
    57 {
    58         return giet_proctime();
     54  @return Cycles from the initialization of the system
     55  */
     56static inline unsigned int srl_cycle_count() {
     57    return giet_proctime();
    5958}
    6059
     60
    6161/**
    62    @this aborts the current execution. On most systems, @this will
    63    simply hang.
    64  */
    65 static inline void srl_abort()
    66 {
    67         asm volatile ("break 0");
    68         while(1);
     62  @this aborts the current execution. On most systems, @this will
     63  simply hang.
     64  */
     65static inline void srl_abort() {
     66    asm volatile ("break 0");
     67    while (1);
    6968}
     69
    7070
    7171/**
    7272 *
    7373 */
    74 static inline void srl_exit()
    75 {
     74static inline void srl_exit() {
    7675    giet_exit();
    7776}
    7877
    7978#endif
     79
     80// Local Variables:
     81// tab-width: 4
     82// c-basic-offset: 4
     83// c-file-offsets:((innamespace . 0)(inline-open . 0))
     84// indent-tabs-mode: nil
     85// End:
     86// vim: filetype=c:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
     87
Note: See TracChangeset for help on using the changeset viewer.