Problem with thread posix

Joel Sherrill joel.sherrill at oarcorp.com
Mon Feb 13 12:25:24 UTC 2006


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



More information about the users mailing list