Skip to content

Conversation

@gc00
Copy link
Collaborator

@gc00 gc00 commented Apr 14, 2024

  • This used to be: MCDeferred<MCStack> programState;
  • MCDeferred is not used anywhere else.
    (A comment there was: "This clever workaround ..." But as others say: "Beware of clever code.")

In the future, we need to make programState a true singleton class:

MCStack programState;

@gc00 gc00 added the type: enhancement The issue specifies a feature that should be added to the project label Apr 14, 2024
@gc00 gc00 requested a review from maxwellpirtle April 14, 2024 22:31
@gc00 gc00 force-pushed the remove-MCDeferred branch from 1e399de to c2e0c30 Compare April 21, 2024 20:19
@gc00 gc00 marked this pull request as draft May 17, 2024 20:25
@gc00 gc00 force-pushed the remove-MCDeferred branch from c2e0c30 to f40ff8a Compare May 17, 2024 20:28
@gc00 gc00 marked this pull request as ready for review May 18, 2024 17:58
@gc00
Copy link
Collaborator Author

gc00 commented May 18, 2024

@maxwellpirtle , When I test this code, I'm not seeing a bug. I know that you've seen a bug.
Could you reply here about what target application you are testing, and the flags used with McMini? Thanks.

@maxwellpirtle
Copy link
Collaborator

@maxwellpirtle , When I test this code, I'm not seeing a bug. I know that you've seen a bug. Could you reply here about what target application you are testing, and the flags used with McMini? Thanks.

Running

./mcmini ./philosophers_mutex_deadlock 4 0

results in a bug. In the trace printout (when I ran it was trace 23) we see e.g.

...
THREAD STATES
thread 1: exits
thread 1: exits
thread 2: exits
thread 3: exits
thread 4: exits

Thread 1 appears twice

@gc00 gc00 force-pushed the remove-MCDeferred branch from f40ff8a to eec94d2 Compare June 9, 2024 04:57
@gc00 gc00 force-pushed the remove-MCDeferred branch 2 times, most recently from b609f73 to ccd1d91 Compare July 15, 2024 13:44
@gc00
Copy link
Collaborator Author

gc00 commented Jul 15, 2024

With the latest commits from other PRs, this PR now seems to work.

gc00 added 2 commits July 16, 2024 10:58
* This used to be:  MCDeferred<MCStack> programState;
* MCDeferred is not used anywhere else.
  (A comment there was: "This clever workaround ..."
   But as others say: "Beware of clever code.")
@gc00 gc00 force-pushed the remove-MCDeferred branch from 4654e5e to e276946 Compare July 16, 2024 15:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: enhancement The issue specifies a feature that should be added to the project

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants