]> feistymeow.org Git - feisty_meow.git/commitdiff
tracing issues with thread exits and stack tracker
authorFred T. Hamster <fred@feistymeow.org>
Tue, 17 Feb 2026 04:07:50 +0000 (23:07 -0500)
committerFred T. Hamster <fred@feistymeow.org>
Tue, 17 Feb 2026 04:07:50 +0000 (23:07 -0500)
nucleus/library/application/callstack_tracker.cpp
nucleus/library/basis/mutex.cpp

index eaae7eb41c65514ae7858a5caf5fcae1a0dea0fe..f0c9283cca05f92ea130955911dd0cbceb0e3695 100644 (file)
@@ -3,14 +3,14 @@
 *  Name   : callstack_tracker
 *  Author : Chris Koeritz
 *
-*******************************************************************************
-* Copyright (c) 2007-$now By Author.  This program is free software; you can  *
-* redistribute it and/or modify it under the terms of the GNU General Public  *
-* License as published by the Free Software Foundation; either version 2 of   *
-* the License or (at your option) any later version.  This is online at:      *
-*     http://www.fsf.org/copyleft/gpl.html                                    *
-* Please send any updates to: fred@gruntose.com                               *
-\*****************************************************************************/
+*
+* Copyright (c) 2007-$now By Author.  This program is free software; you can
+* redistribute it and/or modify it under the terms of the GNU General Public
+* License as published by the Free Software Foundation; either version 2 of
+* the License or (at your option) any later version.  This is online at:
+*     http://www.fsf.org/copyleft/gpl.html
+* Please send any updates to: fred@gruntose.com
+*/
 
 #ifdef ENABLE_CALLSTACK_TRACKING
 
@@ -65,9 +65,11 @@ callstack_tracker &thread_wide_stack_trace()
 #ifdef ENABLE_MEMORY_HOOK
     program_wide_memories().disable();
       /* we don't want infinite loops tracking the call stack during this object's construction. */
+
 //hmmm: does that disable the progwide memories for the whole program or just for this thread?
 //      and what does that entail exactly?
 //      did it actually fix the problem we saw?
+
 #endif
     _hidden_trace = new callstack_tracker;
 #ifdef ENABLE_MEMORY_HOOK
@@ -87,12 +89,14 @@ public:
 
 //////////////
 
-// our current depth gives us our position in the array.  we define our
-// stack as starting at element zero, which is a null stack entry and
-// corresponds to a depth of zero also.  then, when the stack depth is one,
-// we actually have an element in place and it resides at index 1.  this
-// scheme allows us to have an update to the line number just do nothing when
-// there is no current stack.
+/*
+  our current depth gives us our position in the array.  we define our
+  stack as starting at element zero, which is a null stack entry and
+  corresponds to a depth of zero also.  then, when the stack depth is one,
+  we actually have an element in place and it resides at index 1.  this
+  scheme allows us to have an update to the line number just do nothing when
+  there is no current stack.
+*/
 
 callstack_tracker::callstack_tracker()
 : _bt(new callstack_records),
index fce0bed90b3052c40a9232d7c5510dca8995bcac..795f361c025eeff11b2f5a430e93825050899098 100644 (file)
 * Please send any updates to: fred@gruntose.com                               *
 \*****************************************************************************/
 
-// NOTE: we are explicitly avoiding use of new and delete here because this
-//       class is needed by our memory allocation object, which would be
-//       providing the new and delete methods.
+/*
+  NOTE: we are explicitly avoiding use of new and delete here because this
+  class is needed by our memory allocation object, which would be providing
+  the new and delete methods.
+
+  this class also does not participate in the FUNCDEF macros or anything that
+  would trigger activity in the callstack_tracker, because that object also
+  needs to use mutexes.
+*/
 
 #include "mutex.h"