Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
scord
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
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
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
eu
ADMIRE
scord
Commits
68041f58
Verified
Commit
68041f58
authored
2 years ago
by
Alberto Miranda
Browse files
Options
Downloads
Patches
Plain Diff
ADM_qos_entity_create() now accepts a void* rather than ...
parent
765dc772
No related branches found
No related tags found
1 merge request
!30
Resolve "Refactor library RPC implementation of `admire::transfer_dataset`"
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/common/api/admire_types.h
+2
-2
2 additions, 2 deletions
src/common/api/admire_types.h
src/common/api/types.cpp
+5
-9
5 additions, 9 deletions
src/common/api/types.cpp
with
7 additions
and
11 deletions
src/common/api/admire_types.h
+
2
−
2
View file @
68041f58
...
...
@@ -460,13 +460,13 @@ ADM_pfs_context_destroy(ADM_pfs_context_t ctx);
*
* @param[in] scope The scope of the entity, i.e. ADM_QOS_SCOPE_DATASET,
* ADM_QOS_SCOPE_NODE, or ADM_QOS_SCOPE_JOB.
* @param[in]
...
A single argument with data from either a ADM_dataset_t,
* @param[in]
data
A single argument with data from either a ADM_dataset_t,
* ADM_node_t, or ADM_job_t variable. The argument must correspond properly
* to the scope provided.
* @return A valid ADM_qos_entity_t if successful or NULL in case of failure.
*/
ADM_qos_entity_t
ADM_qos_entity_create
(
ADM_qos_scope_t
scope
,
...
);
ADM_qos_entity_create
(
ADM_qos_scope_t
scope
,
void
*
data
);
/**
* Destroy a QoS entity created by ADM_qos_entity_create().
...
...
This diff is collapsed.
Click to expand it.
src/common/api/types.cpp
+
5
−
9
View file @
68041f58
...
...
@@ -159,7 +159,7 @@ ADM_dataset_destroy(ADM_dataset_t dataset) {
}
ADM_qos_entity_t
ADM_qos_entity_create
(
ADM_qos_scope_t
scope
,
...
)
{
ADM_qos_entity_create
(
ADM_qos_scope_t
scope
,
void
*
data
)
{
struct
adm_qos_entity
*
adm_qos_entity
=
(
struct
adm_qos_entity
*
)
malloc
(
sizeof
(
struct
adm_qos_entity
));
...
...
@@ -171,23 +171,19 @@ ADM_qos_entity_create(ADM_qos_scope_t scope, ...) {
adm_qos_entity
->
e_scope
=
scope
;
va_list
ap
;
va_start
(
ap
,
scope
);
switch
(
scope
)
{
case
ADM_QOS_SCOPE_NODE
:
adm_qos_entity
->
e_node
=
va_arg
(
ap
,
ADM_node_t
);
adm_qos_entity
->
e_node
=
(
ADM_node_t
)
data
;
break
;
case
ADM_QOS_SCOPE_JOB
:
adm_qos_entity
->
e_job
=
va_arg
(
ap
,
ADM_job_t
);
adm_qos_entity
->
e_job
=
(
ADM_job_t
)
data
;
break
;
case
ADM_QOS_SCOPE_DATASET
:
adm_qos_entity
->
e_dataset
=
va_arg
(
ap
,
ADM_dataset_t
);
adm_qos_entity
->
e_dataset
=
(
ADM_dataset_t
)
data
;
break
;
case
ADM_QOS_SCOPE_TRANSFER
:
adm_qos_entity
->
e_transfer
=
va_arg
(
ap
,
ADM_transfer_t
);
adm_qos_entity
->
e_transfer
=
(
ADM_transfer_t
)
data
;
}
va_end
(
ap
);
return
adm_qos_entity
;
}
...
...
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