rt_buffer_read, error #24 ("Too Many Files" ?)

LOCHE Daniel dloche at laas.fr
Tue Mar 3 17:34:58 CET 2020


Okay... my bad... I just found out why.

Just loosed 2 day, to notice that my /sizeof(MessageStructure) = 24... 
/thus it wasn't a error ID, but just the size of the message...

Erm... I propose just to forget this episode. ahah

Daniel

Le 03/03/2020 à 15:59, LOCHE Daniel a écrit :
> Hello,
>
> I am quite confused.
>
> I have several real-time tasks created from a fork + rt_task_shadow.
> My app uses a shared buffer where 1 to multiple processes can write 
> to, and a process with a task dedicated to read the buffer content.
>
> - I manage to create the buffer :
>
> struct MessageStructure { int ID; RTIME time; bool state; };
> rt_buffer_create(&_buff, "BUFFER_NAME", 20*sizeof(MessageStructure), 
> B_FIFO);
>
> (=> return value is 0.)
> - I also manage to bind to it from the other processes :
>
> rt_buffer_bind(&_buff, "BUFFER_NAME", 500*1000);
>
> (=> return value is 0 too.)
>
> - Issue is, even with only 2 processes (one Writer and the Reader), 
> when the first Read is executed, it returns me a Error #24.
>
> MessageStructure msg;
> rt_buffer_read(&_buff, &msg, sizeof(MessageStructure), TM_INFINITE);
>
> => return value is 24.
>
>
> From syserror(), I get that this is a "Too many open files" error, but 
> I don't understand why... Any clue ?
> Do other Alchemy objects enter into account for the "file count" that 
> I should mention..?
>
> Daniel
>
> PS : I managed to solve my last issue with rt_task_bind and shared 
> objects. I'l make a summary about it when time permits me. :)
>


More information about the Xenomai mailing list