/* On some systems you will need to link to the pthread library by appending -l pthread to the compile line */ #include#include #include struct thedata { int x; char s[32]; }; void *threadroutine(void *arg) { struct thedata *t = (struct thedata *)malloc(sizeof(struct thedata)); t->x = 17; strcpy(t->s,"Hello world!"); pthread_exit(t); } int main() { struct thedata *q; pthread_t n; int retval; retval = pthread_create(&n,NULL,threadroutine,NULL); if (retval < 0) { printf("error, could not create thread\n"); exit(0); } /*************************************************** write code here to get the return value from the thread and display the results. Make sure that your code does routine error checking *****************************************************/ }