Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 0 additions & 46 deletions include/mcmini/MCDeferred.h

This file was deleted.

4 changes: 1 addition & 3 deletions include/mcmini/mcmini_private.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#ifndef INCLUDE_MCMINI_MCMINI_PRIVATE_HPP
#define INCLUDE_MCMINI_MCMINI_PRIVATE_HPP

#include "mcmini/config.h"
#include "mcmini/MCDeferred.h"
#include "mcmini/MCShared.h"
#include "mcmini/MCSharedTransition.h"
#include "mcmini/MCStack.h"
Expand Down Expand Up @@ -200,7 +198,7 @@ void mc_initialize_shared_memory_globals();
* point in time. As a trace process evolves and executes more
* transitions, the state is updated to reflect this fact.
*/
extern MCDeferred<MCStack> programState;
extern MCStack *programState;

/**
* @brief Initialize the global program state object `programState`
Expand Down
1 change: 0 additions & 1 deletion include/mcmini/objects/MCMutex.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#ifndef INCLUDE_MCMINI_OBJECTS_MCMUTEX_HPP
#define INCLUDE_MCMINI_OBJECTS_MCMUTEX_HPP

#include "mcmini/misc/MCOptional.h"
#include "mcmini/objects/MCVisibleObject.h"

struct MCMutexShadow {
Expand Down
8 changes: 5 additions & 3 deletions src/mcmini_private.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ const size_t shmAllocationSize =
(sizeof(*shmTransitionTypeInfo) + MAX_SHARED_MEMORY_ALLOCATION);

/* Program state */
MCDeferred<MCStack> programState;
MCStack *programState;

void
alarm_handler(int sig)
Expand Down Expand Up @@ -161,8 +161,10 @@ mcmini_main()
void
mc_create_global_state_object()
{
auto config = get_config_for_execution_environment();
programState.Construct(config);
MCStackConfiguration config = get_config_for_execution_environment();
// FIXME: MCStack is supposed to be a singleton class.
// So, change programState to type MCStack, and make it singleton
programState = new MCStack(config);
programState->registerVisibleOperationType(typeid(MCThreadStart),
&MCReadThreadStart);
programState->registerVisibleOperationType(typeid(MCThreadCreate),
Expand Down