#include "femtoos_code.h"
Include dependency graph for code_TestRemember.c:
Go to the source code of this file.
Defines | |
#define | WP0 1 |
#define | WP1 1 |
#define | WP2 1 |
Functions | |
void | appBoot (void) |
Prototype for the general initialization. | |
static void | WorkerProcess (void) |
This worker process read two files of 8 bytes, xor the values and store the result. | |
void | appLoop_Worker0Task (void) |
void | appLoop_Worker1Task (void) |
void | appLoop_Worker2Task (void) |
void | appLoop_SleepTask (void) |
void | appLoop_SupervisorTask (void) |
#define WP0 1 |
#define WP1 1 |
#define WP2 1 |
void appBoot | ( | void | ) |
Prototype for the general initialization.
The Remember demonstration fills the file system with random numbers and calculates a (xor) hash on before hand. Then three worker tasks are started which read the files with concurrently and calculate hash's for each files. When all workers are done the main task combines the result and checks if it is equal to the value before. If so, a new round is started. Note that this demo wears out the EEPROM rapidly.
Definition at line 44 of file code_TestRemember.c.
void appLoop_SleepTask | ( | void | ) |
Definition at line 132 of file code_TestRemember.c.
void appLoop_SupervisorTask | ( | void | ) |
Definition at line 139 of file code_TestRemember.c.
References defFromFileStart, defReadOnly, defReadWrite, FileSpace_LayerInfo, FileSpace_Status, genCountEventBlocks(), genFireEvent(), genTraceByteInfo, genTraceMarker, Taddress, taskDelayFromNow(), taskFileAppendByte(), taskFileClear, taskFileClose(), taskFileFormat(), taskFileOpen(), taskFileReadBuffer(), taskFileReadBufferOnName, taskFileReadByteOnName, taskFileSetSizeOnName, taskFileWriteBufferOnName, taskFileWriteByteOnName, Tuint08, Tuint16, WP0, WP1, and WP2.
Here is the call graph for this function:
void appLoop_Worker0Task | ( | void | ) |
Definition at line 109 of file code_TestRemember.c.
References WorkerProcess().
Here is the call graph for this function:
void appLoop_Worker1Task | ( | void | ) |
Definition at line 117 of file code_TestRemember.c.
References WorkerProcess().
Here is the call graph for this function:
void appLoop_Worker2Task | ( | void | ) |
Definition at line 125 of file code_TestRemember.c.
References WorkerProcess().
Here is the call graph for this function:
static void WorkerProcess | ( | void | ) | [static] |
This worker process read two files of 8 bytes, xor the values and store the result.
The workers are greedy and try to do a much work as possible, thereby hindering each other. This is intentional, to test the blocking of the OS. After each layer has been completed. the worker waits for an event to continue
The function contains tracers. This was needed for me to get this demo working (concurrent administration of which files where done and which not was not as easy as i expected). The tracers are removed by the preprocessor if not used.
This demo also shows how to make use of variable events. The events are used to signal the workers a new batch is ready for them.
Definition at line 64 of file code_TestRemember.c.
References defReadOnly, defReadWrite, genTraceByteInfo, Taddress, taskFileClose(), taskFileOpen(), taskFileReadBuffer(), taskFileReadByteOnName, taskFileWriteBuffer(), taskFileWriteByteOnName, taskWaitForEvent(), and Tuint08.
Referenced by appLoop_Worker0Task(), appLoop_Worker1Task(), and appLoop_Worker2Task().
Here is the call graph for this function:
Here is the caller graph for this function: