again posix queue
Dario
ddario at tiscalinet.it
Fri Oct 29 23:57:17 CEST 2004
Someone knows why I don't see the queue with cat /proc/rtai/pqueue after
creating that?
I've also run the pqueue example in the showroom and, of course, it works
fine.
Instead, hereunder you can find my code which doesn' work.
Any suggestion?
#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);
}
More information about the Rtai
mailing list