@@ -24,15 +24,15 @@ typedef enum umf_memory_visibility_t {
24
24
} umf_memory_visibility_t ;
25
25
26
26
/// @brief Protection of the memory allocations
27
- typedef enum umf_mem_protection_flags_t {
27
+ typedef enum umf_mem_protection_flag_t {
28
28
UMF_PROTECTION_NONE = (1 << 0 ), ///< Memory allocations can not be accessed
29
29
UMF_PROTECTION_READ = (1 << 1 ), ///< Memory allocations can be read.
30
30
UMF_PROTECTION_WRITE = (1 << 2 ), ///< Memory allocations can be written.
31
31
UMF_PROTECTION_EXEC = (1 << 3 ), ///< Memory allocations can be executed.
32
32
/// @cond
33
33
UMF_PROTECTION_MAX // must be the last one
34
34
/// @endcond
35
- } umf_mem_protection_flags_t ;
35
+ } umf_mem_protection_flag_t ;
36
36
37
37
/// @brief A struct containing memory provider specific set of functions
38
38
typedef struct umf_memory_provider_t * umf_memory_provider_handle_t ;
@@ -100,10 +100,11 @@ umf_result_t umfMemoryProviderFree(umf_memory_provider_handle_t hProvider,
100
100
/// @param ppMessage [out] pointer to a string containing provider specific
101
101
/// result in string representation
102
102
/// @param pError [out] pointer to an integer where the adapter specific error code will be stored
103
+ /// @return UMF_RESULT_SUCCESS on success or appropriate error code on failure.
103
104
///
104
- void umfMemoryProviderGetLastNativeError ( umf_memory_provider_handle_t hProvider ,
105
- const char * * ppMessage ,
106
- int32_t * pError );
105
+ umf_result_t
106
+ umfMemoryProviderGetLastNativeError ( umf_memory_provider_handle_t hProvider ,
107
+ const char * * ppMessage , int32_t * pError );
107
108
108
109
///
109
110
/// @brief Retrieve recommended page size for a given allocation size.
@@ -217,21 +218,24 @@ umfMemoryProviderCloseIPCHandle(umf_memory_provider_handle_t hProvider,
217
218
///
218
219
/// @brief Retrieve name of a given memory \p hProvider.
219
220
/// @param hProvider handle to the memory provider
220
- /// @return pointer to a string containing the name of the \p hProvider
221
- ///
222
- const char * umfMemoryProviderGetName (umf_memory_provider_handle_t hProvider );
221
+ /// @param name [out] pointer to the provider name string
222
+ /// @return UMF_RESULT_SUCCESS on success or appropriate error code on failure
223
+ umf_result_t umfMemoryProviderGetName (umf_memory_provider_handle_t hProvider ,
224
+ const char * * name );
223
225
224
226
///
225
227
/// @brief Retrieve handle to the last memory provider that returned status other
226
228
/// than UMF_RESULT_SUCCESS on the calling thread.
229
+ /// @param provider [out] pointer to the handle to the last failed memory provider
227
230
///
228
231
/// \details Handle to the memory provider is stored in the thread local
229
232
/// storage. The handle is updated every time a memory provider
230
233
/// returns status other than UMF_RESULT_SUCCESS.
231
234
///
232
- /// @return Handle to the memory provider
235
+ /// @return UMF_RESULT_SUCCESS on success or appropriate error code on failure.
233
236
///
234
- umf_memory_provider_handle_t umfGetLastFailedMemoryProvider (void );
237
+ umf_result_t
238
+ umfGetLastFailedMemoryProvider (umf_memory_provider_handle_t * provider );
235
239
236
240
///
237
241
/// @brief Splits a coarse grain allocation into 2 adjacent allocations that
0 commit comments