Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Slurm
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tud-zih-energy
Slurm
Commits
9cb1fcba
Commit
9cb1fcba
authored
21 years ago
by
Mark Grondona
Browse files
Options
Downloads
Patches
Plain Diff
o Updated to latest hostlist.h from LSD-Tools project.
parent
78616bc6
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/common/hostlist.h
+12
-18
12 additions, 18 deletions
src/common/hostlist.h
with
12 additions
and
18 deletions
src/common/hostlist.h
+
12
−
18
View file @
9cb1fcba
/*****************************************************************************\
/*****************************************************************************\
* $Id$
* $Id$
*****************************************************************************
*****************************************************************************
* $LSDId: hostlist.h,v 1.
2
2003/04/2
4 00:15:27
grondo Exp $
* $LSDId: hostlist.h,v 1.
3
2003/04/2
5 23:38:30
grondo Exp $
*****************************************************************************
*****************************************************************************
* Copyright (C) 2002 The Regents of the University of California.
* Copyright (C) 2002 The Regents of the University of California.
* Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
* Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
...
@@ -71,12 +71,6 @@ typedef struct hostset * hostset_t;
...
@@ -71,12 +71,6 @@ typedef struct hostset * hostset_t;
*/
*/
typedef
struct
hostlist_iterator
*
hostlist_iterator_t
;
typedef
struct
hostlist_iterator
*
hostlist_iterator_t
;
/* ----[ general node name functions: ]---- */
/* getnodename - equivalent to gethostname, but return only the first component of the fully
* qualified name (e.g. "linux123.foo.bar" becomes "linux123") */
extern
int
getnodename
(
char
*
name
,
size_t
len
);
/* ----[ hostlist_t functions: ]---- */
/* ----[ hostlist_t functions: ]---- */
/* ----[ hostlist creation and destruction ]---- */
/* ----[ hostlist creation and destruction ]---- */
...
@@ -107,14 +101,14 @@ extern int getnodename (char *name, size_t len);
...
@@ -107,14 +101,14 @@ extern int getnodename (char *name, size_t len);
* The returned hostlist must be freed with hostlist_destroy()
* The returned hostlist must be freed with hostlist_destroy()
*
*
*/
*/
hostlist_t
hostlist_create
(
c
har
*
str
);
hostlist_t
hostlist_create
(
c
onst
char
*
hostlist
);
/* hostlist_copy():
/* hostlist_copy():
*
*
* Allocate a copy of a hostlist object. Returned hostlist must be freed
* Allocate a copy of a hostlist object. Returned hostlist must be freed
* with hostlist_destroy.
* with hostlist_destroy.
*/
*/
hostlist_t
hostlist_copy
(
hostlist_t
hl
);
hostlist_t
hostlist_copy
(
const
hostlist_t
hl
);
/* hostlist_destroy():
/* hostlist_destroy():
*
*
...
@@ -134,7 +128,7 @@ void hostlist_destroy(hostlist_t hl);
...
@@ -134,7 +128,7 @@ void hostlist_destroy(hostlist_t hl);
* Returns the number of hostnames inserted into the list,
* Returns the number of hostnames inserted into the list,
* or 0 on failure.
* or 0 on failure.
*/
*/
int
hostlist_push
(
hostlist_t
hl
,
char
*
hosts
);
int
hostlist_push
(
hostlist_t
hl
,
const
char
*
hosts
);
/* hostlist_push_host():
/* hostlist_push_host():
...
@@ -145,7 +139,7 @@ int hostlist_push(hostlist_t hl, char *hosts);
...
@@ -145,7 +139,7 @@ int hostlist_push(hostlist_t hl, char *hosts);
*
*
* return value is 1 for success, 0 for failure.
* return value is 1 for success, 0 for failure.
*/
*/
int
hostlist_push_host
(
hostlist_t
hl
,
char
*
host
);
int
hostlist_push_host
(
hostlist_t
hl
,
const
char
*
host
);
/* hostlist_push_list():
/* hostlist_push_list():
...
@@ -211,7 +205,7 @@ char * hostlist_shift_range(hostlist_t hl);
...
@@ -211,7 +205,7 @@ char * hostlist_shift_range(hostlist_t hl);
* Returns -1 if host is not found.
* Returns -1 if host is not found.
*
*
*/
*/
int
hostlist_find
(
hostlist_t
hl
,
char
*
hostname
);
int
hostlist_find
(
hostlist_t
hl
,
const
char
*
hostname
);
/* hostlist_delete():
/* hostlist_delete():
*
*
...
@@ -219,7 +213,7 @@ int hostlist_find(hostlist_t hl, char *hostname);
...
@@ -219,7 +213,7 @@ int hostlist_find(hostlist_t hl, char *hostname);
*
*
* Returns the number of hosts successfully deleted
* Returns the number of hosts successfully deleted
*/
*/
int
hostlist_delete
(
hostlist_t
hl
,
char
*
hosts
);
int
hostlist_delete
(
hostlist_t
hl
,
const
char
*
hosts
);
/* hostlist_delete_host():
/* hostlist_delete_host():
...
@@ -230,7 +224,7 @@ int hostlist_delete(hostlist_t hl, char *hosts);
...
@@ -230,7 +224,7 @@ int hostlist_delete(hostlist_t hl, char *hosts);
*
*
* Returns 1 if successful, 0 if hostname is not found in list.
* Returns 1 if successful, 0 if hostname is not found in list.
*/
*/
int
hostlist_delete_host
(
hostlist_t
hl
,
char
*
hostname
);
int
hostlist_delete_host
(
hostlist_t
hl
,
const
char
*
hostname
);
/* hostlist_delete_nth():
/* hostlist_delete_nth():
...
@@ -370,7 +364,7 @@ int hostlist_remove(hostlist_iterator_t i);
...
@@ -370,7 +364,7 @@ int hostlist_remove(hostlist_iterator_t i);
* Create a new hostset object from a string representation of a list of
* Create a new hostset object from a string representation of a list of
* hosts. See hostlist_create() for valid hostlist forms.
* hosts. See hostlist_create() for valid hostlist forms.
*/
*/
hostset_t
hostset_create
(
char
*
hostlist
);
hostset_t
hostset_create
(
const
char
*
hostlist
);
/* hostset_copy():
/* hostset_copy():
*
*
...
@@ -388,19 +382,19 @@ void hostset_destroy(hostset_t set);
...
@@ -388,19 +382,19 @@ void hostset_destroy(hostset_t set);
* Returns number of hosts successfully added to "set"
* Returns number of hosts successfully added to "set"
* (insertion of a duplicate is not considered successful)
* (insertion of a duplicate is not considered successful)
*/
*/
int
hostset_insert
(
hostset_t
set
,
char
*
hosts
);
int
hostset_insert
(
hostset_t
set
,
const
char
*
hosts
);
/* hostset_delete():
/* hostset_delete():
* Delete a host or list of hosts from hostset "set."
* Delete a host or list of hosts from hostset "set."
* Returns number of hosts deleted from set.
* Returns number of hosts deleted from set.
*/
*/
int
hostset_delete
(
hostset_t
set
,
char
*
hosts
);
int
hostset_delete
(
hostset_t
set
,
const
char
*
hosts
);
/* hostset_within():
/* hostset_within():
* Return 1 if all hosts specified by "hosts" are within the hostset "set"
* Return 1 if all hosts specified by "hosts" are within the hostset "set"
* Retrun 0 if every host in "hosts" is not in the hostset "set"
* Retrun 0 if every host in "hosts" is not in the hostset "set"
*/
*/
int
hostset_within
(
hostset_t
set
,
char
*
hosts
);
int
hostset_within
(
hostset_t
set
,
const
char
*
hosts
);
/* hostset_shift():
/* hostset_shift():
* hostset equivalent to hostlist_shift()
* hostset equivalent to hostlist_shift()
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment