75 bool finished =
FALSE;
113 case TAI_MSG_FIRST_ACTIVITIES:
139 case TAI_MSG_PHASE_FINISHED:
142 case TAI_MSG_THR_EXIT:
146 log_error(
"Illegal message type %s (%d) for threaded ai!",
147 taimsgtype_name(msg->
type), msg->
type);
151 if (new_abort < ret_abort) {
152 ret_abort = new_abort;
187 if (player_data != NULL) {
254 case TAI_REQ_WORKER_TASK:
257 case TAI_REQ_TURN_DONE:
void dai_data_init(struct ai_type *ait, struct player *pplayer)
void dai_data_close(struct ai_type *ait, struct player *pplayer)
#define city_list_iterate_safe(citylist, _city)
#define city_list_iterate_safe_end
void fc_thread_cond_destroy(fc_thread_cond *cond)
void fc_thread_cond_signal(fc_thread_cond *cond)
void fc_thread_cond_wait(fc_thread_cond *cond, fc_mutex *mutex)
void fc_thread_cond_init(fc_thread_cond *cond)
int fc_thread_start(fc_thread *thread, void(*function)(void *arg), void *arg)
void fc_allocate_mutex(fc_mutex *mutex)
void fc_release_mutex(fc_mutex *mutex)
void fc_thread_wait(fc_thread *thread)
void fc_destroy_mutex(fc_mutex *mutex)
void fc_init_mutex(fc_mutex *mutex)
void initialize_infrastructure_cache(struct player *pplayer)
#define log_debug(message,...)
#define log_error(message,...)
#define fc_calloc(n, esz)
void * player_ai_data(const struct player *pplayer, const struct ai_type *ai)
void player_set_ai_data(struct player *pplayer, const struct ai_type *ai, void *data)
struct civ_game::@30::@34 server
struct civ_game::@30::@34::@38 mutexes
struct city_list * cities
struct taimsg_list * msglist
struct taireq_list * reqlist
struct tai_reqs reqs_from
void tai_city_worker_requests_create(struct ai_type *ait, struct player *pplayer, struct city *pcity)
void tai_req_worker_task_rcv(struct tai_req *req)
void tai_send_req(enum taireqtype type, struct player *pplayer, void *data)
void tai_send_msg(enum taimsgtype type, struct player *pplayer, void *data)
void tai_msg_to_thr(struct tai_msg *msg)
bool tai_thread_running(void)
void tai_control_gained(struct ai_type *ait, struct player *pplayer)
void tai_control_lost(struct ai_type *ait, struct player *pplayer)
void tai_player_alloc(struct ai_type *ait, struct player *pplayer)
void tai_player_free(struct ai_type *ait, struct player *pplayer)
void tai_init_threading(void)
void tai_req_from_thr(struct tai_req *req)
void tai_refresh(struct ai_type *ait, struct player *pplayer)
static enum tai_abort_msg_class tai_check_messages(struct ai_type *ait)
static void tai_thread_start(void *arg)