mirror of
https://github.com/torvalds/linux.git
synced 2024-12-09 20:51:43 +00:00
1802d0beec
Based on 1 normalized pattern(s): this program is free software you can redistribute it and or modify it under the terms of the gnu general public license version 2 as published by the free software foundation this program is distributed in the hope that it will be useful but without any warranty without even the implied warranty of merchantability or fitness for a particular purpose see the gnu general public license for more details extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference in 655 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Allison Randal <allison@lohutok.net> Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org> Reviewed-by: Richard Fontana <rfontana@redhat.com> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190527070034.575739538@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
59 lines
1.3 KiB
C
59 lines
1.3 KiB
C
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
/*
|
|
*
|
|
* Author Karsten Keil <kkeil@novell.com>
|
|
*
|
|
* Thanks to Jan den Ouden
|
|
* Fritz Elfert
|
|
* Copyright 2008 by Karsten Keil <kkeil@novell.com>
|
|
*/
|
|
|
|
#ifndef _MISDN_FSM_H
|
|
#define _MISDN_FSM_H
|
|
|
|
#include <linux/timer.h>
|
|
|
|
/* Statemachine */
|
|
|
|
struct FsmInst;
|
|
|
|
typedef void (*FSMFNPTR)(struct FsmInst *, int, void *);
|
|
|
|
struct Fsm {
|
|
FSMFNPTR *jumpmatrix;
|
|
int state_count, event_count;
|
|
char **strEvent, **strState;
|
|
};
|
|
|
|
struct FsmInst {
|
|
struct Fsm *fsm;
|
|
int state;
|
|
int debug;
|
|
void *userdata;
|
|
int userint;
|
|
void (*printdebug) (struct FsmInst *, char *, ...);
|
|
};
|
|
|
|
struct FsmNode {
|
|
int state, event;
|
|
void (*routine) (struct FsmInst *, int, void *);
|
|
};
|
|
|
|
struct FsmTimer {
|
|
struct FsmInst *fi;
|
|
struct timer_list tl;
|
|
int event;
|
|
void *arg;
|
|
};
|
|
|
|
extern int mISDN_FsmNew(struct Fsm *, struct FsmNode *, int);
|
|
extern void mISDN_FsmFree(struct Fsm *);
|
|
extern int mISDN_FsmEvent(struct FsmInst *, int , void *);
|
|
extern void mISDN_FsmChangeState(struct FsmInst *, int);
|
|
extern void mISDN_FsmInitTimer(struct FsmInst *, struct FsmTimer *);
|
|
extern int mISDN_FsmAddTimer(struct FsmTimer *, int, int, void *, int);
|
|
extern void mISDN_FsmRestartTimer(struct FsmTimer *, int, int, void *, int);
|
|
extern void mISDN_FsmDelTimer(struct FsmTimer *, int);
|
|
|
|
#endif
|