~ubuntu-branches/ubuntu/utopic/gridengine/utopic

« back to all changes in this revision

Viewing changes to source/libs/sched/sge_select_queueL.h

  • Committer: Bazaar Package Importer
  • Author(s): Mark Hymers
  • Date: 2008-06-25 22:36:13 UTC
  • Revision ID: james.westby@ubuntu.com-20080625223613-tvd9xlhuoct9kyhm
Tags: upstream-6.2~beta2
ImportĀ upstreamĀ versionĀ 6.2~beta2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef __SGE_SELECT_QUEUEL_H
 
2
#define __SGE_SELECT_QUEUEL_H
 
3
 
 
4
/*___INFO__MARK_BEGIN__*/
 
5
/*************************************************************************
 
6
 * 
 
7
 *  The Contents of this file are made available subject to the terms of
 
8
 *  the Sun Industry Standards Source License Version 1.2
 
9
 * 
 
10
 *  Sun Microsystems Inc., March, 2001
 
11
 * 
 
12
 * 
 
13
 *  Sun Industry Standards Source License Version 1.2
 
14
 *  =================================================
 
15
 *  The contents of this file are subject to the Sun Industry Standards
 
16
 *  Source License Version 1.2 (the "License"); You may not use this file
 
17
 *  except in compliance with the License. You may obtain a copy of the
 
18
 *  License at http://gridengine.sunsource.net/Gridengine_SISSL_license.html
 
19
 * 
 
20
 *  Software provided under this License is provided on an "AS IS" basis,
 
21
 *  WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
 
22
 *  WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
 
23
 *  MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
 
24
 *  See the License for the specific provisions governing your rights and
 
25
 *  obligations concerning the Software.
 
26
 * 
 
27
 *   The Initial Developer of the Original Code is: Sun Microsystems, Inc.
 
28
 * 
 
29
 *   Copyright: 2001 by Sun Microsystems, Inc.
 
30
 * 
 
31
 *   All Rights Reserved.
 
32
 * 
 
33
 ************************************************************************/
 
34
/*___INFO__MARK_END__*/
 
35
 
 
36
#include "sge_boundaries.h"
 
37
#include "cull.h"
 
38
 
 
39
#ifdef  __cplusplus
 
40
extern "C" {
 
41
#endif
 
42
 
 
43
/****** spool/--LDR_Type***************************************
 
44
*
 
45
*  NAME
 
46
*    LDR_Type -- is a high level structure to monitor changes
 
47
*                in consumables, which are used as load threasholds.
 
48
*
 
49
*  ELEMENTS
 
50
*   SGE_REF(LDR_global,CULL_ANY_SUBTYPE, CULL_DEFAULT)
 
51
*     Reference to a global cunsumable object
 
52
*
 
53
*   SGE_REF(LDR_host,CULL_ANY_SUBTYPE, CULL_DEFAULT)
 
54
*     Reference to a host consumable object
 
55
*
 
56
*   SGE_REF(LDR_queue,CULL_ANY_SUBTYPE, CULL_DEFAULT)
 
57
*     Reference to a queue consumable object
 
58
*
 
59
*   SGE_LIST(LDR_queue_ref_list, QR_Type, CULL_DEFAULT)
 
60
*     A list of queues instances, which are using all these 
 
61
*     consumables as load thresholds.
 
62
*
 
63
*  FUNCTION
 
64
*     All three consumables form a kind of queue_consumable_category.
 
65
*     All queues which are listed in here are using the same consumables
 
66
*     to compute the load alarm. The whole list is using references because
 
67
*     it is easier to monitor changes in one of the consumable objects and
 
68
*     the function calculation the load alarm for each queue knows exactly
 
69
*     which queues need to be recalculated.
 
70
*
 
71
*
 
72
*  IMPORTANT
 
73
*     This list a fixed position list. Do not use what filtering on the
 
74
*     elements or the code will break!
 
75
*
 
76
****************************************************************************
 
77
*/
 
78
enum {
 
79
   LDR_queue_ref_list_pos = 0,
 
80
   LDR_limit_pos,
 
81
   LDR_global_pos, 
 
82
   LDR_host_pos,
 
83
   LDR_queue_pos
 
84
}; 
 
85
 
 
86
enum {
 
87
   LDR_queue_ref_list = LDR_LOWERBOUND,
 
88
   LDR_limit,
 
89
   LDR_global,
 
90
   LDR_host,
 
91
   LDR_queue
 
92
};
 
93
 
 
94
LISTDEF(LDR_Type)
 
95
   SGE_LIST(LDR_queue_ref_list, QR_Type, CULL_DEFAULT)
 
96
   SGE_STRING(LDR_limit, CULL_DEFAULT)
 
97
   SGE_REF(LDR_global,CULL_ANY_SUBTYPE, CULL_DEFAULT)
 
98
   SGE_REF(LDR_host,CULL_ANY_SUBTYPE, CULL_DEFAULT)
 
99
   SGE_REF(LDR_queue,CULL_ANY_SUBTYPE, CULL_DEFAULT)
 
100
LISTEND 
 
101
 
 
102
NAMEDEF(LDRN)
 
103
   NAME("LDR_queue_ref_list")
 
104
   NAME("LDR_limit")
 
105
   NAME("LDR_global")
 
106
   NAME("LDR_host")
 
107
   NAME("LDR_queue")
 
108
NAMEEND
 
109
 
 
110
#define LDRS sizeof(LDRN)/sizeof(char*)
 
111
 
 
112
/****** spool/--QR_Type***************************************
 
113
*
 
114
*  NAME
 
115
*     QR_Type -- sub list of queue references
 
116
*
 
117
*  ELEMENTS
 
118
*     SGE_REF(QR_Queue,CULL_ANY_SUBTYPE, CULL_DEFAULT
 
119
*        References a queue instance object
 
120
*
 
121
*  FUNCTION
 
122
*     Lists all queue instance objects in the same 
 
123
*     queue_consumable_category
 
124
*
 
125
****************************************************************************
 
126
*/
 
127
enum {
 
128
   QRL_queue_pos = 0
 
129
};
 
130
 
 
131
enum {
 
132
   QRL_queue = QRL_LOWERBOUND
 
133
};
 
134
 
 
135
LISTDEF(QRL_Type)
 
136
   SGE_REF(QRL_queue,CULL_ANY_SUBTYPE, CULL_DEFAULT)
 
137
LISTEND 
 
138
 
 
139
NAMEDEF(QRL_N)
 
140
   NAME("QRL_queue")
 
141
NAMEEND
 
142
 
 
143
#define QRL_S sizeof(QRL_N)/sizeof(char*)
 
144
 
 
145
 
 
146
#ifdef  __cplusplus
 
147
}
 
148
#endif
 
149
#endif