#include "config.h"
#include "include/ams.h"
#include "macros.h"
#include "include/agent.h"
#include "include/data_structures.h"
#include "include/mc_platform.h"
Go to the source code of this file.
Functions | |
int | ams_Destroy (ams_p ams) |
ams_p | ams_Initialize (mc_platform_p mc_platform) |
void | ams_Print (ams_p ams) |
int | ams_ManageAgentList (ams_p ams) |
void | ams_Start (mc_platform_p mc_platform) |
void * | ams_Thread (void *arg) |
int ams_Destroy | ( | ams_p | ams | ) |
Definition at line 46 of file ams.c.
References COND_DESTROY, MC_SUCCESS, and MUTEX_DESTROY.
Referenced by mc_platform_Destroy().
ams_p ams_Initialize | ( | mc_platform_p | mc_platform | ) |
Definition at line 61 of file ams.c.
References CHECK_NULL, COND_INIT, COND_T, MUTEX_INIT, and MUTEX_T.
Referenced by mc_platform_Initialize().
int ams_ManageAgentList | ( | ams_p | ams | ) |
Definition at line 120 of file ams.c.
References agent_RunChScript(), agent_s::agent_status, agent_s::binary, ListSearch(), agent_s::lock, MC_AGENT_ACTIVE, MC_AGENT_NEUTRAL, MC_TerminateAgent(), MC_WAIT_CH, MC_WAIT_FINISHED, MC_WAIT_MESSGSEND, message_Destroy(), message_InitializeFromAgent(), message_New(), MUTEX_LOCK, MUTEX_UNLOCK, agent_s::name, agent_s::orphan, mc_platform_s::quit, mc_platform_s::quit_lock, and agent_s::run_lock.
Referenced by ams_Thread().
void ams_Print | ( | ams_p | ams | ) |
Definition at line 88 of file ams.c.
References agent_s::agent_status, agent_s::connect_id, agent_s::id, ListSearch(), MUTEX_LOCK, and MUTEX_UNLOCK.
void ams_Start | ( | mc_platform_p | mc_platform | ) |
Definition at line 227 of file ams.c.
References mc_platform_s::ams, ams_Thread(), MC_THREAD_AMS, mc_platform_s::stack_size, and THREAD_CREATE.
Referenced by mc_platform_Initialize().
void* ams_Thread | ( | void * | arg | ) |
Definition at line 258 of file ams.c.
References mc_platform_s::ams, ams_ManageAgentList(), COND_BROADCAST, COND_WAIT, mc_platform, MUTEX_LOCK, MUTEX_UNLOCK, mc_platform_s::quit, mc_platform_s::quit_lock, and THREAD_EXIT.
Referenced by ams_Start().