Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
OpenWalnut
OpenWalnut Core
Commits
a3f66385
Commit
a3f66385
authored
Feb 25, 2010
by
Sebastian Eichelbaum
Browse files
[CHANGE] - fixed some issues with project loader
parent
f5a98b3d
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
5 deletions
+22
-5
src/OpenWalnut.cpp
src/OpenWalnut.cpp
+0
-3
src/kernel/WKernel.cpp
src/kernel/WKernel.cpp
+1
-1
src/kernel/WModule.cpp
src/kernel/WModule.cpp
+9
-1
src/kernel/WModuleProjectFileCombiner.cpp
src/kernel/WModuleProjectFileCombiner.cpp
+12
-0
No files found.
src/OpenWalnut.cpp
View file @
a3f66385
...
...
@@ -24,9 +24,6 @@
#include <iostream>
#include <boost/lexical_cast.hpp>
#include <boost/filesystem.hpp>
#include "common/WSegmentationFault.h"
#include "common/WLogger.h"
...
...
src/kernel/WKernel.cpp
View file @
a3f66385
...
...
@@ -184,7 +184,7 @@ void WKernel::threadMain()
}
// TODO(ebaum): remove!
WModuleProjectFileCombiner
mc
=
WModuleProjectFileCombiner
(
"/home/
ebaum
/test.prj"
);
WModuleProjectFileCombiner
mc
=
WModuleProjectFileCombiner
(
"/home/
seth
/test.prj"
);
mc
.
apply
();
// actually there is nothing more to do here
...
...
src/kernel/WModule.cpp
View file @
a3f66385
...
...
@@ -357,10 +357,14 @@ void WModule::threadMain()
}
catch
(
const
WException
&
e
)
{
WLogger
::
getLogger
()
->
addLogMessage
(
"WException. Notifying."
,
"Module ("
+
getName
()
+
")"
,
LL_ERROR
);
wlog
::
error
(
"Module ("
+
getName
()
+
")"
)
<<
"WException. Notifying. Message: "
<<
e
.
what
(
);
// ensure proper exception propagation
signal_error
(
shared_from_this
(),
e
);
// module needs to be marked as ready or waiting threads (container, kernel) might wait for ever if the exception was thrown before
// ready().
ready
();
}
catch
(
const
std
::
exception
&
e
)
{
...
...
@@ -369,6 +373,10 @@ void WModule::threadMain()
// convert these exceptions to WException
WException
ce
=
WException
(
e
);
signal_error
(
shared_from_this
(),
ce
);
// module needs to be marked as ready or waiting threads (container, kernel) might wait for ever if the exception was thrown before
// ready().
ready
();
}
}
...
...
src/kernel/WModuleProjectFileCombiner.cpp
View file @
a3f66385
...
...
@@ -188,6 +188,13 @@ void WModuleProjectFileCombiner::apply()
m_container
->
add
(
(
*
iter
).
second
);
}
// now wait for the modules to get ready. We could have waited for this in the previous loop, but a long loading module would block others.
// -> so we wait after adding and starting them
for
(
std
::
map
<
unsigned
int
,
boost
::
shared_ptr
<
WModule
>
>::
const_iterator
iter
=
modules
.
begin
();
iter
!=
modules
.
end
();
++
iter
)
{
(
*
iter
).
second
->
isReady
().
wait
();
}
// and finally, connect them all together
for
(
std
::
list
<
Connection
>::
const_iterator
iter
=
connections
.
begin
();
iter
!=
connections
.
end
();
++
iter
)
{
...
...
@@ -253,5 +260,10 @@ void WModuleProjectFileCombiner::apply()
continue
;
}
}
// clear all our lists (deref all contained pointers)
modules
.
clear
();
connections
.
clear
();
properties
.
clear
();
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment