1*796e1f6bSFrançois Tigeot /* 2*796e1f6bSFrançois Tigeot * Copyright (c) 2015 François Tigeot 3*796e1f6bSFrançois Tigeot * All rights reserved. 4*796e1f6bSFrançois Tigeot * 5*796e1f6bSFrançois Tigeot * Redistribution and use in source and binary forms, with or without 6*796e1f6bSFrançois Tigeot * modification, are permitted provided that the following conditions 7*796e1f6bSFrançois Tigeot * are met: 8*796e1f6bSFrançois Tigeot * 1. Redistributions of source code must retain the above copyright 9*796e1f6bSFrançois Tigeot * notice unmodified, this list of conditions, and the following 10*796e1f6bSFrançois Tigeot * disclaimer. 11*796e1f6bSFrançois Tigeot * 2. Redistributions in binary form must reproduce the above copyright 12*796e1f6bSFrançois Tigeot * notice, this list of conditions and the following disclaimer in the 13*796e1f6bSFrançois Tigeot * documentation and/or other materials provided with the distribution. 14*796e1f6bSFrançois Tigeot * 15*796e1f6bSFrançois Tigeot * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 16*796e1f6bSFrançois Tigeot * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 17*796e1f6bSFrançois Tigeot * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 18*796e1f6bSFrançois Tigeot * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 19*796e1f6bSFrançois Tigeot * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 20*796e1f6bSFrançois Tigeot * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 21*796e1f6bSFrançois Tigeot * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 22*796e1f6bSFrançois Tigeot * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23*796e1f6bSFrançois Tigeot * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 24*796e1f6bSFrançois Tigeot * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25*796e1f6bSFrançois Tigeot */ 26*796e1f6bSFrançois Tigeot 27*796e1f6bSFrançois Tigeot #ifndef _LINUX_ASYNC_H_ 28*796e1f6bSFrançois Tigeot #define _LINUX_ASYNC_H_ 29*796e1f6bSFrançois Tigeot 30*796e1f6bSFrançois Tigeot #include <linux/types.h> 31*796e1f6bSFrançois Tigeot #include <linux/list.h> 32*796e1f6bSFrançois Tigeot 33*796e1f6bSFrançois Tigeot typedef u64 async_cookie_t; 34*796e1f6bSFrançois Tigeot typedef void (*async_func_t) (void *data, async_cookie_t cookie); 35*796e1f6bSFrançois Tigeot 36*796e1f6bSFrançois Tigeot extern async_cookie_t async_schedule(async_func_t func, void *data); 37*796e1f6bSFrançois Tigeot 38*796e1f6bSFrançois Tigeot static inline void async_synchronize_full(void) { 39*796e1f6bSFrançois Tigeot /* 40*796e1f6bSFrançois Tigeot * XXX: This function is supposed to wait until all asynchronous 41*796e1f6bSFrançois Tigeot * function calls have been done 42*796e1f6bSFrançois Tigeot */ 43*796e1f6bSFrançois Tigeot } 44*796e1f6bSFrançois Tigeot 45*796e1f6bSFrançois Tigeot #endif /* _LINUX_ASYNC_H_ */ 46