Hosts.c File Reference

#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <strings.h>
#include <pvm3.h>
#include "Hosts.h"

Include dependency graph for Hosts.c:

Go to the source code of this file.

Functions

HostsStructhostsCreate ()
 Constructor.
void hostsDestroy (HostsStruct *h)
 destroyer
int hostsAdd (HostsStruct *h)
 add a host to the host struct, empty
int hostsAddResource (HostsStruct *h, int hostIndex, char *resourceName)
 adds a resource to the host, caller cannot free resource after this
int hostsSetStatus (HostsStruct *h, int hostIndex, int status)
int hostsSetWeight (HostsStruct *h, int hostIndex, int weight)
int hostsSetMemory (HostsStruct *h, int hostIndex, int mem)
int hostsSetName (HostsStruct *h, int hostIndex, char *name)
int hostsGetIndex (HostsStruct *h)
int hostsGetIndexByName (HostsStruct *h, char *name)
int hostsGetIndexByResource (HostsStruct *hs, char *resourceName)
int hostsGetStatus (HostsStruct *h, int hostIndex)
int hostsGetMemory (HostsStruct *h, int hostIndex)
int hostsGetWeight (HostsStruct *h, int hostIndex)
char * hostsGetName (HostsStruct *h, int hostIndex)
int hostsGetNumResources (HostsStruct *h, int hostIndex)
int hostsHasResource (HostsStruct *h, int hostIndex, char *resourceName)


Function Documentation

int hostsAdd HostsStruct h  ) 
 

add a host to the host struct, empty

Definition at line 44 of file Hosts.c.

References AVAIL, HostsStruct::hosts, MAXHOSTS, HostsStruct::numHosts, Host::numResources, Host::status, HostsStruct::totalWeight, and Host::weight.

Referenced by abreTag().

int hostsAddResource HostsStruct h,
int  hostIndex,
char *  resourceName
 

adds a resource to the host, caller cannot free resource after this

Definition at line 69 of file Hosts.c.

References HostsStruct::hosts, MAX_RNAME_LENGTH, MAXRESOURCES, HostsStruct::numHosts, Host::numResources, and Host::resources.

Referenced by abreTag().

HostsStruct* hostsCreate  ) 
 

Constructor.

Definition at line 12 of file Hosts.c.

References HostsStruct::hosts, MAXHOSTS, NOTINIT, Host::numResources, and Host::status.

Referenced by createLayout().

void hostsDestroy HostsStruct h  ) 
 

destroyer

Definition at line 27 of file Hosts.c.

Referenced by destroyLayout().

int hostsGetIndex HostsStruct h  ) 
 

Definition at line 200 of file Hosts.c.

References AVAIL, HostsStruct::hosts, MAXHOSTS, NOTAVAIL, NOTINIT, and HostsStruct::totalWeight.

Referenced by fechaTag(), and replaceCrashedHost().

int hostsGetIndexByName HostsStruct h,
char *  name
 

Definition at line 230 of file Hosts.c.

References HostsStruct::hosts, MAX_HNAME_LENGTH, Host::name, and HostsStruct::numHosts.

Referenced by abreTag(), and replaceCrashedHost().

int hostsGetIndexByResource HostsStruct hs,
char *  resourceName
 

Definition at line 242 of file Hosts.c.

References hostsHasResource(), MAXHOSTS, and HostsStruct::numHosts.

Referenced by abreTag().

Here is the call graph for this function:

int hostsGetMemory HostsStruct h,
int  hostIndex
 

Definition at line 273 of file Hosts.c.

References HostsStruct::hosts, Host::mem, and HostsStruct::numHosts.

char* hostsGetName HostsStruct h,
int  hostIndex
 

Definition at line 304 of file Hosts.c.

References HostsStruct::hosts, Host::name, and HostsStruct::numHosts.

Referenced by abreTag(), fechaTag(), and replaceCrashedHost().

int hostsGetNumResources HostsStruct h,
int  hostIndex
 

Definition at line 317 of file Hosts.c.

References HostsStruct::hosts, HostsStruct::numHosts, and Host::numResources.

int hostsGetStatus HostsStruct h,
int  hostIndex
 

Definition at line 261 of file Hosts.c.

References HostsStruct::hosts, HostsStruct::numHosts, and Host::status.

Referenced by hostsGetWeight().

int hostsGetWeight HostsStruct h,
int  hostIndex
 

Definition at line 285 of file Hosts.c.

References HostsStruct::hosts, hostsGetStatus(), HostsStruct::numHosts, and Host::weight.

Here is the call graph for this function:

int hostsHasResource HostsStruct h,
int  hostIndex,
char *  resourceName
 

Definition at line 330 of file Hosts.c.

References HostsStruct::hosts, MAX_RNAME_LENGTH, HostsStruct::numHosts, Host::numResources, and Host::resources.

Referenced by hostsGetIndexByResource().

int hostsSetMemory HostsStruct h,
int  hostIndex,
int  mem
 

Definition at line 136 of file Hosts.c.

References HostsStruct::hosts, Host::mem, and HostsStruct::numHosts.

Referenced by abreTag().

int hostsSetName HostsStruct h,
int  hostIndex,
char *  name
 

Definition at line 150 of file Hosts.c.

References HostsStruct::hosts, MAX_HNAME_LENGTH, Host::name, and HostsStruct::numHosts.

Referenced by abreTag().

int hostsSetStatus HostsStruct h,
int  hostIndex,
int  status
 

Definition at line 94 of file Hosts.c.

References HostsStruct::hosts, NOTAVAIL, HostsStruct::numHosts, Host::status, HostsStruct::totalWeight, and Host::weight.

Referenced by replaceCrashedHost().

int hostsSetWeight HostsStruct h,
int  hostIndex,
int  weight
 

Definition at line 114 of file Hosts.c.

References HostsStruct::hosts, HostsStruct::numHosts, HostsStruct::totalWeight, and Host::weight.

Referenced by abreTag().


Generated on Tue Jan 17 19:24:02 2006 for Void by  doxygen 1.4.6