Ignore:
Timestamp:
Nov 11, 2014, 4:14:55 PM (10 years ago)
Author:
alain
Message:

Introducing the CMA_RX, CMA_TX, NIC_RX, NIC_TX slots in the task context.
This allows an user task to have a private NIC channel and a private CMA channel.

File:
1 edited

Legend:

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

    r446 r449  
    162162}  // end _printf()
    163163
     164///////////////////////////////////////////////////
     165unsigned int _atomic_increment( unsigned int* ptr )
     166{
     167    unsigned int value;
     168
     169    asm volatile (
     170        "_atomic_increment_try:             \n"
     171        "ll   $3,    0(%1)                  \n"
     172        "move %0,    $3                     \n"
     173        "addi $3,    $3,     1              \n"     
     174        "sc   $3,    0(%1)                  \n"
     175        "beqz $3,    _atomic_increment_try  \n"
     176        : "=r" (value)
     177        : "r" (ptr)
     178        : "$3", "memory" );
     179
     180    return value;
     181}
     182
    164183// Local Variables:
    165184// tab-width: 4
Note: See TracChangeset for help on using the changeset viewer.