2 * Copyright (c) 2005-2009 Brocade Communications Systems, Inc.
6 * Linux driver for Brocade Fibre Channel Host Bus Adapter.
8 * This program is free software; you can redistribute it and/or modify it
9 * under the terms of the GNU General Public License (GPL) Version 2 as
10 * published by the Free Software Foundation
12 * This program is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * General Public License for more details.
17 #ifndef __BFA_TIMER_H__
18 #define __BFA_TIMER_H__
20 #include <bfa_os_inc.h>
25 typedef void (*bfa_timer_cbfn_t
)(void *);
28 * BFA timer data structure
32 bfa_timer_cbfn_t timercb
;
34 int timeout
; /**< in millisecs. */
38 * Timer module structure
40 struct bfa_timer_mod_s
{
41 struct list_head timer_q
;
44 #define BFA_TIMER_FREQ 200 /**< specified in millisecs */
46 void bfa_timer_beat(struct bfa_timer_mod_s
*mod
);
47 void bfa_timer_init(struct bfa_timer_mod_s
*mod
);
48 void bfa_timer_begin(struct bfa_timer_mod_s
*mod
, struct bfa_timer_s
*timer
,
49 bfa_timer_cbfn_t timercb
, void *arg
,
50 unsigned int timeout
);
51 void bfa_timer_stop(struct bfa_timer_s
*timer
);
53 #endif /* __BFA_TIMER_H__ */