Problem with thread posix
Matteo
matteo.posterli at studenti.unipr.it
Mon Feb 13 13:17:31 UTC 2006
Scrive Joel Sherrill <joel.sherrill at oarcorp.com>:
> Matteo wrote:
>
> >Scrive Chris Johns <chrisj at rtems.org>:
> >
> >
> >
> >> [ Should this email be back on the list ? ]
> >>
> >>Matteo wrote:
> >>
> >>
> >>>Scrive Chris Johns <chrisj at rtems.org>:
> >>>
> >>>
> >>>
> >>>
> >>>>Matteo wrote:
> >>>>
> >>>>
> >>>>
> >>>>>But I have error on all the pthread_create, pthread_mutex_lock/unlock,
> >>>>>pthread_cond_signal as all the posix parameters are not configured.
> >>>>>
> >>>>>
> >>>>What is the error message ?
> >>>>
> >>>>Regards
> >>>>Chris
> >>>>
> >>>>
> >>>>
> >>>>
> >>>I control that the mutex lock/unlock or the signal are good with a simple
> >>>control like this ;
> >>>
> >>>if(pthread_mutex_lock(&mutex)) perror("Error mutex");
> >>>
> >>>or
> >>>
> >>>if(pthread_mutex_unlock(&mutex)) perror("Error unlock mutex");
> >>>
> >>>or
> >>>
> >>>if (pthread_cond_wait(&b->cond, &b->mutex)) perror("Error wait");
> >>>
> >>>..
> >>>..
> >>>and so on for all the other thread posix commands, and I have that there
> >>>
> >>>
> >>is
> >>
> >>
> >>>always error ! But if I compile the code normally under linux I have no
> >>>
> >>>
> >>problem,
> >>
> >>
> >>>so the code for the linux compiler is good, but not for rtems! (I have
> >>>
> >>>
> >>installed
> >>
> >>
> >>>RTEMS 4.6.99.2)
> >>>So, have you some idea?
> >>>
> >>>
> >>>
> >>What is the configuration table parameters for POSIX ?
> >>
> >>Linux does not have the same setup issues RTEMS has. RTEMS is embedded
> >>so allows you the ability to constrain resources, ie has a configuration
> >>table.
> >>
> >>Can you run any of the POSIX tests ?
> >>
> >>Regards
> >>Chris
> >>
> >>
> >>
> >>
> >>
> >
> >
> >Yes I can run all the posix example of the testsuite, because I enable tet
> suite
> >when I configure rtems, but in the test suite I have no the source file only
> the
> > *.exe file !
> >So if I try to launch the psx example *.exe I have no problem. I find the
> source
> >of the psx example but I haven't the makefile, infact if I try to launch
> the
> >source with a makefile of Hello_world I have a lot of error !
> >So May be I need of particular option in the makefile to compile correctly
> my
> >posix example.
> >What do you think?
> >
> >
> >
>
> I think we need to see the errors. It could be as simple
> as you need to install RTEMS or it could be that you are
> using the RTEMS application Makefiles and not setting
> RTEMS_MAKEFILE_PATH appropriately.
>
> --joel
>
> --joel
>
>
I configured RTEMS in this way;
../rtems-4.7/configure --target=i386-rtems4.7 \
--prefix=/usr/local/rtems/rtems4.7 \
--enable-cxx --enable-rdbg --enable-tests --enable-networking \
--enable-posix --enable-rtemsbsp=pc386 \
The RTEMS_MAKEFILE_PATH is ;
export RTEMS_MAKEFILE_PATH=/usr/local/rtems/rtems4.7/i386-rtems4.7/pc386
The example Hello_world, and all that of the psx testsuite works well, so I
think that RTEMS_MAKEFILE_PATH and the rtems configure parameters are good..I
think..
So what could be the problem ?
Thanks in advance
Matteo
More information about the users
mailing list