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

LOCHE Daniel dloche at laas.fr
Tue Mar 3 15:59:44 CET 2020


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), 

(=> 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..?


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