Lines Matching +full:int +full:- +full:a

3  * Copyright (c) 2017 Oticon A/S
6 * SPDX-License-Identifier: Apache-2.0
26 typedef int (*direct_irq_f_ptr)(void);
30 static int currently_running_irq = -1;
32 static inline void vector_to_irq(int irq_nbr, int *may_swap) in vector_to_irq()
38 posix_print_error_and_exit("Received irq %i without a " in vector_to_irq()
61 * needed, swap to a re-enabled thread
63 * Note that even that this function is executing in a Zephyr thread, it is
70 int irq_nbr; in posix_irq_handler()
71 static int may_swap; in posix_irq_handler()
82 if (irq_nbr == -1) { in posix_irq_handler()
83 /* This is a phony interrupt during a busy wait, no need for more */ in posix_irq_handler()
94 int last_current_running_prio = hw_irq_ctrl_get_cur_prio(); in posix_irq_handler()
95 int last_running_irq = currently_running_irq; in posix_irq_handler()
105 } while ((irq_nbr = hw_irq_ctrl_get_highest_prio_irq()) != -1); in posix_irq_handler()
107 _kernel.cpus[0].nested--; in posix_irq_handler()
130 * if a higher priority interrupt than the possibly currently running is in nsif_cpu0_irq_raised_from_sw()
134 if (hw_irq_ctrl_get_highest_prio_irq() != -1) { in nsif_cpu0_irq_raised_from_sw()
138 "called from a HW model thread\n", in nsif_cpu0_irq_raised_from_sw()
150 * task or fiber level. This routine returns an architecture-dependent
151 * lock-out key representing the "interrupt disable state" prior to the call;
152 * this key can be passed to irq_unlock() to re-enable interrupts.
154 * The lock-out key should only be used as the argument to the irq_unlock()
155 * API. It should never be used to manually re-enable interrupts or to inspect
158 * This function can be called recursively: it will return a key to return the
162 * Invoking a kernel routine with interrupts locked may result in
163 * interrupts being re-enabled for an unspecified period of time. If the
164 * called routine blocks, interrupts will be re-enabled while another
167 * The "interrupt disable state" is an attribute of a thread. Thus, if a
168 * fiber or task disables interrupts and subsequently invokes a kernel
173 * @return An architecture-dependent lock-out key representing the
177 unsigned int posix_irq_lock(void) in posix_irq_lock()
185 * This routine re-enables interrupts on the CPU. The @a key parameter is a
186 * board-dependent lock-out key that is returned by a previous invocation of
191 void posix_irq_unlock(unsigned int key) in posix_irq_unlock()
201 void posix_irq_enable(unsigned int irq) in posix_irq_enable()
206 void posix_irq_disable(unsigned int irq) in posix_irq_disable()
211 int posix_irq_is_enabled(unsigned int irq) in posix_irq_is_enabled()
216 int posix_get_current_irq(void) in posix_get_current_irq()
222 * Configure a static interrupt.
231 * @param flags [plug it directly (1), or as a SW managed interrupt (0)]
236 void posix_isr_declare(unsigned int irq_p, int flags, void isr_p(const void *), in posix_isr_declare()
257 void posix_irq_priority_set(unsigned int irq, unsigned int prio, uint32_t flags) in posix_irq_priority_set()
264 * set a pending IRQ from SW
267 * IRQs are not locked, and this interrupt has higher priority than a possibly
270 void posix_sw_set_pending_IRQ(unsigned int IRQn) in posix_sw_set_pending_IRQ()
277 * clear a pending irq from SW
279 void posix_sw_clear_pending_IRQ(unsigned int IRQn) in posix_sw_clear_pending_IRQ()
294 static void offload_sw_irq_handler(const void *a) in offload_sw_irq_handler() argument
296 ARG_UNUSED(a); in offload_sw_irq_handler()
301 * @brief Run a function in interrupt context