Opened 11 years ago
Closed 10 years ago
#2332 closed defect (fixed)
Thread-safe runtime system
Reported by: | Martin Sjölund | Owned by: | Martin Sjölund |
---|---|---|---|
Priority: | high | Milestone: | 1.9.1 |
Component: | Run-time | Version: | trunk |
Keywords: | Cc: |
Description (last modified by )
This is a collection of non-threadsafe parts that we probably should resolve for bootstrapping if we want to run parallel omc:
- Message system (buffers)
- Jump buffers (setjmp; global, stack overflow, simulation stuff (less important))
- Java runtime (does anyone care?)
- Compiler/runtime: Need to consider error-buffers in parallel. Probably each thread wants its own error-stack to manipulate
- More?
Change History (7)
comment:1 by , 11 years ago
Owner: | changed from | to
---|---|
Status: | new → accepted |
comment:2 by , 11 years ago
comment:3 by , 11 years ago
pthread_rwlock_t
to lock most global variables (we write to them very rarely, but we should lock them anyway).
comment:4 by , 11 years ago
Description: | modified (diff) |
---|
comment:5 by , 11 years ago
An fast and dirty solution for external C functions would be to add an annotation __OpenModelica_Mutex=true
or __OpenModelica_Mutex="Name_of_Mutex"
to avoid several functions from using the same resource. It does not solve the problem of shared global roots or the error buffer (which some threads want to roll back).
comment:6 by , 10 years ago
The threadData is now used for most of these things, making many external functions possible to use in parallel.
comment:7 by , 10 years ago
Milestone: | 2.0.0 → 1.9.1 |
---|---|
Resolution: | → fixed |
Status: | accepted → closed |
Thread-local storage possible to mimic globals