<commit_before>#include "kernel.h"
#include "storage.h"
#include "sampling.h"
#include <arch/dev/Display.h>

#include <cassert>
#include <algorithm>
#include <cstdarg>
#include <iostream>
#include <iomanip>
#include <sstream>
#include <set>
#include <map>
#include <cstdio>

using namespace std;

namespace Simulator
{

//
// Process class
//

void Process::Deactivate()
{
    // A process can be sensitive to multiple objects, so we only remove it from the list
    // if the count becomes zero
    if (--m_activations == 0)
    {
        // Remove the handle node from the list
        *m_pPrev = m_next;
        if (m_next != NULL) {
            m_next->m_pPrev = m_pPrev;
        }
        m_state = STATE_IDLE;
    }
}

std::set<const Process*> Process::m_registry;

Process::Process(Object& parent, const string& name, const delegate& delegate)
    : m_name(parent.GetName() + ":" + name),
      m_delegate(delegate),
      m_state(STATE_IDLE),
      m_activations(0),
      m_next(0),
      m_pPrev(0),
#if !defined(NDEBUG) && !defined(DISABLE_TRACE_CHECKS)<commit_msg>Kill a compiler warning about a shadowed definition.<commit_after>#include "kernel.h"
#include "storage.h"
#include "sampling.h"
#include <arch/dev/Display.h>

#include <cassert>
#include <algorithm>
#include <cstdarg>
#include <iostream>
#include <iomanip>
#include <sstream>
#include <set>
#include <map>
#include <cstdio>

using namespace std;

namespace Simulator
{

//
// Process class
//

void Process::Deactivate()
{
    // A process can be sensitive to multiple objects, so we only remove it from the list
    // if the count becomes zero
    if (--m_activations == 0)
    {
        // Remove the handle node from the list
        *m_pPrev = m_next;
        if (m_next != NULL) {
            m_next->m_pPrev = m_pPrev;
        }
        m_state = STATE_IDLE;
    }
}

std::set<const Process*> Process::m_registry;

Process::Process(Object& parent, const string& name, const delegate& d)
    : m_name(parent.GetName() + ":" + name),
      m_delegate(d),
      m_state(STATE_IDLE),
      m_activations(0),
      m_next(0),
      m_pPrev(0),
#if !defined(NDEBUG) && !defined(DISABLE_TRACE_CHECKS)
{'fraction_non_alphanumeric': 0.13367018833256775, 'fraction_numerical': 0.0036747818098300414, 'mean_word_length': 3.229126213592233, 'pattern_counts': {'":': 2, '<': 25, '<?xml version=': 0, '>': 27, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4283303', 'n_tokens_mistral': 752, 'n_tokens_neox': 743, 'n_words': 198}