Hi,
I am observing that the first 4 bytes are changed to zero, let me know what
is the reason for this.
before insert:
(gdb) p instance
$1 = (ngp::timer_manager::timer_instance_t &) @0x7fffb610e118: {padding =
*1919*, id = 2, api_id = 1, next = {__d = {
__r = 98595033760891}}, period = {__r = 20000}, max_iterations = -1,
running = false, user_data = 0x0,
target_identifier = 0,
startAddr = 0x5555555c22cb
> >,
std::chrono::duration >, int&, void*&, unsigned
int&>::construct<0ul, 1ul, 2ul, 3ul, 4ul, 5ul, 6ul, 7ul>(void*,
boost::interprocess::ipcdetail::bool_<false>,
boost::container::dtl::index_tuple<0ul, 1ul, 2ul, 3ul, 4ul, 5ul, 6ul, 7ul>
const&)+401>, startTime = 177880440076688, interval = 20000}
*after insert (queue->insert(instance))*
(gdb) p instance
$4 = (ngp::timer_manager::timer_instance_t &) @0x7fffb610e118: {*padding =
0*, id = 2, api_id = 1, next = {__d = {
__r = 98595033760891}}, period = {__r = 20000}, max_iterations = -1,
running = false, user_data = 0x0,
target_identifier = 0,
startAddr = 0x5555555c22cb
> >,
std::chrono::duration >, int&, void*&, unsigned
int&>::construct<0ul, 1ul, 2ul, 3ul, 4ul, 5ul, 6ul, 7ul>(void*,
boost::interprocess::ipcdetail::bool_<false>,
boost::container::dtl::index_tuple<0ul, 1ul, 2ul, 3ul, 4ul, 5ul, 6ul, 7ul>
const&)+401>, startTime = 177880440076688, interval = 20000}
here queue is
typedef bip::multiset timer_queue_t;
timer_queue_t* queue;
typedef struct alignas(4) timer_instance
{
uint32_t padding;
timer_id_t id;
uint64_t api_id;
timestamp_t next;
millis_t period;
int32_t max_iterations;
// handler_type_t handler;
bool running;
void* user_data;
uint32_t target_identifier;
void* startAddr;
uint64_t startTime;
uint64_t interval;
}
Regards,
Murali Kishore
On Sat, Sep 28, 2024 at 3:17 PM Murali Kishore
wrote:
Thanks, it worked.
On Sat, Sep 28, 2024 at 2:36 PM Joaquin M López Muñoz via Boost <
boost@lists.boost.org> wrote:
El 28/09/2024 a las 9:49, Murali Kishore via Boost escribió:
[...]
// Define the unordered_map type
typedef boost::unordered_map, std::less, MapAllocator>
timer_instance_map_t;
You have to use std::equal_to rather than
std::less. Please try and let us know if that solves your
issue.
Joaquin M Lopez Munoz
_______________________________________________
Unsubscribe & other changes:
http://lists.boost.org/mailman/listinfo.cgi/boost
--
Regards,
Murali Kishore
--
Regards,
Murali Kishore