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