Step 2: Install the Eclipse Development Environment Plugin
Step 2: Install the Eclipse Development EnvironmentHttp://www.linuxidc.com/Linux/2012-02/53964.htm
Step 2: configure the Eclipse ARM Development EnvironmentHttp://www.linuxidc.com/Linux/2012-02/54007.htm
Step 2: Create a new process and configure the environment
Enter the following code:
# Include
# Include
# Include
# Include
# Include
Void * create (void * arg)
{
While (1)
{
Printf ("thread is Running .....");
Sleep (5 );
}
}
Void * ReaderThread (void * arg)
{
While (1)
{
Sleep (4 );
Printf ("Read ID = \ r \ n ");
}
}
Int main (int argc, char * argv [])
{
Pthread_t tidp;
Int rc1, rc2;
Rc1 = pthread_create (& tidp, NULL, create, NULL );
If (rc1! = 0)
{
Printf ("pthread_create is not created... \ r \ n ");
Return-1;
}
Printf ("prthread_create is created... \ r \ n ");
Rc2 = pthread_create (& tidp, NULL, ReaderThread, NULL );
If (rc2! = 0)
{
Printf ("ReaderThread is not created... \ r \ n ");
Return-1;
}
Printf ("ReaderThread is created... \ r \ n ");
While (1)
{
Printf ("System is Runing... \ r \ n ");
Sleep (1 );
}
Return 0;
}
Compile to see the effect.