* if the call would block.
*/
+ int (*set_release_callback)(void (*release_callback)(void *data),
+ void *data);
+ void *(*get_release_callback_data)(void *callback);
/* after final dma_buf_put() */
void (*release)(struct dma_buf *);
size_t size;
struct file *file;
struct list_head attachments;
+ struct list_head release_callbacks;
const struct dma_buf_ops *ops;
/* mutex to serialize list manipulation, attach/detach and vmap/unmap */
struct mutex lock;
get_file(dmabuf->file);
}
+int dma_buf_set_release_callback(struct dma_buf *dmabuf,
+ void (*callback)(void *), void *data);
+
+void *dma_buf_get_release_callback_data(struct dma_buf *dmabuf,
+ void (*callback)(void *));
+
struct dma_buf_attachment *dma_buf_attach(struct dma_buf *dmabuf,
struct device *dev);
void dma_buf_detach(struct dma_buf *dmabuf,