~ubuntu-branches/ubuntu/edgy/ncbi-tools6/edgy

« back to all changes in this revision

Viewing changes to connect/ncbi_host_info.h

  • Committer: Bazaar Package Importer
  • Author(s): Barry deFreese
  • Date: 2006-07-19 23:28:07 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20060719232807-et3cdmcjgmnyleyx
Tags: 6.1.20060507-3ubuntu1
Re-merge with Debian

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#ifndef CONNECT___NCBI_HOST_INFO__H
2
2
#define CONNECT___NCBI_HOST_INFO__H
3
3
 
4
 
/*  $Id: ncbi_host_info.h,v 6.5 2003/04/09 19:05:42 siyan Exp $
 
4
/*  $Id: ncbi_host_info.h,v 6.7 2006/03/06 20:23:59 lavr Exp $
5
5
 * ===========================================================================
6
6
 *
7
7
 *                            PUBLIC DOMAIN NOTICE
59
59
 
60
60
/* Return CPU count or -1 if error occurred.
61
61
 */
62
 
extern NCBI_XCONNECT_EXPORT int HINFO_CpuCount(HOST_INFO host_info);
 
62
extern NCBI_XCONNECT_EXPORT int HINFO_CpuCount(const HOST_INFO host_info);
63
63
 
64
64
 
65
65
/* Return task count or -1 if error occurred.
66
66
 */
67
 
extern NCBI_XCONNECT_EXPORT int HINFO_TaskCount(HOST_INFO host_info);
 
67
extern NCBI_XCONNECT_EXPORT int HINFO_TaskCount(const HOST_INFO host_info);
68
68
 
69
69
 
70
70
/* Return non-zero on success and store load averages in the
73
73
 * (aka BLAST) stored at index [1]. Return 0 on error.
74
74
 */
75
75
extern NCBI_XCONNECT_EXPORT int/*bool*/ HINFO_LoadAverage
76
 
(HOST_INFO host_info,
77
 
 double    lavg[2]
 
76
(const HOST_INFO host_info,
 
77
 double          lavg[2]
78
78
 );
79
79
 
80
80
 
85
85
 * does not provide such information. Return 0 on error.
86
86
 */
87
87
extern NCBI_XCONNECT_EXPORT int/*bool*/ HINFO_Status
88
 
(HOST_INFO host_info,
89
 
 double    status[2]
 
88
(const HOST_INFO host_info,
 
89
 double          status[2]
90
90
 );
91
91
 
92
92
 
93
 
/* Return non-zero on success and store BLAST counters in the
94
 
 * provided array "blast", with first five entries (indices [0..4])
95
 
 * containing task counters, and last 3 entries (indices [5..7])
96
 
 * containing queue sizes. Return 0 on error.
 
93
/* Obsolete.  Always returns 0 and does not touch its "blast" argument.
97
94
 */
98
95
extern NCBI_XCONNECT_EXPORT int/*bool*/ HINFO_BLASTParams
99
 
(HOST_INFO    host_info,
100
 
 unsigned int blast[8]
 
96
(const HOST_INFO host_info,
 
97
 unsigned int    blast[8]
101
98
 );
102
99
 
103
100
 
109
106
 * host environment remains valid until the handle 'host_info' deleted
110
107
 * in the application program.
111
108
 */
112
 
extern NCBI_XCONNECT_EXPORT const char* HINFO_Environment(HOST_INFO host_info);
 
109
extern NCBI_XCONNECT_EXPORT const char* HINFO_Environment
 
110
(const HOST_INFO host_info);
 
111
 
 
112
 
 
113
/* Obtain affinity argument and value that has keyed the service
 
114
 * selection (if affinities have been used at all).  NULL gets returned
 
115
 * as argument if no affinity has been found (in this case value
 
116
 * will be returned 0 as well).  Otherwise, NULL gets returned as
 
117
 * value if there was no particular value matched but the argument
 
118
 * played alone; "" is the value has been used empty, or any other
 
119
 * substring from the host environment that has keyed the decision.
 
120
 */
 
121
extern NCBI_XCONNECT_EXPORT const char* HINFO_AffinityArgument
 
122
(const HOST_INFO host_info);
 
123
 
 
124
extern NCBI_XCONNECT_EXPORT const char* HINFO_AffinityArgvalue
 
125
(const HOST_INFO host_info);
113
126
 
114
127
 
115
128
#ifdef __cplusplus
123
136
/*
124
137
 * --------------------------------------------------------------------------
125
138
 * $Log: ncbi_host_info.h,v $
 
139
 * Revision 6.7  2006/03/06 20:23:59  lavr
 
140
 * Added "const" qualifier to all host-infos when passed to getters
 
141
 *
 
142
 * Revision 6.6  2006/03/05 17:33:15  lavr
 
143
 * +HINFO_AffinityArgument, +HINFO_AffinityArgvalue
 
144
 *
126
145
 * Revision 6.5  2003/04/09 19:05:42  siyan
127
146
 * Added doxygen support
128
147
 *