Changeset 6492d5caf9dd0d182d061d1650520854f06e2b72
- Timestamp:
- 09/16/09 03:55:29
(4 years ago)
- Author:
- Theo Schlossnagle <jesus@omniti.com>
- git-committer:
- Theo Schlossnagle <jesus@omniti.com> 1253073329 +0000
- git-parent:
[914f04715e543bf76101c324e06a062e7a10b3ba]
- git-author:
- Theo Schlossnagle <jesus@omniti.com> 1253073329 +0000
- Message:
kqueue apparently gets confused sometimes (perhaps just on Mac), closes #178
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r1295e5f |
r6492d5c |
|
| 122 | 122 | |
|---|
| 123 | 123 | EV_SET(kep, ident, filter, flags, 0, 0, (void *)e->fd); |
|---|
| | 124 | noitL(eventer_deb, "debug: ke_change(fd:%d, filt:%x, flags:%x)\n", |
|---|
| | 125 | ident, filter, flags); |
|---|
| 124 | 126 | if(kqs == master_kqs) pthread_mutex_unlock(&kqs_lock); |
|---|
| 125 | 127 | } |
|---|
| … | … | |
| 297 | 299 | |
|---|
| 298 | 300 | gettimeofday(&__now, NULL); |
|---|
| 299 | | oldmask = e->mask; |
|---|
| | 301 | /* We're going to lie to ourselves. You'd think this should be: |
|---|
| | 302 | * oldmask = e->mask; However, we just fired with masks[fd], so |
|---|
| | 303 | * kqueue is clearly looking for all of the events in masks[fd]. |
|---|
| | 304 | * So, we combine them "just to be safe." |
|---|
| | 305 | */ |
|---|
| | 306 | oldmask = e->mask | masks[fd]; |
|---|
| 300 | 307 | cbname = eventer_name_for_callback(e->callback); |
|---|
| 301 | 308 | noitLT(eventer_deb, &__now, "kqueue: fire on %d/%x to %s(%p)\n", |
|---|
| … | … | |
| 318 | 325 | } |
|---|
| 319 | 326 | else if(oldmask & EVENTER_WRITE) |
|---|
| 320 | | ke_change(fd, EVFILT_WRITE, EV_DELETE | EV_DISABLE, e); |
|---|
| | 327 | ke_change(fd, EVFILT_WRITE, EV_DELETE | EV_DISABLE, e); |
|---|
| 321 | 328 | |
|---|
| 322 | 329 | /* Set our mask */ |
|---|