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.

File:
1 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////////////////////////////////////////////////////////////////////////////////////////
Note: See TracChangeset for help on using the changeset viewer.