summaryrefslogtreecommitdiff
path: root/src/Local.cc
diff options
context:
space:
mode:
authorPixel <pixel@nobis-crew.org>2011-12-04 01:19:09 -0800
committerPixel <pixel@nobis-crew.org>2011-12-04 01:20:10 -0800
commitd440c3f50a918a932293ad98bcec96eaa4683222 (patch)
tree33e8e42a8e4506ae9da70cdb44dd133bde7f7219 /src/Local.cc
parente5577eb7a643ce7885e5d14660a6d24254161622 (diff)
Reworked some things in the architecture, mainly exceptions and asserts.
-) Removed Assert() -) Added AAssert(), IAssert(), RAssert(), TAssert() and Failure() -) Reworked all asserts in the code, and added meaningful messages to them. -) Changed the way the startup code is generated; BALAU_STARTUP is no longer necessary.
Diffstat (limited to 'src/Local.cc')
-rw-r--r--src/Local.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/Local.cc b/src/Local.cc
index 805ecdb..9729c35 100644
--- a/src/Local.cc
+++ b/src/Local.cc
@@ -24,7 +24,6 @@ int Balau::Local::s_size = 0;
void ** Balau::Local::m_globals = 0;
void Balau::Local::doStart() {
- Assert(Main::status() == Main::STARTING);
m_idx = s_size++;
m_globals = reinterpret_cast<void **>(realloc(m_globals, s_size * sizeof(void *)));
m_globals[m_idx] = 0;
@@ -46,7 +45,7 @@ void PThreadsTLSManager::doStart() {
int r;
r = pthread_key_create(&m_key, NULL);
- Assert(r == 0);
+ RAssert(r == 0, "Unable to create a pthtread_key: %i", r);
Balau::g_tlsManager = this;
}