forked from openucx/ucx
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Lior Paz
committed
Aug 4, 2021
1 parent
159d43c
commit 3300c6b
Showing
8 changed files
with
76 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/** | ||
* Copyright (C) Mellanox Technologies Ltd. 2001-2012. ALL RIGHTS RESERVED. | ||
* Copyright (c) UT-Battelle, LLC. 2014-2019. ALL RIGHTS RESERVED. | ||
* Copyright (C) ARM Ltd. 2016-2017. ALL RIGHTS RESERVED. | ||
* | ||
* See file LICENSE for terms. | ||
*/ | ||
|
||
#ifdef HAVE_CONFIG_H | ||
# include "config.h" | ||
#endif | ||
|
||
#include "uid.h" | ||
|
||
#include <ucs/sys/sys.h> | ||
|
||
|
||
uint64_t ucs_get_system_id() | ||
{ | ||
uint64_t high; | ||
uint64_t low; | ||
ucs_status_t status; | ||
|
||
status = ucs_sys_get_boot_id(&high, &low); | ||
if (status == UCS_OK) { | ||
return high ^ low; | ||
} | ||
|
||
return ucs_machine_guid(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/** | ||
* Copyright (C) Mellanox Technologies Ltd. 2001-2014. ALL RIGHTS RESERVED. | ||
* Copyright (c) UT-Battelle, LLC. 2014-2019. ALL RIGHTS RESERVED. | ||
* Copyright (C) ARM Ltd. 2016. ALL RIGHTS RESERVED. | ||
* | ||
* See file LICENSE for terms. | ||
*/ | ||
|
||
#ifndef UCS_UID_H | ||
#define UCS_UID_H | ||
|
||
#include <ucs/sys/compiler_def.h> | ||
#include <stdint.h> | ||
|
||
BEGIN_C_DECLS | ||
|
||
/** @file uid.h */ | ||
|
||
/** | ||
* Read boot ID value or use machine_guid. | ||
* | ||
* @return 64-bit value representing system ID. | ||
*/ | ||
uint64_t ucs_get_system_id(); | ||
|
||
END_C_DECLS | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters