version 1.7, 2008/11/16 21:16:08 |
version 1.8, 2008/12/27 14:23:40 |
|
|
struct file *f, *fnext; |
struct file *f, *fnext; |
struct aproc *p; |
struct aproc *p; |
#ifdef DEBUG |
#ifdef DEBUG |
unsigned nused; |
unsigned nused, nfound; |
#endif |
#endif |
|
|
/* |
/* |
|
|
nfds = 0; |
nfds = 0; |
#ifdef DEBUG |
#ifdef DEBUG |
nused = 0; |
nused = 0; |
|
nfound = 0; |
#endif |
#endif |
LIST_FOREACH(f, &file_list, entry) { |
LIST_FOREACH(f, &file_list, entry) { |
events = 0; |
events = 0; |
|
|
#ifdef DEBUG |
#ifdef DEBUG |
if (events) |
if (events) |
nused++; |
nused++; |
|
if (f->rproc || f->wproc) |
|
nfound++; |
#endif |
#endif |
DPRINTFN(4, " %s(%x)", f->name, events); |
DPRINTFN(4, " %s(%x)", f->name, events); |
n = f->ops->pollfd(f, pfds + nfds, events); |
n = f->ops->pollfd(f, pfds + nfds, events); |
|
|
DPRINTFN(4, "\n"); |
DPRINTFN(4, "\n"); |
|
|
#ifdef DEBUG |
#ifdef DEBUG |
if (nused == 0 && !LIST_EMPTY(&file_list)) { |
if (nused == 0 && nfound > 0) { |
fprintf(stderr, "file_poll: deadlock\n"); |
fprintf(stderr, "file_poll: deadlock\n"); |
abort(); |
abort(); |
} |
} |