Skip to contentSkip to conversation

-EPERM from message queue

Xenomai-help Frits de Klark 1 participant 2 messages Nov 3, 2006

lore
Share & tools
lore
#0 lore raw

Hello everyone,

my application creates and deletes some message queues like the following (pseudo-code):

for (i = 0; i < max_queues; i++)
{
rt_queue_create(&(queues[i]), queue_name+i, 15kb, etc);
}

// sleep for a few seconds

for (i = 0; i < max_queues; i++)
{
rt_queue_delete(&(queues[i]));
}

The strange thing is that everything goes fine, except for the deletion of the very last queue. It doesn't matter how many queues I try, every time only the last one doesn't get deleted.

This seems a bit strange to me, does anyone has experience with this 'problem'?

Thanks very much.

Best regards,

Frits

#1 lore raw
Quoted 18 lines · Frits de Klark

Hello everyone,

my application creates and deletes some message queues like the following (pseudo-code):

for (i = 0; i < max_queues; i++)
{
rt_queue_create(&(queues[i]), queue_name+i, 15kb, etc);
}

// sleep for a few seconds

for (i = 0; i < max_queues; i++)
{
rt_queue_delete(&(queues[i]));
}

Quoted 7 lines

The strange thing is that everything goes fine, except for the deletion of the very last queue. It doesn't matter how many queues I try, every time only the last one doesn't get deleted.

This seems a bit strange to me, does anyone has experience with this 'problem'?

Ok now. I have found the problem. It was the old 'out of range' programming mistake. It didn't came to my mind earlier because creation of the queue goes alright. Ah well, another 'problem' solved.

Thanks anyway :D

Best regards,

Frits