pqueue logic error

Dario ddario at tiscalinet.it
Fri Oct 29 05:38:44 CEST 2004


Dear developers,

I wrote a basic and dummy program with pqueues:

<START CODE>
#include <unistd.h>
#include <sched.h>
//#include <signal.h>
#define KEEP_STATIC_INLINE
#include <rtai_lxrt.h>
#include <fcntl.h>
#include <rtai_mq.h>

int main (void)
{
  RT_TASK* task;
  if(!(task = rt_task_init_schmod(nam2num("PROVA1"),99,0,0,SCHED_FIFO,0x1)))
     return -1;
  rt_set_oneshot_mode();
  start_rt_timer(0);
  struct mq_attr my_attrs = { 0, 0, 0, 0};
  mode_t my_mode = 0;
  mqd_t my_q = INVALID_PQUEUE;
  my_q = mq_open("my_queue1", O_RDONLY, my_mode, &my_attrs);
  sleep(90);
}
</END CODE>

I run it after insmod rtai_hal, rtai_malloc, rtai_lxrt, rtai_sem, rtai_mq.

But if I do a "cat /proc/rtai/pqueue" this is the output:

RTAI Posix Queue Status
-----------------------

MAX_PQUEUES =  4 (system wide)
MQ_OPEN_MAX =  8 (per RT task)
MQ_NAME_MAX = 80

ID  NOpen  NMsgs  MaxMsgs  MaxSz  Perms  Del  Name
--------------------------------------------------------------------------------
$

NO queue!

I'm using kilaueua RTAi.

Please could you say me where I'm wrong?

Best regards

Dario




More information about the Rtai mailing list