mars/kernel/mars_sio.h

49 lines
796 B
C
Raw Normal View History

2010-06-15 18:31:06 +00:00
// (c) 2010 Thomas Schoebel-Theuer / 1&1 Internet AG
2011-03-07 10:27:38 +00:00
#ifndef MARS_SIO_H
#define MARS_SIO_H
2010-06-20 18:55:34 +00:00
#define WITH_THREAD 16
2010-06-17 16:57:10 +00:00
2011-03-07 10:27:38 +00:00
struct sio_mref_aspect {
2010-12-15 12:13:18 +00:00
GENERIC_ASPECT(mref);
2010-08-04 17:32:04 +00:00
struct list_head io_head;
int alloc_len;
bool do_dealloc;
2010-07-23 11:55:18 +00:00
};
2011-03-07 10:27:38 +00:00
struct sio_brick {
MARS_BRICK(sio);
// parameters
bool o_direct;
bool o_fdsync;
2010-06-15 18:31:06 +00:00
};
2011-03-07 10:27:38 +00:00
struct sio_input {
MARS_INPUT(sio);
2010-06-15 18:31:06 +00:00
};
2010-06-18 11:44:14 +00:00
struct sio_threadinfo {
2011-03-07 10:27:38 +00:00
struct sio_output *output;
2010-08-05 15:54:48 +00:00
struct list_head mref_list;
2010-06-17 16:57:10 +00:00
struct task_struct *thread;
wait_queue_head_t event;
spinlock_t lock;
2012-02-07 11:24:49 +00:00
atomic_t queue_count;
atomic_t fly_count;
atomic_t total_count;
2010-08-03 16:03:32 +00:00
unsigned long last_jiffies;
2010-06-18 11:44:14 +00:00
};
2011-03-07 10:27:38 +00:00
struct sio_output {
MARS_OUTPUT(sio);
2010-10-22 12:00:08 +00:00
// private
2010-06-18 11:44:14 +00:00
struct file *filp;
struct sio_threadinfo tinfo[WITH_THREAD+1];
spinlock_t g_lock;
int index;
2010-06-15 18:31:06 +00:00
};
2011-03-07 10:27:38 +00:00
MARS_TYPES(sio);
2010-06-20 18:55:34 +00:00
#endif