memory/patcher: fix a compiler warning
Don't define the madvise intercept functions since we're not currently intercepting madvise. Signed-off-by: Jeff Squyres <jsquyres@cisco.com>
Этот коммит содержится в:
родитель
60ca372d60
Коммит
b51c4e2797
@ -10,7 +10,7 @@
|
||||
* University of Stuttgart. All rights reserved.
|
||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2009-2016 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2009-2017 Cisco Systems, Inc. All rights reserved
|
||||
* Copyright (c) 2013-2017 Los Alamos National Security, LLC. All rights
|
||||
* reserved.
|
||||
* Copyright (c) 2016 Research Organization for Information Science
|
||||
@ -59,6 +59,11 @@ static int patcher_query (int *);
|
||||
|
||||
static int mca_memory_patcher_priority;
|
||||
|
||||
/* NTH: we can't currently allow madvise to be intercepted due to a
|
||||
* deadlock when running with glibc. In the future, we may re-enable
|
||||
* this hook if the deadlock can be resolved. */
|
||||
#define WANT_INTERCEPT_MADVISE 0
|
||||
|
||||
opal_memory_patcher_component_t mca_memory_patcher_component = {
|
||||
.super = {
|
||||
.memoryc_version = {
|
||||
@ -244,6 +249,7 @@ static void *intercept_mremap (void *start, size_t oldlen, void *new_address, si
|
||||
|
||||
#endif
|
||||
|
||||
#if WANT_INTERCEPT_MADVISE
|
||||
#if defined (SYS_madvise)
|
||||
|
||||
static int (*original_madvise) (void *, size_t, int);
|
||||
@ -278,6 +284,7 @@ static int intercept_madvise (void *start, size_t length, int advice)
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif // WANT_INTERCEPT_MADVISE
|
||||
|
||||
#if defined SYS_brk
|
||||
|
||||
@ -496,16 +503,14 @@ static int patcher_open (void)
|
||||
}
|
||||
#endif
|
||||
|
||||
/* NTH: we can't currently allow madvise to be intercepted due to a deadlock when running with glibc. in
|
||||
* the future we may re-enable this hook if the deadlock can be resolved. */
|
||||
#if 0
|
||||
#if WANT_INTERCEPT_MADVISE
|
||||
#if defined (SYS_madvise)
|
||||
rc = opal_patcher->patch_symbol ("madvise", (uintptr_t)intercept_madvise, (uintptr_t *) &original_madvise);
|
||||
if (OPAL_SUCCESS != rc) {
|
||||
return rc;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
#endif // WANT_INTERCEPT_MADVISE
|
||||
|
||||
#if defined(SYS_shmdt) && defined(__linux__)
|
||||
rc = opal_patcher->patch_symbol ("shmdt", (uintptr_t) intercept_shmdt, (uintptr_t *) &original_shmdt);
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user