@@ -24,15 +24,15 @@ typedef enum umf_memory_visibility_t {
2424} umf_memory_visibility_t ;
2525
2626/// @brief Protection of the memory allocations
27- typedef enum umf_mem_protection_flags_t {
27+ typedef enum umf_mem_protection_flag_t {
2828 UMF_PROTECTION_NONE = (1 << 0 ), ///< Memory allocations can not be accessed
2929 UMF_PROTECTION_READ = (1 << 1 ), ///< Memory allocations can be read.
3030 UMF_PROTECTION_WRITE = (1 << 2 ), ///< Memory allocations can be written.
3131 UMF_PROTECTION_EXEC = (1 << 3 ), ///< Memory allocations can be executed.
3232 /// @cond
3333 UMF_PROTECTION_MAX // must be the last one
3434 /// @endcond
35- } umf_mem_protection_flags_t ;
35+ } umf_mem_protection_flag_t ;
3636
3737/// @brief A struct containing memory provider specific set of functions
3838typedef struct umf_memory_provider_t * umf_memory_provider_handle_t ;
@@ -100,10 +100,11 @@ umf_result_t umfMemoryProviderFree(umf_memory_provider_handle_t hProvider,
100100/// @param ppMessage [out] pointer to a string containing provider specific
101101/// result in string representation
102102/// @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.
103104///
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 );
107108
108109///
109110/// @brief Retrieve recommended page size for a given allocation size.
@@ -217,21 +218,24 @@ umfMemoryProviderCloseIPCHandle(umf_memory_provider_handle_t hProvider,
217218///
218219/// @brief Retrieve name of a given memory \p hProvider.
219220/// @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 );
223225
224226///
225227/// @brief Retrieve handle to the last memory provider that returned status other
226228/// than UMF_RESULT_SUCCESS on the calling thread.
229+ /// @param provider [out] pointer to the handle to the last failed memory provider
227230///
228231/// \details Handle to the memory provider is stored in the thread local
229232/// storage. The handle is updated every time a memory provider
230233/// returns status other than UMF_RESULT_SUCCESS.
231234///
232- /// @return Handle to the memory provider
235+ /// @return UMF_RESULT_SUCCESS on success or appropriate error code on failure.
233236///
234- umf_memory_provider_handle_t umfGetLastFailedMemoryProvider (void );
237+ umf_result_t
238+ umfGetLastFailedMemoryProvider (umf_memory_provider_handle_t * provider );
235239
236240///
237241/// @brief Splits a coarse grain allocation into 2 adjacent allocations that
0 commit comments