trig_loop
CHECKr(pthread_create (&thread[0], NULL, trig_loop, NULL));
CHECKr(pthread_create (&thread, NULL, trig_loop, NULL));