static inline void initialize_fds(void) { // XXX: should be this: //pthread_once(&g_initialized, open_file_descriptors); // XXX: not this: if (g_initialized == 0) { if(open_file_descriptors(NEW_PATHS) < 0) open_file_descriptors(OLD_PATHS); g_initialized = 1; } }
static inline void initialize_fds(void) { // XXX: should be this: //pthread_once(&g_initialized, open_file_descriptors); // XXX: not this: if (g_initialized == 0) { if(open_file_descriptors(NEW_PATHS) < 0) { open_file_descriptors(OLD_PATHS); on_state = "wake"; off_state = "standby"; } g_initialized = 1; } }