mars/mars_check.h

41 lines
670 B
C
Raw Normal View History

2010-08-03 16:03:32 +00:00
// (c) 2010 Thomas Schoebel-Theuer / 1&1 Internet AG
#ifndef MARS_CHECK_H
#define MARS_CHECK_H
2010-08-09 16:57:56 +00:00
#define CHECK_LOCK
2010-08-08 09:03:42 +00:00
2010-12-15 12:13:18 +00:00
struct check_mref_aspect {
GENERIC_ASPECT(mref);
2010-08-08 09:03:42 +00:00
#ifdef CHECK_LOCK
2010-08-05 15:54:48 +00:00
struct list_head mref_head;
2010-08-08 09:03:42 +00:00
#endif
2010-08-08 14:02:54 +00:00
struct generic_callback cb;
struct check_output *output;
2010-08-03 16:03:32 +00:00
unsigned long last_jiffies;
2010-08-09 16:57:56 +00:00
atomic_t call_count;
atomic_t callback_count;
2010-08-10 17:39:30 +00:00
bool installed;
2010-08-03 16:03:32 +00:00
};
struct check_brick {
MARS_BRICK(check);
};
struct check_input {
MARS_INPUT(check);
};
struct check_output {
MARS_OUTPUT(check);
int instance_nr;
2010-08-08 09:03:42 +00:00
#ifdef CHECK_LOCK
2010-08-09 16:57:56 +00:00
struct task_struct *watchdog;
2010-08-08 09:03:42 +00:00
spinlock_t check_lock;
2010-08-05 15:54:48 +00:00
struct list_head mref_anchor;
2010-08-08 09:03:42 +00:00
#endif
2010-08-03 16:03:32 +00:00
};
MARS_TYPES(check);
#endif