diff options
author | jmg <jmg@FreeBSD.org> | 2005-03-18 01:11:39 +0000 |
---|---|---|
committer | jmg <jmg@FreeBSD.org> | 2005-03-18 01:11:39 +0000 |
commit | d241e1d02fcb40fb65cf5e6b2f8ac208111568af (patch) | |
tree | 33c119b9e83140350384c75180390ff4fd687f4a /sys/sys/event.h | |
parent | 9a489dbe6b0ab18ebe46eae26f040d161433132b (diff) | |
download | FreeBSD-src-d241e1d02fcb40fb65cf5e6b2f8ac208111568af.zip FreeBSD-src-d241e1d02fcb40fb65cf5e6b2f8ac208111568af.tar.gz |
fix aio+kq... I've been running ambrisko's test program for much longer
w/o problems than I was before... This simply brings back the knote_delete
as knlist_delete which will also drop the knote's, instead of just clearing
the list and seeing _ONESHOT...
Fix a race where if a note was _INFLUX and _DETACHED, it could end up being
modified... whoopse..
MFC after: 1 week
Prodded by: ambrisko and dwhite
Diffstat (limited to 'sys/sys/event.h')
-rw-r--r-- | sys/sys/event.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/sys/event.h b/sys/sys/event.h index 86caab2..5fdc88f 100644 --- a/sys/sys/event.h +++ b/sys/sys/event.h @@ -207,7 +207,12 @@ extern void knlist_remove_inevent(struct knlist *knl, struct knote *kn); extern int knlist_empty(struct knlist *knl); extern void knlist_init(struct knlist *knl, struct mtx *mtx); extern void knlist_destroy(struct knlist *knl); -extern void knlist_clear(struct knlist *knl, int islocked); +extern void knlist_cleardel(struct knlist *knl, struct thread *td, + int islocked, int killkn); +#define knlist_clear(knl, islocked) \ + knlist_cleardel((knl), NULL, (islocked), 0) +#define knlist_delete(knl, td, islocked) \ + knlist_cleardel((knl), (td), (islocked), 1) extern void knote_fdclose(struct thread *p, int fd); extern int kqueue_register(struct kqueue *kq, struct kevent *kev, struct thread *p, int waitok); |