Пример #1
0
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);
}
Пример #2
0
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);
}
Пример #3
0
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;
}
Пример #4
0
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;
}
Пример #5
0
thread_t * thread_create(thread_func_t func) {
	return thread_create_args(func, NULL);
}
Пример #6
0
random_t random_new(shared_t * pStrc)
{
    random_t pRandom = calloc(1, sizeof(random_t));;
    pRandom->thread = thread_create_args(setNumb, pStrc);
    return pRandom;
}
Пример #7
0
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;
}
Пример #8
0
symbolSetter_t * SymbolSetter_create(text_t * string){
    sumbolSetter_t setter;
    setter.SymbSet = thread_create_args( SymbolSetter,string);
    return &setter;
}