16a484265SFrançois Tigeot /* 2*f48f2686SFrançois Tigeot * Copyright (c) 2015-2016 François Tigeot 36a484265SFrançois Tigeot * All rights reserved. 46a484265SFrançois Tigeot * 56a484265SFrançois Tigeot * Redistribution and use in source and binary forms, with or without 66a484265SFrançois Tigeot * modification, are permitted provided that the following conditions 76a484265SFrançois Tigeot * are met: 86a484265SFrançois Tigeot * 1. Redistributions of source code must retain the above copyright 96a484265SFrançois Tigeot * notice unmodified, this list of conditions, and the following 106a484265SFrançois Tigeot * disclaimer. 116a484265SFrançois Tigeot * 2. Redistributions in binary form must reproduce the above copyright 126a484265SFrançois Tigeot * notice, this list of conditions and the following disclaimer in the 136a484265SFrançois Tigeot * documentation and/or other materials provided with the distribution. 146a484265SFrançois Tigeot * 156a484265SFrançois Tigeot * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 166a484265SFrançois Tigeot * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 176a484265SFrançois Tigeot * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 186a484265SFrançois Tigeot * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 196a484265SFrançois Tigeot * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 206a484265SFrançois Tigeot * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 216a484265SFrançois Tigeot * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 226a484265SFrançois Tigeot * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 236a484265SFrançois Tigeot * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 246a484265SFrançois Tigeot * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 256a484265SFrançois Tigeot */ 266a484265SFrançois Tigeot 276a484265SFrançois Tigeot #ifndef _LINUX_IRQFLAGS_H_ 286a484265SFrançois Tigeot #define _LINUX_IRQFLAGS_H_ 296a484265SFrançois Tigeot 306a484265SFrançois Tigeot /* 31*f48f2686SFrançois Tigeot * local_irq_disable/enable functions prevent interrupts to run on the 32*f48f2686SFrançois Tigeot * current CPU in critical sections of code. 33*f48f2686SFrançois Tigeot * This maps nicely to crit_enter/exit sequences in the DragonFly kernel 346a484265SFrançois Tigeot */ 35*f48f2686SFrançois Tigeot #define local_irq_disable() crit_enter() 36*f48f2686SFrançois Tigeot #define local_irq_enable() crit_exit() 376a484265SFrançois Tigeot 386a484265SFrançois Tigeot #endif /* _LINUX_IRQFLAGS_H_ */ 39