1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/**
* Copyright (C) Mellanox Technologies Ltd. 2018. ALL RIGHTS RESERVED.
*
* See file LICENSE for terms.
*/
/**
* Set library function call hook using Binary Instrumentation
* method (BISTRO): replace function body by user defined call
*
* @param func_ptr Pointer to function to patch.
* @param hook User-defined function-replacer.
* @param symbol Function name to replace.
* @param orig_func_p If non-NULL, set to pointer to a trampoline which calls
* the original function (before patching). If it's not
* possible to create such trampoline, the function returns
* @ref UCS_ERR_UNSUPPORTED.
* @param rp Restore point used to restore original function.
* Optional, may be NULL.
*
* @return Error code as defined by @ref ucs_status_t
*/
ucs_status_t ;