#include <pthread.h>
|
|
#include "../state.h"
|
|
|
|
pthread_t mission_thread ;
|
|
|
|
void run_mission(state_t * state, void * mission(void * data)){
|
|
pthread_create(&mission_thread,NULL, mission,(void *) state);
|
|
|
|
}
|
|
|
|
void wait_mission(){
|
|
if (pthread_join(mission_thread, NULL) != 0) {
|
|
perror("pthread_join");
|
|
exit(EXIT_FAILURE);
|
|
}
|
|
|
|
}
|