/home/dko/projects/mobilec/trunk/src/ams.c File Reference

#include "include/ams.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)


Function Documentation

int ams_Destroy ( ams_p  ams  ) 

Definition at line 38 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 49 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 108 of file ams.c.

References agent_RunChScript(), agent_s::agent_status, ListSearch(), agent_s::lock, MC_AGENT_ACTIVE, MC_AGENT_NEUTRAL, MC_WAIT_CH, MC_WAIT_FINISHED, MC_WAIT_MESSGSEND, message_Destroy(), message_InitializeFromAgent(), message_New(), MUTEX_LOCK, MUTEX_UNLOCK, and agent_s::orphan.

Referenced by ams_Thread().

void ams_Print ( ams_p  ams  ) 

Definition at line 76 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 192 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 222 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, and mc_platform_s::quit_lock.

Referenced by ams_Start().


Generated on Fri May 16 14:49:55 2008 for Mobile-C by  doxygen 1.5.4