Subversion Repositories shark

Compare Revisions

Ignore whitespace Rev 1254 → Rev 1255

/demos/trunk/loader/common/nload.h
1,6 → 1,8
/* Generic Struct for loader task */
#ifndef __NLOAD_H__
#define __NLOAD_H__
 
#include "lconst.h" //Constant definition for loader and linux parser
#include "func.h" //Constant definition for loader and linux parser
 
struct loader_task {
 
35,3 → 37,5
 
};
 
#endif
 
/demos/trunk/loader/common/calibrate.h
1,8 → 1,8
 
/* Nunber of calibration iterations */
#define CALIBRATING_DELTA 100000
#define CALIBRATION_DELTA 100000
 
/* Usec of exec time for CALIBRATING_DELTA iterations
Set to 0 if you calibrate during loader execution */
#define CALIBRATING_RESULT 0
#define CALIBRATION_RESULT 0
 
/demos/trunk/loader/common/nload.c
12,11 → 12,12
#include "fsf_contract.h" //Framework main header
#include "calibrate.h"
#include "func.h" //Generic function definitions
#include "lconst.h"
 
/* Activate task output debug */
#define TASK_OUTPUT
 
int cal_cycles = CALIBRATING_RESULT; //Calibration const, it converts usec to cycles
int cal_cycles = CALIBRATION_RESULT; //Calibration const, it converts usec to cycles
struct timespec zero_time; //Zero time of the simulation
extern struct loader_task loader_task_list[]; //Loader task array
extern int total_loader_task; //Loader task number
/demos/trunk/loader/shark/func.h
1,6 → 1,7
#ifndef FUNC_H
#define FUNC_H
#ifndef __FUNC_H__
#define __FUNC_H__
 
#include "kernel/kern.h"
#include "shark.h"
 
#define get_current_exec_task() exec_shadow
15,7 → 16,6
#define generic_task_endcycle() task_endcycle()
#define generic_end_simulation() sys_end()
#define printf cprintf
#endif
 
#endif
 
/demos/trunk/loader/shark/shark.c
1,4 → 1,5
#include "func.h"
#include "common/calibrate.h"
 
extern int cal_cycles;
extern struct timespec zero_time;
13,7 → 14,7
long long i;
struct timespec start,end,diff;
 
if (cal_cycles != 0) return;
if (cal_cycles != 0) return 0;
 
kern_cli();
kern_gettime(&start);
/demos/trunk/loader/shark/shark.h
1,8 → 1,8
#ifndef SHARK_H
#define SHARK_H
#ifndef __SHARK_H__
#define __SHARK_H__
 
#include "kernel/kern.h"
#include "common/nload.h"
#include "common/lconst.h"
 
int calibrate_cycle();
void start_simulation();
12,6 → 12,6
void loader_task_activate(struct loader_task *l);
int get_server_from_contract(int contract);
 
int fsfinit();
void fsfinit();
 
#endif
/demos/trunk/loader/generators/makefile
6,6 → 6,6
 
clean:
 
rm *.o
rm event_gen
rm -f *.o
rm -f event_gen
 
/demos/trunk/loader/makefile
12,5 → 12,12
include $(BASE)/config/example.mk
 
nload:
make -f $(SUBMAKE) APP="./common/nload" INIT= OTHEROBJS="./shark/initfile.o ./shark/shark.o ./shark/fsfinit.o" OTHERINCL= SHARKOPT="__OLDCHAR__ __FIRST__"
make -f $(SUBMAKE) APP="./common/nload" INIT= OTHEROBJS="./generators/event.o ./shark/initfile.o ./shark/shark.o ./shark/fsfinit.o" OTHERINCL="-I. -I./shark" SHARKOPT="__OLDCHAR__ __FIRST__"
 
allclean:
 
rm -f common/*.o
rm -f shark/*.o
rm -f generators/*.o
rm -f common/nload