- Timestamp:
- Sep 13, 2018, 3:51:18 PM (6 years ago)
- Location:
- branches/prototype-v0/zoo-project/zoo-kernel
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/prototype-v0/zoo-project/zoo-kernel/service_internal_js.c
r863 r882 157 157 return 1; 158 158 if (!JS_DefineFunction(cx, global, "alert", JSAlert, 2, 0)) 159 return 1; 160 if (!JS_DefineFunction(cx, global, "sleep", JSSleep, 1, 0)) 159 161 return 1; 160 162 if (!JS_DefineFunction(cx, global, "importScripts", JSLoadScripts, 1, 0)) … … 1027 1029 } 1028 1030 1031 /** 1032 * The function used as sleep from the JavaScript environment 1033 * (ZOO-API). 1034 * 1035 * @param cx the JavaScript context 1036 * @param argc the number of parameters 1037 * @param argv1 the parameter values 1038 * @return true 1039 */ 1040 JSBool 1041 JSSleep(JSContext *cx, uintN argc, jsval *argv1) 1042 { 1043 jsval *argv = JS_ARGV(cx,argv1); 1044 JS_MaybeGC(cx); 1045 int isleep=0; 1046 if(JS_ValueToInt32(cx,argv[0],&isleep)==JS_TRUE){ 1047 zSleep(isleep); 1048 } 1049 JS_MaybeGC(cx); 1050 return JS_TRUE; 1051 } 1052 -
branches/prototype-v0/zoo-project/zoo-kernel/service_internal_js.h
r580 r882 49 49 JSBool JSRequest(JSContext*, uintN, jsval*); 50 50 JSBool JSUpdateStatus(JSContext*,uintN,jsval *); 51 JSBool JSSleep(JSContext*,uintN,jsval *); 51 52 52 53 void reportError(JSContext *cx, const char *message, JSErrorReport *report); -
branches/prototype-v0/zoo-project/zoo-kernel/zoo_service_loader.c
r881 r882 2568 2568 }else{ 2569 2569 map* testMap=getMapFromMaps(m,"main","memory"); 2570 if(testMap !=NULL &&strcasecmp(testMap->value,"load")!=0)2570 if(testMap==NULL || strcasecmp(testMap->value,"load")!=0) 2571 2571 dumpMapsValuesToFiles(&m,&request_input_real_format); 2572 2572 loadServiceAndRun (&m, s1, request_inputs,
Note: See TracChangeset
for help on using the changeset viewer.