static void arm_led_start_thread(void) { arm_detect_led_type(); if(!cfg.enableled || arm_led_type == LED_TYPE_UNKNOWN) { return; } // call this after signal handling is done if(!arm_led_actions) { arm_led_actions = ll_create("arm_led_actions"); } start_thread("arm led", arm_led_thread_main, NULL, &arm_led_thread, 1, 1); }
static void arm_led_start_thread(void) { arm_detect_led_type(); if (!cfg.enableled || arm_led_type == LED_TYPE_UNKNOWN) return; // call this after signal handling is done if (!arm_led_actions) { arm_led_actions = ll_create("arm_led_actions"); } pthread_attr_t attr; pthread_attr_init(&attr); cs_log("starting thread arm_led_thread"); pthread_attr_setstacksize(&attr, PTHREAD_STACK_SIZE); int32_t ret = pthread_create(&arm_led_thread, &attr, arm_led_thread_main, NULL); if (ret) { cs_log("ERROR: can't create arm_led_thread thread (errno=%d %s)", ret, strerror(ret)); } else { cs_log("arm_led_thread thread started"); pthread_detach(arm_led_thread); } pthread_attr_destroy(&attr); }