Adding cpp mocks

This commit is contained in:
Bassem Girgis
2018-10-17 11:12:34 -05:00
parent a5ec64177d
commit 63027dd857
8 changed files with 623 additions and 80 deletions

View File

@@ -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)