-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Don't erase elements if multiple subscriptions use them #425
base: main
Are you sure you want to change the base?
Conversation
kilativ-dotcom
commented
Oct 15, 2024
- Read PR documentation
- Update changelog
- Update documentation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #425 +/- ##
==========================================
+ Coverage 95.70% 95.76% +0.05%
==========================================
Files 237 237
Lines 26965 27315 +350
Branches 1863 1880 +17
==========================================
+ Hits 25808 26157 +349
- Misses 1157 1158 +1 |
sc_uint32 * count = (sc_uint32 *)sc_hash_table_get( | ||
manager->emitted_erase_events, GUINT_TO_POINTER(SC_ADDR_LOCAL_TO_INT(connector_addr))); | ||
if (count == null_ptr) | ||
{ | ||
count = sc_mem_new(sc_uint32, 1); | ||
*count = 0; | ||
} | ||
++(*count); | ||
sc_hash_table_insert(manager->emitted_erase_events, GUINT_TO_POINTER(SC_ADDR_LOCAL_TO_INT(connector_addr)), count); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sc_uint32 * count = (sc_uint32 *)sc_hash_table_get( | |
manager->emitted_erase_events, GUINT_TO_POINTER(SC_ADDR_LOCAL_TO_INT(connector_addr))); | |
if (count == null_ptr) | |
{ | |
count = sc_mem_new(sc_uint32, 1); | |
*count = 0; | |
} | |
++(*count); | |
sc_hash_table_insert(manager->emitted_erase_events, GUINT_TO_POINTER(SC_ADDR_LOCAL_TO_INT(connector_addr)), count); | |
sc_uint32 count = (sc_uint32)(sc_uint64)sc_hash_table_get( | |
manager->emitted_erase_events, GUINT_TO_POINTER(SC_ADDR_LOCAL_TO_INT(connector_addr))); | |
++count; | |
sc_hash_table_insert(manager->emitted_erase_events, GUINT_TO_POINTER(SC_ADDR_LOCAL_TO_INT(connector_addr)), count); |
sc-memory/sc-memory/tests/sc-memory/units/events/test_sc_event.cpp
Outdated
Show resolved
Hide resolved
sc-memory/sc-memory/tests/sc-memory/units/agents/test_sc_specified_agents.cpp
Outdated
Show resolved
Hide resolved
sc-memory/sc-memory/tests/sc-memory/units/agents/test_sc_specified_agents.cpp
Outdated
Show resolved
Hide resolved
sc-memory/sc-memory/tests/sc-memory/units/agents/test_sc_specified_agents.cpp
Outdated
Show resolved
Hide resolved
sc-memory/sc-memory/tests/sc-memory/units/events/test_sc_event.cpp
Outdated
Show resolved
Hide resolved
sc-memory/sc-memory/tests/sc-memory/units/events/test_sc_event.cpp
Outdated
Show resolved
Hide resolved
|
||
sc_result _sc_storage_element_erase_with_incoming_outgoing_connectors( | ||
sc_memory_context const * ctx, | ||
sc_addr connector_chain_begin_addr, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is chain here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
chain is like sequence of connectors next connector of which cannot exist without previous(previous element is source/target of next connector)
sc-memory/sc-memory/tests/sc-memory/units/events/test_sc_event.cpp
Outdated
Show resolved
Hide resolved
sc-memory/sc-memory/tests/sc-memory/units/events/test_sc_event.cpp
Outdated
Show resolved
Hide resolved
sc-memory/sc-memory/tests/sc-memory/units/events/test_sc_event.cpp
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests are failed
… event linked to subscription
…stency for agents responding to sc-events of erasing sc-elements
c8eebff
to
ad6d130
Compare