Adding cpp mocks
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
*/
|
||||
void *thread_routine (void *arg)
|
||||
{
|
||||
printf("Inside thread %i\n", pthread_self());
|
||||
return arg;
|
||||
}
|
||||
|
||||
@@ -21,10 +22,13 @@ main (int argc, char *argv[])
|
||||
void *thread_result;
|
||||
int status;
|
||||
|
||||
printf("Inside thread %i\n", pthread_self());
|
||||
status = pthread_create (
|
||||
&thread_id, NULL, thread_routine, NULL);
|
||||
if (status != 0)
|
||||
err_abort (status, "Create thread");
|
||||
sleep(1.0);
|
||||
printf("Main thread created thread %i\n", thread_id);
|
||||
|
||||
status = pthread_join (thread_id, &thread_result);
|
||||
if (status != 0)
|
||||
|
||||
Reference in New Issue
Block a user