Help: Creation of RTEMS Message Queue hangs up computer

Alex kbyte at iol.pt
Tue Dec 21 23:42:53 UTC 2004


I am using the rtems-4.6.0pre5.tar.bz2 version in a pc686 using mandrake 9.2...


Alex



----- Mensagem Original -----
De: Joel Sherrill joelOARcorpcom <joel.sherrill at OARcorp.com>
Data: Terça-Feira, 21 de Dezembro de 2004, 21:51
Assunto: Re: Help: Creation of RTEMS Message Queue hangs up computer

> 
> 
> Alex wrote:
> > Hi,
> > I am trying to use posix message queues in RTEMS. I have a 
> little program that only creates a message queue, nothing else. 
> But when the mq_open() posix function is executed all the system 
> blocks forever. I already “debug” the kernel and what I saw was 
> the _RTEMS_Lock_allocator() function, in regiongetsegment.c file, 
> which blocks forever but I can't see why...
> 
> This sounds like a known bug.  What version of RTEMS are you running?
> 
> --joel
> 
> 
> > ENV: pc686, mandrake linux 9.2, rtems 4.6, i686 bsp
> > 
> > Could you help me please?
> > Any advices?
> > 
> > By the way, why do we need regions in rtems? Which is the main 
> aim of regions? In rtems the memeory is completly flat isn't it? 
> So, why regions?
> > 
> > Many thanks,
> > 
> > Alex
> > (RTEMS Beginner)
> > 
> > 
> > This is my little rtems posix program:
> > 
> > #define CONFIGURE_INIT
> > #include <rtems.h>
> > #include <bsp.h>
> > #include <stdio.h>
> > #include <stdlib.h>
> > #include <string.h>
> > #include <pthread.h> 
> > #include <limits.h>
> > #include <unistd.h>  
> > #include <errno.h>
> > #include <sched.h> 
> > #include <sched.h>
> > #include <fcntl.h>
> > #include <time.h>  
> > #include <signal.h>
> > #include <mqueue.h>
> > #include <rtems/posix/mqueue.h>
> > #include <rtems/posix/time.h>
> > #define CONFIGURE_INIT_TASK_ENTRY_POINT   POSIX_Init
> > 
> > void *POSIX_Init(void *argument)
> > {
> > mqd_t               mq;
> > 
> > puts( "\n\n-- POSIX MESSAGE QUEUE --" );
> > //CREATING / OPENING MESSAGE QUEUE
> > mq = mq_open("Q_Write", O_CREAT | O_RDWR, 0x777,NULL);
> > if(mq==-1)
> > {
> >          printf("\nError opening message queue Q_Write...");
> >          exit(0);
> > }
> > else
> > {
> >          printf("\nQueue Q_Write successfully opened...");
> > }
> > 
> >    puts( "-- END OF POSIX MESSAGE QUEUE PROGRAM --");
> >    exit(0);
> > }
> > 
> > #define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
> > #define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
> > #define CONFIGURE_POSIX_INIT_THREAD_TABLE
> > #define CONFIGURE_MAXIMUM_POSIX_THREADS               2
> > #define CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES  10
> > #define CONFIGURE_MAXIMUM_POSIX_TIMERS                   4
> > #define CONFIGURE_MAXIMUM_POSIX_MUTEXES              20
> > #define CONFIGURE_MAXIMUM_REGIONS                    4
> > #define CONFIGURE_POSIX_INIT_THREAD_TABLE
> > #define CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE  
> (RTEMS_MINIMUM_STACK_SIZE * 4)
> > #define CONFIGURE_EXTRA_TASK_STACKS  (5 * RTEMS_MINIMUM_STACK_SIZE)
> > #include <confdefs.h>
> >  
> > 
> > 
> > 
> ________________________________________________________________________________> Finalmente uma Caixa de Correio com todos os Extras: 21 MB + Anti-vírus + Filtro de
> > mensagens indesejadas + Attachs 7MB + Bloqueador IOL + Conteúdos 
> IOL + Ícones dinâmicos…
> > Crie aqui a sua: http://www.iol.pt/correio/rodape.php?dst=0411151
> > 
> 
> 
> -- 
> Joel Sherrill, Ph.D.             Director of Research & Development
> joel at OARcorp.com                 On-Line Applications Research
> Ask me about RTEMS: a free RTOS  Huntsville AL 35805
>    Support Available             (256) 722-9985
> 
> 

________________________________________________________________________________
Finalmente uma Caixa de Correio com todos os Extras: 21 MB + Anti-vírus + Filtro de
mensagens indesejadas + Attachs 7MB + Bloqueador IOL + Conteúdos IOL + Ícones dinâmicos…
Crie aqui a sua: http://www.iol.pt/correio/rodape.php?dst=0411151




More information about the users mailing list