Skip to content

timing.hpp: Casting to atomic uint64_t before Running/last_ assignment#3844

Open
spchamp wants to merge 1 commit into
rubinius:mainfrom
rubyblox:ci/patch-timing-atomic-uint64
Open

timing.hpp: Casting to atomic uint64_t before Running/last_ assignment#3844
spchamp wants to merge 1 commit into
rubinius:mainfrom
rubyblox:ci/patch-timing-atomic-uint64

Conversation

@spchamp
Copy link
Copy Markdown

@spchamp spchamp commented Dec 31, 2021

This patch adds a cast for an assignment to an atomic integer value in timing.hpp

Updated: This patch serves as a duplicate or alternate approach to how the issue is addressed in Pull #3836

Previous to the patch, compiling Rubinius v5.0 with clang 11 on FreeBSD 11.1:

4: CXX machine/accessor_primitives.cpp
In file included from machine/accessor_primitives.cpp:9:
In file included from /usr/home/u1000/wk/dist_wk/ports_devo/lang/rubinius/work/rubinius-5.0/machine/includes.hpp:15:
In file included from ./machine/class/block_environment.hpp:12:
In file included from /usr/home/u1000/wk/dist_wk/ports_devo/lang/rubinius/work/rubinius-5.0/machine/class/variable_scope.hpp:9:
In file included from /usr/home/u1000/wk/dist_wk/ports_devo/lang/rubinius/work/rubinius-5.0/machine/class/fiber.hpp:13:
/usr/home/u1000/wk/dist_wk/ports_devo/lang/rubinius/work/rubinius-5.0/machine/diagnostics/timing.hpp:116:25: error: incompatible integer to pointer conversion assigning to 'std::atomic<uint>
      if(last_) last_ = run;
                        ^~~
In file included from machine/bytecode_verifier.cpp:17:
/usr/home/u1000/wk/dist_wk/ports_devo/lang/rubinius/work/rubinius-5.0/machine/diagnostics/timing.hpp:116:25: error: incompatible integer to pointer conversion assigning to 'std::atomic<uint>
      if(last_) last_ = run;
                        ^~~

  1. Is this pull-request complete?
  • Yes, this pull-request is ready to be reviewed and merged.
  • No, this pull-request is a work-in-progress.
  1. Does this pull request fix an issue with an existing feature or introduce a new feature?
  • It fixes an issue with an existing features.
  • It introduces a new features.
  1. Does this pull-request include tests?
  • Yes, it includes tests.
  • No, it does not include tests because the tests already exist.
  • No, it does not include tests because tests are too difficult to write.
  • No, it does not include tests because ...

This patch adds a cast for an assignment to an atomic integer value
in timing.hpp

Previous to the patch, compiling Rubinius v5.0 with clang 11 on
FreeBSD 11.1:

~~~~
4: CXX machine/accessor_primitives.cpp
In file included from machine/accessor_primitives.cpp:9:
In file included from /usr/home/u1000/wk/dist_wk/ports_devo/lang/rubinius/work/rubinius-5.0/machine/includes.hpp:15:
In file included from ./machine/class/block_environment.hpp:12:
In file included from /usr/home/u1000/wk/dist_wk/ports_devo/lang/rubinius/work/rubinius-5.0/machine/class/variable_scope.hpp:9:
In file included from /usr/home/u1000/wk/dist_wk/ports_devo/lang/rubinius/work/rubinius-5.0/machine/class/fiber.hpp:13:
/usr/home/u1000/wk/dist_wk/ports_devo/lang/rubinius/work/rubinius-5.0/machine/diagnostics/timing.hpp:116:25: error: incompatible integer to pointer conversion assigning to 'std::atomic<uint>
      if(last_) last_ = run;
                        ^~~
In file included from machine/bytecode_verifier.cpp:17:
/usr/home/u1000/wk/dist_wk/ports_devo/lang/rubinius/work/rubinius-5.0/machine/diagnostics/timing.hpp:116:25: error: incompatible integer to pointer conversion assigning to 'std::atomic<uint>
      if(last_) last_ = run;
                        ^~~
~~~~
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant