Changeset 16955
- Timestamp:
- 2013-08-31T18:47:34+02:00 (11 years ago)
- Location:
- trunk
- Files:
-
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Makefile.common
r16615 r16955 84 84 cp -pP $< $@ 85 85 3rdParty/gc-7.2/Makefile: 3rdParty/gc-7.2/Makefile.in 3rdParty/gc-7.2/configure 86 (cd 3rdParty/gc-7.2 && ./configure --enable-large-config CC="$(CC)" CXX="$(CXX)" CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)")86 (cd 3rdParty/gc-7.2 && ./configure $(GC_THREADS) --enable-large-config CC="$(CC)" CXX="$(CXX)" CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS) -DTHREAD_LOCAL_ALLOC -DPARALLEL_MARK") 87 87 88 88 fmi: interactive -
trunk/Makefile.in
r16836 r16955 25 25 LINK=@LINK@ 26 26 MSL_EXTRA_ARGS=@MSL_EXTRA_ARGS@ 27 GC_THREADS=--enable-threds=posix 27 28 28 29 include Makefile.common -
trunk/SimulationRuntime/c/Makefile.common
r16793 r16955 7 7 include Makefile.objs 8 8 9 CPPFLAGS = -g -I. -I$(UTILPATH) -I. -I$(METAPATH) -I$(METAPATH)gc $(LIBF2CINC) -I$(top_builddir)/3rdParty/gc-7.2/include -I$(top_builddir)/3rdParty/FMIL/install/include/ $(CONFIG_CPPFLAGS) 9 CPPFLAGS = -g -I. -I$(UTILPATH) -I. -I$(METAPATH) -I$(METAPATH)gc $(LIBF2CINC) -I$(top_builddir)/3rdParty/gc-7.2/include -I$(top_builddir)/3rdParty/FMIL/install/include/ $(CONFIG_CPPFLAGS) -DGC_REDIRECT_TO_LOCAL 10 10 CFLAGS = $(CPPFLAGS) $(CONFIG_CFLAGS) $(EXTRA_CFLAGS) 11 11 CXXFLAGS = $(CFLAGS) -
trunk/SimulationRuntime/c/meta/gc/generational.c
r15963 r16955 82 82 #include "generational.h" 83 83 84 #ifdef _MMC_GC_ 85 84 86 /*#undef NDEBUG*/ 85 87 #include <assert.h> … … 1038 1040 } 1039 1041 1040 1041 1042 #endif -
trunk/SimulationRuntime/c/meta/gc/generational.h
r15963 r16955 48 48 49 49 #include "modelica.h" 50 #include "mmc_gc.h" 50 51 51 52 /* the allocated from C region */ -
trunk/SimulationRuntime/c/meta/gc/marksweep.c
r15963 r16955 41 41 42 42 #include "modelica.h" 43 #include "mmc_gc.h" 43 44 44 45 #if defined(_MMC_GC_) … … 593 594 static mmc_GC_state_type x_mmc_GC_state; 594 595 mmc_GC_state_type *mmc_GC_state = &x_mmc_GC_state; 595 mmc_GC_local_state_type dummy_local_GC_state = 0;596 596 597 597 /* primary allocation routine for MetaModelica */ … … 605 605 static mmc_GC_state_type x_mmc_GC_state; 606 606 mmc_GC_state_type *mmc_GC_state = &x_mmc_GC_state; 607 mmc_GC_local_state_type dummy_local_GC_state = 0;608 607 609 608 void *mmc_alloc_bytes(unsigned nbytes) … … 655 654 return 0; 656 655 } 657 -
trunk/SimulationRuntime/c/meta/gc/mmc_gc.h
r15963 r16955 121 121 #if defined(_MMC_USE_BOEHM_GC_) /* use the BOEHM Garbage collector */ 122 122 123 extern mmc_GC_local_state_type dummy_local_GC_state;124 125 123 #define LARGE_CONFIG 126 124 #include <gc.h> … … 132 130 133 131 #else /* NO_GC */ 134 135 extern mmc_GC_local_state_type dummy_local_GC_state;136 132 137 133 #define mmc_GC_init(settings) -
trunk/SimulationRuntime/c/meta/gc/roots.h
r15963 r16955 97 97 #define mmc_GC_add_root(A,B,C) 98 98 #define mmc_GC_add_roots(p, n, local_GC_state, name) 99 #define mmc_GC_save_roots_state(name) ( dummy_local_GC_state)99 #define mmc_GC_save_roots_state(name) (0) 100 100 #define mmc_GC_undo_roots_state(local_GC_state) 101 101 #define mmc_GC_unwind_roots_state(local_GC_state) -
trunk/SimulationRuntime/c/meta/meta_modelica.h
r16910 r16955 236 236 #define mmc_mk_bcon(X) ((X) != 0 ? MMC_TRUE : MMC_FALSE) 237 237 238 static inlinevoid* mmc_mk_icon(mmc_sint_t i)238 static void* mmc_mk_icon(mmc_sint_t i) 239 239 { 240 240 return MMC_IMMEDIATE(MMC_TAGFIXNUM(i)); … … 247 247 mmc_uint_t data[2]; 248 248 }; 249 static inlinedouble mmc_prim_get_real(void *p)249 static double mmc_prim_get_real(void *p) 250 250 { 251 251 union mmc_double_as_words u; … … 257 257 } 258 258 259 static inlinevoid mmc_prim_set_real(struct mmc_real *p, double d)259 static void mmc_prim_set_real(struct mmc_real *p, double d) 260 260 { 261 261 union mmc_double_as_words u; … … 268 268 } 269 269 270 static inlinevoid* mmc_mk_scon(const char *s)270 static void* mmc_mk_scon(const char *s) 271 271 { 272 272 unsigned nbytes = strlen(s); … … 291 291 } 292 292 293 static inlinevoid* mmc_mk_scon_len(unsigned nbytes)293 static void* mmc_mk_scon_len(unsigned nbytes) 294 294 { 295 295 unsigned header = MMC_STRINGHDR(nbytes); … … 305 305 char* mmc_mk_scon_len_ret_ptr(size_t nbytes); 306 306 307 static inlinevoid *mmc_mk_box0(unsigned ctor)307 static void *mmc_mk_box0(unsigned ctor) 308 308 { 309 309 struct mmc_struct *p = (struct mmc_struct *) mmc_alloc_words(1); … … 315 315 } 316 316 317 static inlinevoid *mmc_mk_box1(unsigned ctor, void *x0)317 static void *mmc_mk_box1(unsigned ctor, void *x0) 318 318 { 319 319 mmc_GC_add_roots(&x0, 1, 0, ""); … … 331 331 void printAny(void* any); 332 332 333 static inlinevoid *mmc_mk_box2(unsigned ctor, void *x0, void *x1)333 static void *mmc_mk_box2(unsigned ctor, void *x0, void *x1) 334 334 { 335 335 mmc_GC_add_roots(&x0, 1, 0, ""); … … 350 350 } 351 351 352 static inlinevoid *mmc_mk_box3(unsigned ctor, void *x0, void *x1, void *x2)352 static void *mmc_mk_box3(unsigned ctor, void *x0, void *x1, void *x2) 353 353 { 354 354 mmc_GC_add_roots(&x0, 1, 0, ""); … … 371 371 } 372 372 373 static inlinevoid *mmc_mk_box4(unsigned ctor, void *x0, void *x1, void *x2, void *x3)373 static void *mmc_mk_box4(unsigned ctor, void *x0, void *x1, void *x2, void *x3) 374 374 { 375 375 mmc_GC_add_roots(&x0, 1, 0, ""); … … 393 393 } 394 394 395 static inlinevoid *mmc_mk_box5(unsigned ctor, void *x0, void *x1, void *x2, void *x3, void *x4)395 static void *mmc_mk_box5(unsigned ctor, void *x0, void *x1, void *x2, void *x3, void *x4) 396 396 { 397 397 mmc_GC_add_roots(&x0, 1, 0, ""); … … 417 417 } 418 418 419 static inlinevoid *mmc_mk_box6(unsigned ctor, void *x0, void *x1, void *x2, void *x3, void *x4, void *x5)419 static void *mmc_mk_box6(unsigned ctor, void *x0, void *x1, void *x2, void *x3, void *x4, void *x5) 420 420 { 421 421 mmc_GC_add_roots(&x0, 1, 0, ""); … … 443 443 } 444 444 445 static inlinevoid *mmc_mk_box7(unsigned ctor, void *x0, void *x1, void *x2, void *x3, void *x4, void *x5, void *x6)445 static void *mmc_mk_box7(unsigned ctor, void *x0, void *x1, void *x2, void *x3, void *x4, void *x5, void *x6) 446 446 { 447 447 mmc_GC_add_roots(&x0, 1, 0, ""); … … 471 471 } 472 472 473 static inlinevoid *mmc_mk_box8(unsigned ctor, void *x0, void *x1, void *x2, void *x3, void *x4, void *x5, void *x6, void *x7)473 static void *mmc_mk_box8(unsigned ctor, void *x0, void *x1, void *x2, void *x3, void *x4, void *x5, void *x6, void *x7) 474 474 { 475 475 mmc_GC_add_roots(&x0, 1, 0, ""); … … 501 501 } 502 502 503 static inlinevoid *mmc_mk_box9(unsigned ctor, void *x0, void *x1, void *x2, void *x3, void *x4, void *x5, void *x6, void *x7, void *x8)503 static void *mmc_mk_box9(unsigned ctor, void *x0, void *x1, void *x2, void *x3, void *x4, void *x5, void *x6, void *x7, void *x8) 504 504 { 505 505 mmc_GC_add_roots(&x0, 1, 0, ""); … … 533 533 } 534 534 535 static inlinevoid *mmc_mk_box(int slots, unsigned ctor, ...)535 static void *mmc_mk_box(int slots, unsigned ctor, ...) 536 536 { 537 537 int i; … … 570 570 #define MMC_CONS_CTOR 1 571 571 572 static inlinevoid *mmc_mk_cons(void *car, void *cdr)572 static void *mmc_mk_cons(void *car, void *cdr) 573 573 { 574 574 return mmc_mk_box2(MMC_CONS_CTOR, car, cdr); 575 575 } 576 576 577 static inlinevoid *mmc_mk_some(void *x)577 static void *mmc_mk_some(void *x) 578 578 { 579 579 return mmc_mk_box1(1, x); -
trunk/SimulationRuntime/c/simulation/simulation_runtime.cpp
r16918 r16955 1003 1003 void (*omc_terminate)(FILE_INFO info, const char *msg, ...) = omc_terminate_simulation; 1004 1004 void (*omc_throw)() = omc_throw_simulation; 1005 1006 /* simulation JumpBuffer */ 1007 jmp_buf simulationJmpbuf; 1008 1009 /* integrator JumpBuffer */ 1010 jmp_buf integratorJmpbuf; 1011 1012 /* indicates the current possible jump place */ 1013 int currectJumpState; -
trunk/SimulationRuntime/c/simulation/simulation_runtime.h
r16918 r16955 2 2 * This file is part of OpenModelica. 3 3 * 4 * Copyright (c) 1998-CurrentYear, Linköping University,5 * Department of Computer and Information Science,4 * Copyright (c) 1998-CurrentYear, Open Source Modelica Consortium (OSMC), 5 * c/o Linköpings universitet, Department of Computer and Information Science, 6 6 * SE-58183 Linköping, Sweden. 7 7 * 8 8 * All rights reserved. 9 9 * 10 * THIS PROGRAM IS PROVIDED UNDER THE TERMS OF GPL VERSION 3 11 * AND THIS OSMC PUBLIC LICENSE (OSMC-PL). 12 * ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS PROGRAM CONSTITUTES RECIPIENT'S 13 * ACCEPTANCE OF THE OSMC PUBLIC LICENSE. 10 * THIS PROGRAM IS PROVIDED UNDER THE TERMS OF THE BSD NEW LICENSE OR THE 11 * GPL VERSION 3 LICENSE OR THE OSMC PUBLIC LICENSE (OSMC-PL) VERSION 1.2. 12 * ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS PROGRAM CONSTITUTES 13 * RECIPIENT'S ACCEPTANCE OF THE OSMC PUBLIC LICENSE OR THE GPL VERSION 3, 14 * ACCORDING TO RECIPIENTS CHOICE. 15 * 16 * The OpenModelica software and the OSMC (Open Source Modelica Consortium) 17 * Public License (OSMC-PL) are obtained from OSMC, either from the above 18 * address, from the URLs: http://www.openmodelica.org or 19 * http://www.ida.liu.se/projects/OpenModelica, and in the OpenModelica 20 * distribution. GNU version 3 is obtained from: 21 * http://www.gnu.org/copyleft/gpl.html. The New BSD License is obtained from: 22 * http://www.opensource.org/licenses/BSD-3-Clause. 14 23 * 15 * The OpenModelica software and the Open Source Modelica 16 * Consortium (OSMC) Public License (OSMC-PL) are obtained 17 * from Linköping University, either from the above address, 18 * from the URLs: http://www.ida.liu.se/projects/OpenModelica or 19 * http://www.openmodelica.org, and in the OpenModelica distribution. 20 * GNU version 3 is obtained from: http://www.gnu.org/copyleft/gpl.html. 21 * 22 * This program is distributed WITHOUT ANY WARRANTY; without 23 * even the implied warranty of MERCHANTABILITY or FITNESS 24 * FOR A PARTICULAR PURPOSE, EXCEPT AS EXPRESSLY SET FORTH 25 * IN THE BY RECIPIENT SELECTED SUBSIDIARY LICENSE CONDITIONS 26 * OF OSMC-PL. 27 * 28 * See the full OSMC Public License conditions for more details. 24 * This program is distributed WITHOUT ANY WARRANTY; without even the implied 25 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE, EXCEPT AS 26 * EXPRESSLY SET FORTH IN THE BY RECIPIENT SELECTED SUBSIDIARY LICENSE 27 * CONDITIONS OF OSMC-PL. 29 28 * 30 29 */ … … 105 104 extern void communicateStatus(const char *phase, double completionPercent); 106 105 106 /* simulation JumpBuffer */ 107 extern jmp_buf simulationJmpbuf; 108 109 /* integrator JumpBuffer */ 110 extern jmp_buf integratorJmpbuf; 111 112 /* indicates the current possible jump place */ 113 extern int currectJumpState; 114 107 115 #ifdef __cplusplus 108 116 } -
trunk/SimulationRuntime/c/simulation/solver/nonlinearSystem.c
r16387 r16955 44 44 #include "blaswrap.h" 45 45 #include "f2c.h" 46 #include "simulation_runtime.h" 47 48 /* nonlinear JumpBuffer */ 49 jmp_buf nonlinearJmpbuf; 46 50 47 51 extern doublereal enorm_(integer *n, doublereal *x); -
trunk/SimulationRuntime/c/simulation/solver/nonlinearSystem.h
r16289 r16955 74 74 double extraPolate(DATA *data, double old1, double old2); 75 75 76 /* nonlinear JumpBuffer */ 77 extern jmp_buf nonlinearJmpbuf; 78 76 79 #endif -
trunk/SimulationRuntime/c/util/java_interface.c
r15963 r16955 63 63 #endif 64 64 65 const char* JAVA_MODELICA_ARRAY = "org/openmodelica/ModelicaArray";66 const char* JAVA_MODELICA_INTEGER = "org/openmodelica/ModelicaInteger";67 const char* JAVA_MODELICA_REAL = "org/openmodelica/ModelicaReal";68 const char* JAVA_MODELICA_BOOLEAN = "org/openmodelica/ModelicaBoolean";69 const char* JAVA_MODELICA_STRING = "org/openmodelica/ModelicaString";70 const char* JAVA_MODELICA_RECORD = "org/openmodelica/ModelicaRecord";71 const char* JAVA_MODELICA_OMCRECORD = "org/openmodelica/OMCModelicaRecord";72 const char* JAVA_MODELICA_TUPLE = "org/openmodelica/ModelicaTuple";73 const char* JAVA_MODELICA_OPTION = "org/openmodelica/ModelicaOption";74 char* classPath;75 76 int inside_exception = 0;77 78 GetCreatedJavaVMsFunc OMC_GetCreatedJavaVMs = NULL;79 CreateJavaVMFunc OMC_CreateJavaVM = NULL;65 static const char* JAVA_MODELICA_ARRAY = "org/openmodelica/ModelicaArray"; 66 static const char* JAVA_MODELICA_INTEGER = "org/openmodelica/ModelicaInteger"; 67 static const char* JAVA_MODELICA_REAL = "org/openmodelica/ModelicaReal"; 68 static const char* JAVA_MODELICA_BOOLEAN = "org/openmodelica/ModelicaBoolean"; 69 static const char* JAVA_MODELICA_STRING = "org/openmodelica/ModelicaString"; 70 static const char* JAVA_MODELICA_RECORD = "org/openmodelica/ModelicaRecord"; 71 static const char* JAVA_MODELICA_OMCRECORD = "org/openmodelica/OMCModelicaRecord"; 72 static const char* JAVA_MODELICA_TUPLE = "org/openmodelica/ModelicaTuple"; 73 static const char* JAVA_MODELICA_OPTION = "org/openmodelica/ModelicaOption"; 74 static char* classPath; 75 76 static int inside_exception = 0; 77 78 static GetCreatedJavaVMsFunc OMC_GetCreatedJavaVMs = NULL; 79 static CreateJavaVMFunc OMC_CreateJavaVM = NULL; 80 80 81 81 -
trunk/SimulationRuntime/c/util/omc_error.c
r16387 r16955 38 38 /* Global JumpBuffer */ 39 39 jmp_buf globalJmpbuf; 40 41 /* simulation JumpBuffer */42 jmp_buf simulationJmpbuf;43 44 /* integrator JumpBuffer */45 jmp_buf integratorJmpbuf;46 47 /* nonlinear JumpBuffer */48 jmp_buf nonlinearJmpbuf;49 50 /* indicates the current possible jump place */51 int currectJumpState;52 40 53 41 const int firstOMCErrorStream = 3; -
trunk/SimulationRuntime/c/util/omc_error.h
r16765 r16955 64 64 /* global JumpBuffer */ 65 65 extern jmp_buf globalJmpbuf; 66 67 /* simulation JumpBuffer */68 extern jmp_buf simulationJmpbuf;69 70 /* integrator JumpBuffer */71 extern jmp_buf integratorJmpbuf;72 73 /* nonlinear JumpBuffer */74 extern jmp_buf nonlinearJmpbuf;75 76 /* indicates the current possible jump place */77 extern int currectJumpState;78 66 79 67 enum ERROR_HANDLE
Note: See TracChangeset
for help on using the changeset viewer.