1*2581d4aaSFrançois Tigeot /* 2*2581d4aaSFrançois Tigeot * Copyright (c) 2014 François Tigeot 3*2581d4aaSFrançois Tigeot * All rights reserved. 4*2581d4aaSFrançois Tigeot * 5*2581d4aaSFrançois Tigeot * Redistribution and use in source and binary forms, with or without 6*2581d4aaSFrançois Tigeot * modification, are permitted provided that the following conditions 7*2581d4aaSFrançois Tigeot * are met: 8*2581d4aaSFrançois Tigeot * 1. Redistributions of source code must retain the above copyright 9*2581d4aaSFrançois Tigeot * notice unmodified, this list of conditions, and the following 10*2581d4aaSFrançois Tigeot * disclaimer. 11*2581d4aaSFrançois Tigeot * 2. Redistributions in binary form must reproduce the above copyright 12*2581d4aaSFrançois Tigeot * notice, this list of conditions and the following disclaimer in the 13*2581d4aaSFrançois Tigeot * documentation and/or other materials provided with the distribution. 14*2581d4aaSFrançois Tigeot * 15*2581d4aaSFrançois Tigeot * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 16*2581d4aaSFrançois Tigeot * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 17*2581d4aaSFrançois Tigeot * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 18*2581d4aaSFrançois Tigeot * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 19*2581d4aaSFrançois Tigeot * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 20*2581d4aaSFrançois Tigeot * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 21*2581d4aaSFrançois Tigeot * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 22*2581d4aaSFrançois Tigeot * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23*2581d4aaSFrançois Tigeot * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 24*2581d4aaSFrançois Tigeot * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25*2581d4aaSFrançois Tigeot */ 26*2581d4aaSFrançois Tigeot 27*2581d4aaSFrançois Tigeot #ifndef _LINUX_MUTEX_H_ 28*2581d4aaSFrançois Tigeot #define _LINUX_MUTEX_H_ 29*2581d4aaSFrançois Tigeot 30*2581d4aaSFrançois Tigeot #include <sys/lock.h> 31*2581d4aaSFrançois Tigeot 32*2581d4aaSFrançois Tigeot #define mutex_is_locked(lock) (lockcount(lock) != 0) 33*2581d4aaSFrançois Tigeot 34*2581d4aaSFrançois Tigeot #endif /* _LINUX_MUTEX_H_ */ 35