Lines Matching refs:user_buffer
82 static bool is_user_buffer_correctly_preallocated(void const *user_buffer, size_t user_length, in is_user_buffer_correctly_preallocated() argument
85 uintptr_t addr = (uintptr_t)user_buffer; in is_user_buffer_correctly_preallocated()
125 int dmm_buffer_out_prepare(void *region, void const *user_buffer, size_t user_length, in dmm_buffer_out_prepare() argument
132 *buffer_out = (void *)user_buffer; in dmm_buffer_out_prepare()
147 if (is_user_buffer_correctly_preallocated(user_buffer, user_length, dh->region)) { in dmm_buffer_out_prepare()
149 *buffer_out = (void *)user_buffer; in dmm_buffer_out_prepare()
161 memcpy(*buffer_out, user_buffer, user_length); in dmm_buffer_out_prepare()
199 int dmm_buffer_in_prepare(void *region, void *user_buffer, size_t user_length, void **buffer_in) in dmm_buffer_in_prepare() argument
205 *buffer_in = (void *)user_buffer; in dmm_buffer_in_prepare()
220 if (is_user_buffer_correctly_preallocated(user_buffer, user_length, dh->region)) { in dmm_buffer_in_prepare()
222 *buffer_in = user_buffer; in dmm_buffer_in_prepare()
246 int dmm_buffer_in_release(void *region, void *user_buffer, size_t user_length, void *buffer_in) in dmm_buffer_in_release() argument
269 if (buffer_in != user_buffer) { in dmm_buffer_in_release()
270 memcpy(user_buffer, buffer_in, user_length); in dmm_buffer_in_release()