From 9ff70451b4fdd5004b7ba37da712014dc34855da Mon Sep 17 00:00:00 2001 From: bdemsky Date: Tue, 20 Oct 2009 00:47:56 +0000 Subject: [PATCH] small differences --- Robust/src/ClassLibrary/gnu/Double.java | 2 +- Robust/src/Runtime/STM/delaycomp.h | 2 +- Robust/src/Runtime/runtime.c | 15 +++++++++++++++ Robust/src/Runtime/thread.c | 12 ++++++++++-- 4 files changed, 27 insertions(+), 4 deletions(-) diff --git a/Robust/src/ClassLibrary/gnu/Double.java b/Robust/src/ClassLibrary/gnu/Double.java index 19f50841..93ab44ca 100644 --- a/Robust/src/ClassLibrary/gnu/Double.java +++ b/Robust/src/ClassLibrary/gnu/Double.java @@ -287,7 +287,7 @@ public final class Double extends Number //implements Comparable } public static native double nativeparsedouble(String str); - + public static native double nativeparsedouble(byte[] str, int start, int length); /** * Return true if the double has the same diff --git a/Robust/src/Runtime/STM/delaycomp.h b/Robust/src/Runtime/STM/delaycomp.h index fcf081a6..3b9c980d 100644 --- a/Robust/src/Runtime/STM/delaycomp.h +++ b/Robust/src/Runtime/STM/delaycomp.h @@ -15,7 +15,7 @@ struct pointerlist { void * prev; void * array[MAXPOINTERS]; int maxcount; - void * buffer[1024]; + int buffer[2048]; }; struct primitivelist { diff --git a/Robust/src/Runtime/runtime.c b/Robust/src/Runtime/runtime.c index f914431e..142e1204 100644 --- a/Robust/src/Runtime/runtime.c +++ b/Robust/src/Runtime/runtime.c @@ -140,6 +140,21 @@ double CALL01(___Double______nativeparsedouble____L___String___,struct ___String } #endif +#ifdef D___Double______nativeparsedouble_____AR_B_I_I +double CALL23(___Double______nativeparsedouble_____AR_B_I_I, int start, int length,int start,int length,struct ArrayObject * ___str___) { + int maxlength=(length>60)?60:length; + char str[maxlength+1]; + struct ArrayObject * bytearray=VAR(___str___); + int i; + for(i=0; i___length___)+sizeof(int))[i+start]; + } + str[i]=0; + double d=atof(str); + return d; +} +#endif + #ifdef D___String______convertdoubletochar____D__AR_C int CALL12(___String______convertdoubletochar____D__AR_C, double ___val___, double ___val___, struct ArrayObject ___chararray___) { int length=VAR(___chararray___)->___length___; diff --git a/Robust/src/Runtime/thread.c b/Robust/src/Runtime/thread.c index 3632b361..47704013 100644 --- a/Robust/src/Runtime/thread.c +++ b/Robust/src/Runtime/thread.c @@ -202,7 +202,7 @@ void initializethreads() { #ifdef STMARRAY arraystack.count=0; #endif - int a=mprotect((downpage(&ptrstack.buffer[0])), 4096, PROT_NONE); + int a=mprotect((downpage(&ptrstack.buffer[1024])), 4096, PROT_NONE); if (a==-1) perror("ptrstack"); a=mprotect(downpage(&primstack.array[MAXVALUES]), 4096, PROT_NONE); @@ -303,7 +303,7 @@ void initthread(struct ___Thread___ * ___this___) { #ifdef STMARRAY arraystack.count=0; #endif - int a=mprotect(downpage(&ptrstack.buffer[0]), 4096, PROT_NONE); + int a=mprotect(downpage(&ptrstack.buffer[1024]), 4096, PROT_NONE); if (a==-1) perror("ptrstack"); a=mprotect(downpage(&primstack.array[MAXVALUES]), 4096, PROT_NONE); @@ -374,6 +374,14 @@ void CALL00(___Thread______yield____) { } #endif +#ifdef D___Thread______abort____ +void CALL00(___Thread______abort____) { +#ifdef SANDBOX + _longjmp(aborttrans,1); +#endif +} +#endif + #ifdef DSTM #ifdef RECOVERY // return if the machine is dead -- 2.34.1