void start_car_check(int com_port, int * status) { car_check_args * data = (car_check_args *)malloc(sizeof(car_check_args)); data->com_port = com_port; data->status = status; thread_create_args(car_check, data); }
void printStart(NumPrinter* p){ thread_t* new_thread; mutex_lock(printer_num); new_thread = thread_create_args(printer_loop, p); p->thread = new_thread; mutex_unlock(printer_num); }
setter_t setter_create(symbol_t* data){ setter_t new_setter = malloc(sizeof(struct setter_s)); new_setter->th = thread_create_args(symbolSetter, data); return new_setter; }
producer_t producer_new(data_t* data){ producer_t producer = (producer_t)malloc(sizeof(struct producer_s)); producer->thread = thread_create_args(producerFunc, data); return producer; }
thread_t * thread_create(thread_func_t func) { return thread_create_args(func, NULL); }
random_t random_new(shared_t * pStrc) { random_t pRandom = calloc(1, sizeof(random_t));; pRandom->thread = thread_create_args(setNumb, pStrc); return pRandom; }
consumer_t consumer_create(numbers_t* numbers){ consumer_t consumer = (consumer_t)malloc(sizeof(struct consumer_s)); consumer->thread = thread_create_args(consumerFunc, numbers); return consumer; }
symbolSetter_t * SymbolSetter_create(text_t * string){ sumbolSetter_t setter; setter.SymbSet = thread_create_args( SymbolSetter,string); return &setter; }