From d440c3f50a918a932293ad98bcec96eaa4683222 Mon Sep 17 00:00:00 2001 From: Pixel Date: Sun, 4 Dec 2011 01:19:09 -0800 Subject: 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. --- src/Local.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/Local.cc') 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(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; } -- cgit v1.2.3