version 1.29, 2012/03/29 20:08:22 |
version 1.30, 2012/04/11 06:05:43 |
|
|
struct timespec file_ts; |
struct timespec file_ts; |
struct filelist file_list; |
struct filelist file_list; |
struct timo *timo_queue; |
struct timo *timo_queue; |
unsigned timo_abstime; |
unsigned int timo_abstime; |
int file_slowaccept = 0; |
int file_slowaccept = 0; |
#ifdef DEBUG |
#ifdef DEBUG |
long long file_wtime, file_utime; |
long long file_wtime, file_utime; |
|
|
* must not be already scheduled |
* must not be already scheduled |
*/ |
*/ |
void |
void |
timo_add(struct timo *o, unsigned delta) |
timo_add(struct timo *o, unsigned int delta) |
{ |
{ |
struct timo **i; |
struct timo **i; |
unsigned val; |
unsigned int val; |
int diff; |
int diff; |
|
|
#ifdef DEBUG |
#ifdef DEBUG |
|
|
* calls expired timeouts |
* calls expired timeouts |
*/ |
*/ |
void |
void |
timo_update(unsigned delta) |
timo_update(unsigned int delta) |
{ |
{ |
struct timo *to; |
struct timo *to; |
int diff; |
int diff; |
|
|
#endif |
#endif |
|
|
struct file * |
struct file * |
file_new(struct fileops *ops, char *name, unsigned nfds) |
file_new(struct fileops *ops, char *name, unsigned int nfds) |
{ |
{ |
struct file *f; |
struct file *f; |
|
|
|
|
timo_done(); |
timo_done(); |
} |
} |
|
|
unsigned |
unsigned int |
file_read(struct file *f, unsigned char *data, unsigned count) |
file_read(struct file *f, unsigned char *data, unsigned int count) |
{ |
{ |
unsigned n; |
unsigned int n; |
#ifdef DEBUG |
#ifdef DEBUG |
struct timespec ts0, ts1; |
struct timespec ts0, ts1; |
long us; |
long us; |
|
|
return n; |
return n; |
} |
} |
|
|
unsigned |
unsigned int |
file_write(struct file *f, unsigned char *data, unsigned count) |
file_write(struct file *f, unsigned char *data, unsigned int count) |
{ |
{ |
unsigned n; |
unsigned int n; |
#ifdef DEBUG |
#ifdef DEBUG |
struct timespec ts0, ts1; |
struct timespec ts0, ts1; |
long us; |
long us; |