Changeset 626 for trunk/softs/giet_tsar


Ignore:
Timestamp:
Feb 4, 2014, 12:24:16 PM (10 years ago)
Author:
cfuguet
Message:

Introducing generic soft_sort_giet application for the
GIET nano-kernel.

It uses the number of clusters and the number of processors
defined in the hard_config.h file to deduce the number of
threads executing the application.

Location:
trunk/softs/giet_tsar
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/softs/giet_tsar/stdio.c

    r622 r626  
    126126{
    127127    return (unsigned int)(NB_PROCS_MAX * X_SIZE * Y_SIZE);
     128}
     129////////////////////////////////////////////////////////////////////////////////////////
     130// Returns pseudo-random number
     131////////////////////////////////////////////////////////////////////////////////////////
     132in_drivers unsigned int _rand()
     133{
     134    unsigned int x = _proctime();
     135    if((x & 0xF) > 7)
     136        return (x*x & 0xFFFF);
     137    else
     138        return (x*x*x & 0xFFFF);
    128139}
    129140////////////////////////////////////////////////////////////////////////////////////////
  • trunk/softs/giet_tsar/stdio.h

    r622 r626  
    6363unsigned int    _procnumber();
    6464
     65unsigned int    _rand();
     66
    6567void            _it_mask();
    6668void            _it_enable();
Note: See TracChangeset for help on using the changeset viewer.