Ignore:
Timestamp:
Feb 12, 2013, 6:33:31 PM (12 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/utils.c

    r201 r228  
    44// GCC requires this function. Taken from MutekH.
    55////////////////////////////////////////////////////////////////////////////////////////
    6 void *memcpy(void *_dst, const void *_src, unsigned int size)
    7 {
    8     unsigned int *dst = _dst;
    9     const unsigned int *src = _src;
    10     if ( ! ((unsigned int)dst & 3) && ! ((unsigned int)src & 3) )
     6void * memcpy(void *_dst, const void * _src, unsigned int size) {
     7    unsigned int * dst = _dst;
     8    const unsigned int * src = _src;
     9    if (!((unsigned int) dst & 3) && ! ((unsigned int) src & 3) ) {
    1110        while (size > 3) {
    1211            *dst++ = *src++;
    1312            size -= 4;
    1413        }
     14    }
    1515
    16     unsigned char *cdst = (unsigned char*)dst;
    17     unsigned char *csrc = (unsigned char*)src;
     16    unsigned char * cdst = (unsigned char *) dst;
     17    unsigned char * csrc = (unsigned char *) src;
    1818
    1919    while (size--) {
     
    2323}
    2424
     25
    2526////////////////////////////////////////////////////////////////////////////////////////
    2627//  memset()
    2728// GCC requires this function. Taken from MutekH.
    2829////////////////////////////////////////////////////////////////////////////////////////
    29 void * memset(void *dst, int s, unsigned int count)
    30 {
    31         char *a = (char *) dst;
    32         while (count--)
    33                 *a++ = (char)s;
    34         return dst;
     30void * memset(void * dst, int s, unsigned int count) {
     31    char * a = (char *) dst;
     32    while (count--) {
     33        *a++ = (char) s;
     34    }
     35    return dst;
    3536}
     37
     38
     39// Local Variables:
     40// tab-width: 4
     41// c-basic-offset: 4
     42// c-file-offsets:((innamespace . 0)(inline-open . 0))
     43// indent-tabs-mode: nil
     44// End:
     45// vim: filetype=c:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
     46
Note: See TracChangeset for help on using the changeset viewer.