/*	$OpenBSD: softintr.h,v 1.1 2025/04/23 15:07:00 visa Exp $	*/

/*
 * Copyright (c) 2025 Visa Hankala
 *
 * Permission to use, copy, modify, and distribute this software for any
 * purpose with or without fee is hereby granted, provided that the above
 * copyright notice and this permission notice appear in all copies.
 *
 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 */

#ifndef _SYS_SOFTINTR_H_
#define _SYS_SOFTINTR_H_

#ifdef _KERNEL
#ifdef __USE_MI_SOFTINTR

#define SOFTINTR_CLOCK		0
#define SOFTINTR_NET		1
#define SOFTINTR_TTY		2
#define NSOFTINTR		3

#ifndef _LOCORE
void	softintr_init(void);
void	*softintr_establish(int, void (*)(void *), void *);
void	softintr_disestablish(void *);
void	softintr_dispatch(int);
void	softintr_schedule(void *);
#endif /* !_LOCORE */

#endif /* __USE_MI_SOFTINTR */
#endif /* _KERNEL */

#endif /* !_SYS_SOFTINTR_H_ */
