Freeciv-3.1
|
Go to the source code of this file.
Data Structures | |
struct | tai_msgs |
struct | tai_reqs |
struct | tai_plr |
Functions | |
void | tai_init_threading (void) |
bool | tai_thread_running (void) |
void | tai_player_alloc (struct ai_type *ait, struct player *pplayer) |
void | tai_player_free (struct ai_type *ait, struct player *pplayer) |
void | tai_control_gained (struct ai_type *ait, struct player *pplayer) |
void | tai_control_lost (struct ai_type *ait, struct player *pplayer) |
void | tai_refresh (struct ai_type *ait, struct player *pplayer) |
void | tai_msg_to_thr (struct tai_msg *msg) |
void | tai_req_from_thr (struct tai_req *req) |
static struct tai_plr * | tai_player_data (struct ai_type *ait, const struct player *pplayer) |
We actually control the player
Definition at line 196 of file taiplayer.c.
Referenced by twai_control_gained().
We no longer control the player
Definition at line 217 of file taiplayer.c.
Referenced by twai_control_lost().
void tai_init_threading | ( | void | ) |
void tai_msg_to_thr | ( | struct tai_msg * | msg | ) |
Send message to thread. Be sure that thread is running so that messages are not just piling up to the list without anybody reading them.
Definition at line 274 of file taiplayer.c.
Referenced by tai_send_msg().
Initialize player for use with threaded AI.
Definition at line 167 of file taiplayer.c.
Referenced by twai_player_alloc().
|
inlinestatic |
Definition at line 61 of file taiplayer.h.
Free player from use with threaded AI.
Definition at line 180 of file taiplayer.c.
Referenced by twai_player_free().
Check for messages sent by player thread
Definition at line 239 of file taiplayer.c.
Referenced by twai_refresh().
void tai_req_from_thr | ( | struct tai_req * | req | ) |
bool tai_thread_running | ( | void | ) |
Return whether player thread is running
Definition at line 295 of file taiplayer.c.
Referenced by tai_send_msg().