ref: 8f219f9a49758b48ac5110544235e81397ced324
parent: 7c23515433397d4c5264a2408f2254a3bd9d61ee
author: Anthony House <[email protected]>
date: Sat Nov 24 09:30:54 EST 2018
Did changes requested by Steve. Added a new paramenter in mutate.c and mutate.h for int *round. Passed those values in from input.c.
--- a/input.c
+++ b/input.c
@@ -15,7 +15,7 @@
switch(sc->c) {
case sc_exits : // _exits(char*);
// mutate the input
- mut_charstar((char**)lget(&(sc->inputs), 0));
+ mut_charstar((char**)lget(&(sc->inputs), 0), &sc->round);
// log the variables
log_call(sc);
@@ -22,7 +22,7 @@
// sync the disk
hjsync();
-
+
// execute the call
exits( *(char**)lget(&(sc->inputs), 0) );
@@ -35,7 +35,7 @@
// sync the disk
hjsync();
-
+
// execute the call
abort();
*/
@@ -43,8 +43,8 @@
break;
case sc_access : // access(char* : int);
// mutate the input
- mut_charstar((char**)lget(&(sc->inputs), 0));
- mut_int((int*)lget(&(sc->inputs), 1));
+ mut_charstar((char**)lget(&(sc->inputs), 0), &sc->round);
+ mut_int((int*)lget(&(sc->inputs), 1), &sc->round);
// log the variables
log_call(sc);
@@ -51,7 +51,7 @@
// sync the disk
hjsync();
-
+
// execute the call
access( *(char**)lget(&(sc->inputs), 0),
*(int*)lget(&(sc->inputs), 1) );
@@ -59,7 +59,7 @@
break;
case sc_alarm : // alarm(ulong);
// mutate the input
- mut_ulong((ulong*)lget(&(sc->inputs), 0));
+ mut_ulong((ulong*)lget(&(sc->inputs), 0), &sc->round);
// log the variables
log_call(sc);
@@ -66,7 +66,7 @@
// sync the disk
hjsync();
-
+
// execute the call
alarm( *(ulong*)lget(&(sc->inputs), 0) );
@@ -73,8 +73,8 @@
break;
case sc_await : // await(char* : int);
// mutate the input
- mut_charstar((char**)lget(&(sc->inputs), 0));
- mut_int((int*)lget(&(sc->inputs), 1));
+ mut_charstar((char**)lget(&(sc->inputs), 0), &sc->round);
+ mut_int((int*)lget(&(sc->inputs), 1), &sc->round);
// log the variables
log_call(sc);
@@ -81,7 +81,7 @@
// sync the disk
hjsync();
-
+
// execute the call
await( *(char**)lget(&(sc->inputs), 0),
*(int*)lget(&(sc->inputs), 1) );
@@ -89,9 +89,9 @@
break;
case sc_bind : // bind(char* : char* : int);
// mutate the input
- mut_charstar((char**)lget(&(sc->inputs), 0));
- mut_charstar((char**)lget(&(sc->inputs), 1));
- mut_int((int*)lget(&(sc->inputs), 2));
+ mut_charstar((char**)lget(&(sc->inputs), 0), &sc->round);
+ mut_charstar((char**)lget(&(sc->inputs), 1), &sc->round);
+ mut_int((int*)lget(&(sc->inputs), 2), &sc->round);
// log the variables
log_call(sc);
@@ -98,7 +98,7 @@
// sync the disk
hjsync();
-
+
// execute the call
bind( *(char**)lget(&(sc->inputs), 0),
*(char**)lget(&(sc->inputs), 1),
@@ -109,7 +109,7 @@
break;
case sc_chdir : // chdir(char*);
// mutate the input
- mut_charstar((char**)lget(&(sc->inputs), 0));
+ mut_charstar((char**)lget(&(sc->inputs), 0), &sc->round);
// log the variables
log_call(sc);
@@ -116,7 +116,7 @@
// sync the disk
hjsync();
-
+
// execute the call
chdir( *(char**)lget(&(sc->inputs), 0) );
@@ -123,7 +123,7 @@
break;
case sc_close : // close(int);
// mutate the input
- mut_int((int*)lget(&(sc->inputs), 0));
+ mut_int((int*)lget(&(sc->inputs), 0), &sc->round);
// log the variables
log_call(sc);
@@ -130,7 +130,7 @@
// sync the disk
hjsync();
-
+
// execute the call
close(*(int*)lget(&(sc->inputs), 0));
@@ -137,9 +137,9 @@
break;
case sc_create : // create(char* : int : ulong);
// mutate the input
- mut_charstar((char**)lget(&(sc->inputs), 0));
- mut_int((int*)lget(&(sc->inputs), 1));
- mut_ulong((ulong*)lget(&(sc->inputs), 2));
+ mut_charstar((char**)lget(&(sc->inputs), 0), &sc->round);
+ mut_int((int*)lget(&(sc->inputs), 1), &sc->round);
+ mut_ulong((ulong*)lget(&(sc->inputs), 2), &sc->round);
// log the variables
log_call(sc);
@@ -146,17 +146,17 @@
// sync the disk
hjsync();
-
+
// execute the call
create( *(char**)lget(&(sc->inputs), 0),
- *(int*)lget(&(sc->inputs), 1),
+ *(int*)lget(&(sc->inputs), 1),
*(ulong*)lget(&(sc->inputs), 2) );
break;
case sc_dup : // dup(int : int);
// mutate the input
- mut_int((int*)lget(&(sc->inputs), 0));
- mut_int((int*)lget(&(sc->inputs), 1));
+ mut_int((int*)lget(&(sc->inputs), 0), &sc->round);
+ mut_int((int*)lget(&(sc->inputs), 1), &sc->round);
// log the variables
log_call(sc);
@@ -163,7 +163,7 @@
// sync the disk
hjsync();
-
+
// execute the call
dup( *(int*)lget(&(sc->inputs), 0),
*(int*)lget(&(sc->inputs), 1));
@@ -171,8 +171,8 @@
break;
case sc_errstr : // errstr(char* : uint);
// mutate the input
- mut_charstar((char**)lget(&(sc->inputs), 0));
- mut_uint((uint*)lget(&(sc->inputs), 1));
+ mut_charstar((char**)lget(&(sc->inputs), 0), &sc->round);
+ mut_uint((uint*)lget(&(sc->inputs), 1), &sc->round);
// log the variables
log_call(sc);
@@ -179,7 +179,7 @@
// sync the disk
hjsync();
-
+
// execute the call
errstr( *(char**)lget(&(sc->inputs), 0),
*(uint*)lget(&(sc->inputs), 1) );
@@ -199,7 +199,7 @@
// sync the disk
hjsync();
-
+
// execute the call
fork();
@@ -206,7 +206,7 @@
break;
case sc_rfork : // rfork(int);
// mutate the input
- mut_int((int*)lget(&(sc->inputs), 0));
+ mut_int((int*)lget(&(sc->inputs), 0), &sc->round);
// log the variables
log_call(sc);
@@ -213,7 +213,7 @@
// sync the disk
hjsync();
-
+
// execute the call
rfork(*(int*)lget(&(sc->inputs), 0));
@@ -220,8 +220,8 @@
break;
case sc_fauth : // fauth(int : char*);
// mutate the input
- mut_int((int*)lget(&(sc->inputs), 0));
- mut_charstar((char**)lget(&(sc->inputs), 1));
+ mut_int((int*)lget(&(sc->inputs), 0), &sc->round);
+ mut_charstar((char**)lget(&(sc->inputs), 1), &sc->round);
// log the variables
log_call(sc);
@@ -228,7 +228,7 @@
// sync the disk
hjsync();
-
+
// execute the call
fauth( *(int*)lget(&(sc->inputs), 0),
*(char**)lget(&(sc->inputs), 1) );
@@ -236,9 +236,9 @@
break;
case sc_fstat : // fstat(int : uchar* : int);
// mutate the input
- mut_int((int*)lget(&(sc->inputs), 0));
- mut_ucharstar((unsigned char**)lget(&(sc->inputs), 1));
- mut_int((int*)lget(&(sc->inputs), 2));
+ mut_int((int*)lget(&(sc->inputs), 0), &sc->round);
+ mut_ucharstar((unsigned char**)lget(&(sc->inputs), 1), &sc->round);
+ mut_int((int*)lget(&(sc->inputs), 2), &sc->round);
// log the variables
log_call(sc);
@@ -245,7 +245,7 @@
// sync the disk
hjsync();
-
+
// execute the call
fstat( *(int*)lget(&(sc->inputs), 0),
*(unsigned char**)lget(&(sc->inputs), 1),
@@ -254,9 +254,9 @@
break;
case sc_fwstat : // fwstat(int : uchar* : int);
// mutate the input
- mut_int((int*)lget(&(sc->inputs), 0));
- mut_ucharstar((unsigned char**)lget(&(sc->inputs), 1));
- mut_int((int*)lget(&(sc->inputs), 2));
+ mut_int((int*)lget(&(sc->inputs), 0), &sc->round);
+ mut_ucharstar((unsigned char**)lget(&(sc->inputs), 1), &sc->round);
+ mut_int((int*)lget(&(sc->inputs), 2), &sc->round);
// log the variables
log_call(sc);
@@ -263,19 +263,19 @@
// sync the disk
hjsync();
-
+
// execute the call
- fwstat( *(int*)lget(&(sc->inputs), 0),
- *(unsigned char**)lget(&(sc->inputs), 1),
+ fwstat( *(int*)lget(&(sc->inputs), 0),
+ *(unsigned char**)lget(&(sc->inputs), 1),
*(int*)lget(&(sc->inputs), 2) );
break;
case sc_fversion : // fversion(int : int : char* : int);
// mutate the input
- mut_int((int*)lget(&(sc->inputs), 0));
- mut_int((int*)lget(&(sc->inputs), 1));
- mut_charstar((char**)lget(&(sc->inputs), 2));
- mut_int((int*)lget(&(sc->inputs), 3));
+ mut_int((int*)lget(&(sc->inputs), 0), &sc->round);
+ mut_int((int*)lget(&(sc->inputs), 1), &sc->round);
+ mut_charstar((char**)lget(&(sc->inputs), 2), &sc->round);
+ mut_int((int*)lget(&(sc->inputs), 3), &sc->round);
// log the variables
log_call(sc);
@@ -282,7 +282,7 @@
// sync the disk
hjsync();
-
+
// execute the call
fversion( *(int*)lget(&(sc->inputs), 0),
*(int*)lget(&(sc->inputs), 1),
@@ -292,11 +292,11 @@
break;
case sc_mount : // mount(int : int : char* : int : char*);
// mutate the input
- mut_int((int*)lget(&(sc->inputs), 0));
- mut_int((int*)lget(&(sc->inputs), 1));
- mut_charstar((char**)lget(&(sc->inputs), 2));
- mut_int((int*)lget(&(sc->inputs), 3));
- mut_charstar((char**)lget(&(sc->inputs), 4));
+ mut_int((int*)lget(&(sc->inputs), 0), &sc->round);
+ mut_int((int*)lget(&(sc->inputs), 1), &sc->round);
+ mut_charstar((char**)lget(&(sc->inputs), 2), &sc->round);
+ mut_int((int*)lget(&(sc->inputs), 3), &sc->round);
+ mut_charstar((char**)lget(&(sc->inputs), 4), &sc->round);
// log the variables
log_call(sc);
@@ -303,10 +303,10 @@
// sync the disk
hjsync();
-
+
// execute the call
mount( *(int*)lget(&(sc->inputs), 0),
- *(int*)lget(&(sc->inputs), 1),
+ *(int*)lget(&(sc->inputs), 1),
*(char**)lget(&(sc->inputs), 2),
*(int*)lget(&(sc->inputs), 3),
*(char**)lget(&(sc->inputs), 4) );
@@ -314,8 +314,8 @@
break;
case sc_unmount : // unmount(char* : char*);
// mutate the input
- mut_charstar((char**)lget(&(sc->inputs), 0));
- mut_charstar((char**)lget(&(sc->inputs), 1));
+ mut_charstar((char**)lget(&(sc->inputs), 0), &sc->round);
+ mut_charstar((char**)lget(&(sc->inputs), 1), &sc->round);
// log the variables
log_call(sc);
@@ -322,7 +322,7 @@
// sync the disk
hjsync();
-
+
// execute the call
unmount(*(char**)lget(&(sc->inputs), 0),
*(char**)lget(&(sc->inputs), 1) );
@@ -330,7 +330,7 @@
break;
case sc_noted : // noted(int);
// mutate the input
- mut_int((int*)lget(&(sc->inputs), 0));
+ mut_int((int*)lget(&(sc->inputs), 0), &sc->round);
// log the variables
log_call(sc);
@@ -337,7 +337,7 @@
// sync the disk
hjsync();
-
+
// execute the call
noted(*(int*)lget(&(sc->inputs), 0));
@@ -348,8 +348,8 @@
break;
case sc_open : // open(char* : int);
// mutate the input
- mut_charstar((char**)lget(&(sc->inputs), 0));
- mut_int((int*)lget(&(sc->inputs), 1));
+ mut_charstar((char**)lget(&(sc->inputs), 0), &sc->round);
+ mut_int((int*)lget(&(sc->inputs), 1), &sc->round);
// log the variables
log_call(sc);
@@ -356,7 +356,7 @@
// sync the disk
hjsync();
-
+
// execute the call
open( *(char**)lget(&(sc->inputs), 0),
*(int*)lget(&(sc->inputs), 1) );
@@ -364,9 +364,9 @@
break;
case sc_fd2path : // fd2path(int : char* : int);
// mutate the input
- mut_int((int*)lget(&(sc->inputs), 0));
- mut_charstar((char**)lget(&(sc->inputs), 1));
- mut_int((int*)lget(&(sc->inputs), 2));
+ mut_int((int*)lget(&(sc->inputs), 0), &sc->round);
+ mut_charstar((char**)lget(&(sc->inputs), 1), &sc->round);
+ mut_int((int*)lget(&(sc->inputs), 2), &sc->round);
// log the variables
log_call(sc);
@@ -373,7 +373,7 @@
// sync the disk
hjsync();
-
+
// execute the call
fd2path(*(int*)lget(&(sc->inputs), 0),
*(char**)lget(&(sc->inputs), 1),
@@ -386,10 +386,10 @@
break;
case sc_pread : // pread(int : void* : long : vlong);
// mutate the input
- mut_int((int*)lget(&(sc->inputs), 0));
- mut_voidstar((void**)lget(&(sc->inputs), 1));
- mut_long((long*)lget(&(sc->inputs), 2));
- mut_vlong((long long*)lget(&(sc->inputs), 3));
+ mut_int((int*)lget(&(sc->inputs), 0), &sc->round);
+ mut_voidstar((void**)lget(&(sc->inputs), 1), &sc->round);
+ mut_long((long*)lget(&(sc->inputs), 2), &sc->round);
+ mut_vlong((long long*)lget(&(sc->inputs), 3), &sc->round);
// log the variables
log_call(sc);
@@ -396,7 +396,7 @@
// sync the disk
hjsync();
-
+
// execute the call
pread( *(int*)lget(&(sc->inputs), 0),
*(void**)lget(&(sc->inputs), 1),
@@ -406,10 +406,10 @@
break;
case sc_preadv : // preadv(int : IOchunk* : int : vlong);
// mutate the input
- mut_int((int*)lget(&(sc->inputs), 0));
- mut_IOchunkstar((IOchunk**)lget(&(sc->inputs), 1));
- mut_int((int*)lget(&(sc->inputs), 2));
- mut_vlong((long long*)lget(&(sc->inputs), 3));
+ mut_int((int*)lget(&(sc->inputs), 0), &sc->round);
+ mut_IOchunkstar((IOchunk**)lget(&(sc->inputs), 1), &sc->round);
+ mut_int((int*)lget(&(sc->inputs), 2), &sc->round);
+ mut_vlong((long long*)lget(&(sc->inputs), 3), &sc->round);
// log the variables
log_call(sc);
@@ -416,7 +416,7 @@
// sync the disk
hjsync();
-
+
// execute the call
preadv( *(int*)lget(&(sc->inputs), 0),
*(IOchunk**)lget(&(sc->inputs), 1),
@@ -426,10 +426,10 @@
break;
case sc_pwrite : // pwrite(int : void* : long : vlong);
// mutate the input
- mut_int((int*)lget(&(sc->inputs), 0));
- mut_voidstar((void**)lget(&(sc->inputs), 1));
- mut_long((long*)lget(&(sc->inputs), 2));
- mut_vlong((long long*)lget(&(sc->inputs), 3));
+ mut_int((int*)lget(&(sc->inputs), 0), &sc->round);
+ mut_voidstar((void**)lget(&(sc->inputs), 1), &sc->round);
+ mut_long((long*)lget(&(sc->inputs), 2), &sc->round);
+ mut_vlong((long long*)lget(&(sc->inputs), 3), &sc->round);
// log the variables
log_call(sc);
@@ -436,7 +436,7 @@
// sync the disk
hjsync();
-
+
// execute the call
pwrite( *(int*)lget(&(sc->inputs), 0),
*(void**)lget(&(sc->inputs), 1),
@@ -446,10 +446,10 @@
break;
case sc_pwritev : // pwritev(int : IOchunk* : int : vlong);
// mutate the input
- mut_int((int*)lget(&(sc->inputs), 0));
- mut_IOchunkstar((IOchunk**)lget(&(sc->inputs), 1));
- mut_int((int*)lget(&(sc->inputs), 2));
- mut_vlong((long long*)lget(&(sc->inputs), 3));
+ mut_int((int*)lget(&(sc->inputs), 0), &sc->round);
+ mut_IOchunkstar((IOchunk**)lget(&(sc->inputs), 1), &sc->round);
+ mut_int((int*)lget(&(sc->inputs), 2), &sc->round);
+ mut_vlong((long long*)lget(&(sc->inputs), 3), &sc->round);
// log the variables
log_call(sc);
@@ -456,7 +456,7 @@
// sync the disk
hjsync();
-
+
// execute the call
pwritev(*(int*)lget(&(sc->inputs), 0),
*(IOchunk**)lget(&(sc->inputs), 1),
@@ -466,9 +466,9 @@
break;
case sc_read : // read(int : void* : long);
// mutate the input
- mut_int((int*)lget(&(sc->inputs), 0));
- mut_voidstar((void**)lget(&(sc->inputs), 1));
- mut_long((long*)lget(&(sc->inputs), 2));
+ mut_int((int*)lget(&(sc->inputs), 0), &sc->round);
+ mut_voidstar((void**)lget(&(sc->inputs), 1), &sc->round);
+ mut_long((long*)lget(&(sc->inputs), 2), &sc->round);
// log the variables
log_call(sc);
@@ -475,7 +475,7 @@
// sync the disk
hjsync();
-
+
// execute the call
read( *(int*)lget(&(sc->inputs), 0),
*(void**)lget(&(sc->inputs), 1),
@@ -484,9 +484,9 @@
break;
case sc_readn : // readn(int : void* : long);
// mutate the input
- mut_int((int*)lget(&(sc->inputs), 0));
- mut_voidstar((void**)lget(&(sc->inputs), 1));
- mut_long((long*)lget(&(sc->inputs), 2));
+ mut_int((int*)lget(&(sc->inputs), 0), &sc->round);
+ mut_voidstar((void**)lget(&(sc->inputs), 1), &sc->round);
+ mut_long((long*)lget(&(sc->inputs), 2), &sc->round);
// log the variables
log_call(sc);
@@ -493,7 +493,7 @@
// sync the disk
hjsync();
-
+
// execute the call
readn( *(int*)lget(&(sc->inputs), 0),
*(void**)lget(&(sc->inputs), 1),
@@ -502,9 +502,9 @@
break;
case sc_readv : // readv(int : IOchunk* : int);
// mutate the input
- mut_int((int*)lget(&(sc->inputs), 0));
- mut_IOchunkstar((IOchunk**)lget(&(sc->inputs), 1));
- mut_int((int*)lget(&(sc->inputs), 2));
+ mut_int((int*)lget(&(sc->inputs), 0), &sc->round);
+ mut_IOchunkstar((IOchunk**)lget(&(sc->inputs), 1), &sc->round);
+ mut_int((int*)lget(&(sc->inputs), 2), &sc->round);
// log the variables
log_call(sc);
@@ -511,7 +511,7 @@
// sync the disk
hjsync();
-
+
// execute the call
readv( *(int*)lget(&(sc->inputs), 0),
*(IOchunk**)lget(&(sc->inputs), 1),
@@ -520,7 +520,7 @@
break;
case sc_remove : // remove(char*);
// mutate the input
- mut_charstar((char**)lget(&(sc->inputs), 0));
+ mut_charstar((char**)lget(&(sc->inputs), 0), &sc->round);
// log the variables
log_call(sc);
@@ -527,7 +527,7 @@
// sync the disk
hjsync();
-
+
// execute the call
remove( *(char**)lget(&(sc->inputs), 0) );
@@ -534,7 +534,7 @@
break;
case sc_sbrk : // sbrk(ulong);
// mutate the input
- mut_ulong((ulong*)lget(&(sc->inputs), 0));
+ mut_ulong((ulong*)lget(&(sc->inputs), 0), &sc->round);
// log the variables
log_call(sc);
@@ -541,7 +541,7 @@
// sync the disk
hjsync();
-
+
// execute the call
sbrk( *(ulong*)lget(&(sc->inputs), 0) );
@@ -548,9 +548,9 @@
break;
case sc_oseek : // oseek(int : long : int);
// mutate the input
- mut_int((int*)lget(&(sc->inputs), 0));
- mut_long((long*)lget(&(sc->inputs), 1));
- mut_int((int*)lget(&(sc->inputs), 2));
+ mut_int((int*)lget(&(sc->inputs), 0), &sc->round);
+ mut_long((long*)lget(&(sc->inputs), 1), &sc->round);
+ mut_int((int*)lget(&(sc->inputs), 2), &sc->round);
// log the variables
log_call(sc);
@@ -557,7 +557,7 @@
// sync the disk
hjsync();
-
+
// execute the call
oseek( *(int*)lget(&(sc->inputs), 0),
*(long*)lget(&(sc->inputs), 1),
@@ -566,9 +566,9 @@
break;
case sc_seek : // seek(int : vlong : int);
// mutate the input
- mut_int((int*)lget(&(sc->inputs), 0));
- mut_vlong((long long*)lget(&(sc->inputs), 1));
- mut_int((int*)lget(&(sc->inputs), 2));
+ mut_int((int*)lget(&(sc->inputs), 0), &sc->round);
+ mut_vlong((long long*)lget(&(sc->inputs), 1), &sc->round);
+ mut_int((int*)lget(&(sc->inputs), 2), &sc->round);
// log the variables
log_call(sc);
@@ -575,7 +575,7 @@
// sync the disk
hjsync();
-
+
// execute the call
seek( *(int*)lget(&(sc->inputs), 0),
*(long long*)lget(&(sc->inputs), 1),
@@ -584,10 +584,10 @@
break;
case sc_segattach : // segattach(int : char* : void* : ulong);
// mutate the input
- mut_int((int*)lget(&(sc->inputs), 0));
- mut_charstar((char**)lget(&(sc->inputs), 1));
- mut_voidstar((void**)lget(&(sc->inputs), 2));
- mut_ulong((unsigned long*)lget(&(sc->inputs), 3));
+ mut_int((int*)lget(&(sc->inputs), 0), &sc->round);
+ mut_charstar((char**)lget(&(sc->inputs), 1), &sc->round);
+ mut_voidstar((void**)lget(&(sc->inputs), 2), &sc->round);
+ mut_ulong((unsigned long*)lget(&(sc->inputs), 3), &sc->round);
// log the variables
log_call(sc);
@@ -594,7 +594,7 @@
// sync the disk
hjsync();
-
+
// execute the call
segattach( *(int*)lget(&(sc->inputs), 0),
*(char**)lget(&(sc->inputs), 1),
@@ -604,8 +604,8 @@
break;
case sc_segbrk : // segbrk(void* : void*);
// mutate the input
- mut_voidstar((void**)lget(&(sc->inputs), 0));
- mut_voidstar((void**)lget(&(sc->inputs), 1));
+ mut_voidstar((void**)lget(&(sc->inputs), 0), &sc->round);
+ mut_voidstar((void**)lget(&(sc->inputs), 1), &sc->round);
// log the variables
log_call(sc);
@@ -612,7 +612,7 @@
// sync the disk
hjsync();
-
+
// execute the call
segbrk( *(void**)lget(&(sc->inputs), 0),
*(void**)lget(&(sc->inputs), 1) );
@@ -620,7 +620,7 @@
break;
case sc_segdetach : // segdetach(void*);
// mutate the input
- mut_voidstar((void**)lget(&(sc->inputs), 0));
+ mut_voidstar((void**)lget(&(sc->inputs), 0), &sc->round);
// log the variables
log_call(sc);
@@ -627,7 +627,7 @@
// sync the disk
hjsync();
-
+
// execute the call
segdetach( *(void**)lget(&(sc->inputs), 0) );
@@ -634,8 +634,8 @@
break;
case sc_segflush : // segflush(void* : ulong);
// mutate the input
- mut_voidstar((void**)lget(&(sc->inputs), 0));
- mut_ulong((unsigned long*)lget(&(sc->inputs), 1));
+ mut_voidstar((void**)lget(&(sc->inputs), 0), &sc->round);
+ mut_ulong((unsigned long*)lget(&(sc->inputs), 1), &sc->round);
// log the variables
log_call(sc);
@@ -642,7 +642,7 @@
// sync the disk
hjsync();
-
+
// execute the call
segflush( *(void**)lget(&(sc->inputs), 0),
*(unsigned long*)lget(&(sc->inputs), 1) );
@@ -650,8 +650,8 @@
break;
case sc_segfree : // segfree(void* : ulong);
// mutate the input
- mut_voidstar((void**)lget(&(sc->inputs), 0));
- mut_ulong((unsigned long*)lget(&(sc->inputs), 1));
+ mut_voidstar((void**)lget(&(sc->inputs), 0), &sc->round);
+ mut_ulong((unsigned long*)lget(&(sc->inputs), 1), &sc->round);
// log the variables
log_call(sc);
@@ -658,7 +658,7 @@
// sync the disk
hjsync();
-
+
// execute the call
segfree(*(void**)lget(&(sc->inputs), 0),
*(unsigned long*)lget(&(sc->inputs), 1) );
@@ -666,8 +666,8 @@
break;
case sc_semacquire : // semacquire(long* : int);
// mutate the input
- mut_longstar((long**)lget(&(sc->inputs), 0));
- mut_int((int*)lget(&(sc->inputs), 1));
+ mut_longstar((long**)lget(&(sc->inputs), 0), &sc->round);
+ mut_int((int*)lget(&(sc->inputs), 1), &sc->round);
// log the variables
log_call(sc);
@@ -674,7 +674,7 @@
// sync the disk
hjsync();
-
+
// execute the call
semacquire( *(long**)lget(&(sc->inputs), 0),
*(int*)lget(&(sc->inputs), 1) );
@@ -682,8 +682,8 @@
break;
case sc_semrelease : // semrelease(long* : long);
// mutate the input
- mut_longstar((long**)lget(&(sc->inputs), 0));
- mut_long((long*)lget(&(sc->inputs), 1));
+ mut_longstar((long**)lget(&(sc->inputs), 0), &sc->round);
+ mut_long((long*)lget(&(sc->inputs), 1), &sc->round);
// log the variables
log_call(sc);
@@ -690,7 +690,7 @@
// sync the disk
hjsync();
-
+
// execute the call
semrelease( *(long**)lget(&(sc->inputs), 0),
*(long*)lget(&(sc->inputs), 1) );
@@ -698,7 +698,7 @@
break;
case sc_sleep : // sleep(long);
// mutate the input
- mut_long((long*)lget(&(sc->inputs), 0));
+ mut_long((long*)lget(&(sc->inputs), 0), &sc->round);
// log the variables
log_call(sc);
@@ -705,7 +705,7 @@
// sync the disk
hjsync();
-
+
// execute the call
sleep( *(long*)lget(&(sc->inputs), 0) );
@@ -712,9 +712,9 @@
break;
case sc_stat : // stat(char* : uchar* : int);
// mutate the input
- mut_charstar((char**)lget(&(sc->inputs), 0));
- mut_ucharstar((unsigned char**)lget(&(sc->inputs), 1));
- mut_int((int*)lget(&(sc->inputs), 2));
+ mut_charstar((char**)lget(&(sc->inputs), 0), &sc->round);
+ mut_ucharstar((unsigned char**)lget(&(sc->inputs), 1), &sc->round);
+ mut_int((int*)lget(&(sc->inputs), 2), &sc->round);
// log the variables
log_call(sc);
@@ -721,7 +721,7 @@
// sync the disk
hjsync();
-
+
// execute the call
stat( *(char**)lget(&(sc->inputs), 0),
*(unsigned char**)lget(&(sc->inputs), 1),
@@ -730,8 +730,8 @@
break;
case sc_tsemacquire : // tsemacquire(long* : ulong);
// mutate the input
- mut_longstar((long**)lget(&(sc->inputs), 0));
- mut_ulong((ulong*)lget(&(sc->inputs), 1));
+ mut_longstar((long**)lget(&(sc->inputs), 0), &sc->round);
+ mut_ulong((ulong*)lget(&(sc->inputs), 1), &sc->round);
// log the variables
log_call(sc);
@@ -738,7 +738,7 @@
// sync the disk
hjsync();
-
+
// execute the call
tsemacquire( *(long**)lget(&(sc->inputs), 0),
*(ulong*)lget(&(sc->inputs), 1) );
@@ -750,7 +750,7 @@
// sync the disk
hjsync();
-
+
// execute the call
wait();
@@ -761,7 +761,7 @@
// sync the disk
hjsync();
-
+
// execute the call
waitpid();
@@ -768,9 +768,9 @@
break;
case sc_write : // write(int : void* : long);
// mutate the input
- mut_int((int*)lget(&(sc->inputs), 0));
- mut_voidstar((void**)lget(&(sc->inputs), 1));
- mut_long((long*)lget(&(sc->inputs), 2));
+ mut_int((int*)lget(&(sc->inputs), 0), &sc->round);
+ mut_voidstar((void**)lget(&(sc->inputs), 1), &sc->round);
+ mut_long((long*)lget(&(sc->inputs), 2), &sc->round);
// log the variables
log_call(sc);
@@ -777,7 +777,7 @@
// sync the disk
hjsync();
-
+
// execute the call
write( *(int*)lget(&(sc->inputs), 0),
*(void**)lget(&(sc->inputs), 1),
@@ -786,9 +786,9 @@
break;
case sc_writev : // writev(int : IOchunk* : int);
// mutate the input
- mut_int((int*)lget(&(sc->inputs), 0));
- mut_IOchunkstar((IOchunk**)lget(&(sc->inputs), 1));
- mut_int((int*)lget(&(sc->inputs), 2));
+ mut_int((int*)lget(&(sc->inputs), 0), &sc->round);
+ mut_IOchunkstar((IOchunk**)lget(&(sc->inputs), 1), &sc->round);
+ mut_int((int*)lget(&(sc->inputs), 2), &sc->round);
// log the variables
log_call(sc);
@@ -795,7 +795,7 @@
// sync the disk
hjsync();
-
+
// execute the call
writev( *(int*)lget(&(sc->inputs), 0),
*(IOchunk**)lget(&(sc->inputs), 1),
@@ -804,9 +804,9 @@
break;
case sc_wstat : // wstat(char* : uchar* : int);
// mutate the input
- mut_charstar((char**)lget(&(sc->inputs), 0));
- mut_ucharstar((unsigned char**)lget(&(sc->inputs), 1));
- mut_int((int*)lget(&(sc->inputs), 2));
+ mut_charstar((char**)lget(&(sc->inputs), 0), &sc->round);
+ mut_ucharstar((unsigned char**)lget(&(sc->inputs), 1), &sc->round);
+ mut_int((int*)lget(&(sc->inputs), 2), &sc->round);
// log the variables
log_call(sc);
@@ -813,7 +813,7 @@
// sync the disk
hjsync();
-
+
// execute the call
wstat( *(char**)lget(&(sc->inputs), 0),
*(unsigned char**)lget(&(sc->inputs), 1),
@@ -822,8 +822,8 @@
break;
case sc_rendezvous : // rendezvous(void* : void*);
// mutate the input
- mut_voidstar((void**)lget(&(sc->inputs), 0));
- mut_voidstar((void**)lget(&(sc->inputs), 1));
+ mut_voidstar((void**)lget(&(sc->inputs), 0), &sc->round);
+ mut_voidstar((void**)lget(&(sc->inputs), 1), &sc->round);
// log the variables
log_call(sc);
@@ -830,7 +830,7 @@
// sync the disk
hjsync();
-
+
// execute the call
rendezvous( *(void**)lget(&(sc->inputs), 0),
*(void**)lget(&(sc->inputs), 1) );
@@ -838,7 +838,7 @@
break;
case sc_dirstat : // dirstat(char*);
// mutate the input
- mut_charstar((char**)lget(&(sc->inputs), 0));
+ mut_charstar((char**)lget(&(sc->inputs), 0), &sc->round);
// log the variables
log_call(sc);
@@ -845,7 +845,7 @@
// sync the disk
hjsync();
-
+
// execute the call
dirstat( *(char**)lget(&(sc->inputs), 0) );
@@ -852,7 +852,7 @@
break;
case sc_dirfstat : // dirfstat(int);
// mutate the input
- mut_int((int*)lget(&(sc->inputs), 0));
+ mut_int((int*)lget(&(sc->inputs), 0), &sc->round);
// log the variables
log_call(sc);
@@ -859,7 +859,7 @@
// sync the disk
hjsync();
-
+
// execute the call
dirfstat(*(int*)lget(&(sc->inputs), 0));
@@ -866,8 +866,8 @@
break;
case sc_dirwstat : // dirwstat(char* : Dir*);
// mutate the input
- mut_charstar((char**)lget(&(sc->inputs), 0));
- mut_dirstar((Dir**)lget(&(sc->inputs), 1));
+ mut_charstar((char**)lget(&(sc->inputs), 0), &sc->round);
+ mut_dirstar((Dir**)lget(&(sc->inputs), 1), &sc->round);
// log the variables
log_call(sc);
@@ -874,7 +874,7 @@
// sync the disk
hjsync();
-
+
// execute the call
dirwstat( *(char**)lget(&(sc->inputs), 0),
*(Dir**)lget(&(sc->inputs), 1) );
@@ -882,8 +882,8 @@
break;
case sc_dirfwstat : // dirfwstat(int : Dir*);
// mutate the input
- mut_int((int*)lget(&(sc->inputs), 0));
- mut_dirstar((Dir**)lget(&(sc->inputs), 1));
+ mut_int((int*)lget(&(sc->inputs), 0), &sc->round);
+ mut_dirstar((Dir**)lget(&(sc->inputs), 1), &sc->round);
// log the variables
log_call(sc);
@@ -890,7 +890,7 @@
// sync the disk
hjsync();
-
+
// execute the call
dirfwstat( *(int*)lget(&(sc->inputs), 0),
*(Dir**)lget(&(sc->inputs), 1) );
@@ -898,8 +898,8 @@
break;
case sc_dirread : // dirread(int : Dir**);
// mutate the input
- mut_int((int*)lget(&(sc->inputs), 0));
- mut_dirstar_star((Dir***)lget(&(sc->inputs), 1));
+ mut_int((int*)lget(&(sc->inputs), 0), &sc->round);
+ mut_dirstar_star((Dir***)lget(&(sc->inputs), 1), &sc->round);
// log the variables
log_call(sc);
@@ -906,7 +906,7 @@
// sync the disk
hjsync();
-
+
// execute the call
dirread( *(int*)lget(&(sc->inputs), 0),
*(Dir***)lget(&(sc->inputs), 1) );
@@ -914,7 +914,7 @@
break;
case sc_nulldir : // nulldir(Dir*);
// mutate the input
- mut_dirstar((Dir**)lget(&(sc->inputs), 0));
+ mut_dirstar((Dir**)lget(&(sc->inputs), 0), &sc->round);
// log the variables
log_call(sc);
@@ -921,7 +921,7 @@
// sync the disk
hjsync();
-
+
// execute the call
nulldir( *(Dir**)lget(&(sc->inputs), 0) );
@@ -928,8 +928,8 @@
break;
case sc_dirreadall : // dirreadall(int : Dir**);
// mutate the input
- mut_int((int*)lget(&(sc->inputs), 0));
- mut_dirstar_star((Dir***)lget(&(sc->inputs), 1));
+ mut_int((int*)lget(&(sc->inputs), 0), &sc->round);
+ mut_dirstar_star((Dir***)lget(&(sc->inputs), 1), &sc->round);
// log the variables
log_call(sc);
@@ -936,7 +936,7 @@
// sync the disk
hjsync();
-
+
// execute the call
dirreadall( *(int*)lget(&(sc->inputs), 0),
*(Dir***)lget(&(sc->inputs), 1) );
@@ -948,7 +948,7 @@
// sync the disk
hjsync();
-
+
// execute the call
getpid();
@@ -959,7 +959,7 @@
// sync the disk
hjsync();
-
+
// execute the call
getppid();
@@ -966,8 +966,8 @@
break;
case sc_rerrstr : // rerrstr(char* : uint);
// mutate the input
- mut_charstar((char**)lget(&(sc->inputs), 0));
- mut_uint((uint*)lget(&(sc->inputs), 1));
+ mut_charstar((char**)lget(&(sc->inputs), 0), &sc->round);
+ mut_uint((uint*)lget(&(sc->inputs), 1), &sc->round);
// log the variables
log_call(sc);
@@ -974,7 +974,7 @@
// sync the disk
hjsync();
-
+
// execute the call
rerrstr(*(char**)lget(&(sc->inputs), 0),
*(uint*)lget(&(sc->inputs), 1) );
@@ -986,7 +986,7 @@
// sync the disk
hjsync();
-
+
// execute the call
sysname();
@@ -1013,7 +1013,7 @@
t_type* ele = lget(&(sc->inputs), x);
dolog("\t\t%s : ", callnames[ele->t]);
-
+
switch(ele->t) {
case t_int :
dolog("t_int: %d\n", *(int*) ele->var);
--- a/mutate.c
+++ b/mutate.c
@@ -2,7 +2,7 @@
/* Removed as can't shift a void pointer since unknown size, ask Sean
void
-shift_val(void* in_val)
+shift_val(void* in_val, int *round)
{
int shifter = rand() % (4 + 1 - 0) + 0;
(*in_val) << shifter;
@@ -9,95 +9,211 @@
}
*/
+#ifndef ROUND_NUM
+#define ROUND_NUM 1
+#endif // ROUND_NUM
+
void
-mut_int(int* in_val)
+mut_int(int* in_val, int *round)
{
- (*in_val) << (rand() % (4 + 1 - 0) + 0);
- (*in_val) |= (rand() % (15 + 1 - 0) + 0);
+ if(*round == ROUND_NUM)
+ {
+ *in_val = rand();
+ }
+ else
+ {
+ (*in_val) << (rand() % (4 + 1 - 0) + 0);
+ (*in_val) |= (rand() % (15 + 1 - 0) + 0);
+ }
}
void
-mut_uint(unsigned int* in_val)
+mut_uint(unsigned int* in_val, int *round)
{
- (*in_val) << (rand() % (4 + 1 - 0) + 0);
- (*in_val) |= (rand() % (15 + 1 - 0) + 0);
+ if(*round == ROUND_NUM)
+ {
+ *in_val = rand();
+ }
+ else
+ {
+ (*in_val) << (rand() % (4 + 1 - 0) + 0);
+ (*in_val) |= (rand() % (15 + 1 - 0) + 0);
+ }
}
void
-mut_charstar(char** in_val)
+mut_charstar(char** in_val, int *round)
{
+ if(*round == ROUND_NUM)
+ {
+ //*in_val = rand();
+ }
+ else
+ {
+
+ }
}
void
-mut_ucharstar(unsigned char** in_val)
+mut_ucharstar(unsigned char** in_val, int *round)
{
+ if(*round == ROUND_NUM)
+ {
+ //*in_val = rand();
+ }
+ else
+ {
+ }
}
/*
void
-mut_charstar_arr(char*[]* in_val)
+mut_charstar_arr(char*[]* in_val, int *round)
{
+ if(*round == ROUND_NUM)
+ {
+ *in_val = rand();
+ }
+ else
+ {
int shifter = rand() % (4 + 1 - 0) + 0;
(*in_val) << shifter;
}*/
void
-mut_long(long* in_val)
+mut_long(long* in_val, int *round)
{
- (*in_val) << (rand() % (4 + 1 - 0) + 0);
- (*in_val) |= (rand() % (15 + 1 - 0) + 0);
+ if(*round == ROUND_NUM)
+ {
+ //*in_val = rand();
+ }
+ else
+ {
+ (*in_val) << (rand() % (4 + 1 - 0) + 0);
+ (*in_val) |= (rand() % (15 + 1 - 0) + 0);
+ }
}
void
-mut_longstar(long** in_val)
+mut_longstar(long** in_val, int *round)
{
+ if(*round == ROUND_NUM)
+ {
+ //*in_val = rand();
+ }
+ else
+ {
+ }
}
void
-mut_ulong(unsigned long* in_val)
+mut_ulong(unsigned long* in_val, int *round)
{
- (*in_val) << (rand() % (4 + 1 - 0) + 0);
- (*in_val) |= (rand() % (15 + 1 - 0) + 0);
+ if(*round == ROUND_NUM)
+ {
+ //*in_val = rand();
+ }
+ else
+ {
+ (*in_val) << (rand() % (4 + 1 - 0) + 0);
+ (*in_val) |= (rand() % (15 + 1 - 0) + 0);
+ }
}
void
-mut_vlong(long long* in_val)
+mut_vlong(long long* in_val, int *round)
{
- (*in_val) << (rand() % (4 + 1 - 0) + 0);
- (*in_val) |= (rand() % (15 + 1 - 0) + 0);
+ if(*round == ROUND_NUM)
+ {
+ //*in_val = rand();
+ }
+ else
+ {
+ (*in_val) << (rand() % (4 + 1 - 0) + 0);
+ (*in_val) |= (rand() % (15 + 1 - 0) + 0);
+ }
}
void
-mut_void(void* in_val)
+mut_void(void* in_val, int *round)
{
+ if(*round == ROUND_NUM)
+ {
+ //*in_val = rand();
+ }
+ else
+ {
+ }
}
void
-mut_voidstar(void** in_val)
+mut_voidstar(void** in_val, int *round)
{
+ if(*round == ROUND_NUM)
+ {
+ //*in_val = rand();
+ }
+ else
+ {
+ }
}
void
-mut_IOchunk(IOchunk* in_val)
-{
+mut_IOchunk(IOchunk* in_val, int *round)
+{
+ if(*round == ROUND_NUM)
+ {
+ //*in_val = rand();
+ }
+ else
+ {
+ }
}
void
-mut_IOchunkstar(IOchunk** in_val)
+mut_IOchunkstar(IOchunk** in_val, int *round)
{
+ if(*round == ROUND_NUM)
+ {
+ //*in_val = rand();
+ }
+ else
+ {
+ }
}
void
-mut_dir(Dir* in_val)
+mut_dir(Dir* in_val, int *round)
{
+ if(*round == ROUND_NUM)
+ {
+ //*in_val = rand();
+ }
+ else
+ {
+ }
}
void
-mut_dirstar(Dir** in_val)
-{
+mut_dirstar(Dir** in_val, int *round)
+{
+ if(*round == ROUND_NUM)
+ {
+ //*in_val = rand();
+ }
+ else
+ {
+ }
}
void
-mut_dirstar_star(Dir*** in_val)
+mut_dirstar_star(Dir*** in_val, int *round)
{
+ if(*round == ROUND_NUM)
+ {
+ //*in_val = rand();
+ }
+ else
+ {
+ }
}
--- a/mutate.h
+++ b/mutate.h
@@ -2,40 +2,40 @@
#define MUT_H
// Removed since we don't know the size of void pointer val, can't shift val
-//void shift_val(void*);
+//void shift_val(void*, *int);
-void mut_int(int*);
+void mut_int(int*, *int);
-void mut_uint(uint*);
+void mut_uint(uint*, *int);
-void mut_char(char*);
+void mut_char(char*, *int);
-void mut_charstar(char**);
+void mut_charstar(char**, *int);
-void mut_ucharstar(unsigned char**);
+void mut_ucharstar(unsigned char**, *int);
-//void mut_char_star_arr(char*[]*);
+//void mut_char_star_arr(char*[]*, *int);
-void mut_long(long*);
+void mut_long(long*, *int);
-void mut_longstar(long**);
+void mut_longstar(long**, *int);
-void mut_ulong(unsigned long*);
+void mut_ulong(unsigned long*, *int);
-void mut_vlong(long long*);
+void mut_vlong(long long*, *int);
-void mut_void(void*);
+void mut_void(void*, *int);
-void mut_voidstar(void**);
+void mut_voidstar(void**, *int);
-void mut_IOchunk(IOchunk*);
+void mut_IOchunk(IOchunk*, *int);
-void mut_IOchunkstar(IOchunk**);
+void mut_IOchunkstar(IOchunk**, *int);
-void mut_dir(Dir*);
+void mut_dir(Dir*, *int);
-void mut_dirstar(Dir**);
+void mut_dirstar(Dir**, *int);
-void mut_dirstar_star(Dir***);
+void mut_dirstar_star(Dir***, *int);
#endif