1 /* 2 * Copyright (c) 2009 Cisco Systems, Inc. All rights reserved. 3 * Copyright (c) 2016 Research Organization for Information Science 4 * and Technology (RIST). All rights reserved. 5 * $COPYRIGHT$ 6 * 7 * Additional copyrights may follow 8 * 9 * $HEADER$ 10 */ 11 12 #ifndef OPAL_MCA_MEMCPY_BASE_MEMORY_BASE_DEFAULT_H 13 #define OPAL_MCA_MEMCPY_BASE_MEMORY_BASE_DEFAULT_H 14 15 #include "opal_config.h" 16 17 /** 18 * Provided for memory components that don't provide an asynchronous 19 * method for determining if memory mappings have changed. If a 20 * component only has a synchronous / interactive method of checking, 21 * then it can override this macro with some logic to do a (hopefully) 22 * cheap check to see if memory mappings have changed. The intent is 23 * that if this cheap check returns true, the upper layer will then 24 * invoke the memoryc_process() function to actually process what 25 * changed. This function will be invoked by the upper layer with the 26 * syntax: 27 * 28 * if (opal_memory_changed()) { ... } 29 * 30 * Hence, if you need any kind of sophisticated logic, you might want 31 * to put it in an inline function and have the #define call the 32 * inline function. 33 */ 34 #define opal_memory_changed() 0 35 36 BEGIN_C_DECLS 37 38 /** 39 * Default (empty) implementation of the memoryc_register function. 40 * 41 * See opal/mca/memory/memory.h for a description of the parameters. 42 */ 43 OPAL_DECLSPEC int opal_memory_base_component_register_empty(void *start, 44 size_t len, 45 uint64_t cookie); 46 47 /** 48 * Default (empty) implementation of the memoryc_deregister function 49 * 50 * See opal/mca/memory/memory.h for a description of the parameters. 51 */ 52 OPAL_DECLSPEC int opal_memory_base_component_deregister_empty(void *start, 53 size_t len, 54 uint64_t cookie); 55 56 /** 57 * Default (empty) implementation of the memoryc_set_alignment function 58 * 59 * See opal/mca/memory/memory.h for a description of the parameters. 60 */ 61 OPAL_DECLSPEC void opal_memory_base_component_set_alignment_empty(int use_memalign, 62 size_t memalign_threshold); 63 64 65 END_C_DECLS 66 67 #endif