Changeset 0925738c7f2feb200faf8af7721055416b357f44

Show
Ignore:
Timestamp:
11/17/11 22:55:22 (2 years ago)
Author:
Theo Schlossnagle <jesus@omniti.com>
git-committer:
Theo Schlossnagle <jesus@omniti.com> 1321570522 -0500
git-parent:

[f760d4895a5e1b4ab500749f7274fc84c215cfa7], [bff7408283cab40cb7ba5f8c76538eaabc4f969f]

git-author:
Theo Schlossnagle <jesus@omniti.com> 1321570522 -0500
Message:

Merge branch 'evmisuse'

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • src/eventer/eventer_epoll_impl.c

    rf760d48 r0925738  
    115115  master_fds[e->fd].e = e; 
    116116 
    117   epoll_ctl(epoll_fd, EPOLL_CTL_ADD, e->fd, &_ev); 
     117  assert(epoll_ctl(epoll_fd, EPOLL_CTL_ADD, e->fd, &_ev) == 0); 
    118118 
    119119  release_master_fd(e->fd, lockstate); 
     
    133133      removed = e; 
    134134      master_fds[e->fd].e = NULL; 
    135       epoll_ctl(epoll_fd, EPOLL_CTL_DEL, e->fd, &_ev); 
     135      assert(epoll_ctl(epoll_fd, EPOLL_CTL_DEL, e->fd, &_ev) == 0); 
    136136    } 
    137137    release_master_fd(e->fd, lockstate); 
     
    161161    if(e->mask & EVENTER_WRITE) _ev.events |= (EPOLLOUT); 
    162162    if(e->mask & EVENTER_EXCEPTION) _ev.events |= (EPOLLERR|EPOLLHUP); 
    163     epoll_ctl(epoll_fd, EPOLL_CTL_MOD, e->fd, &_ev); 
     163    assert(epoll_ctl(epoll_fd, EPOLL_CTL_MOD, e->fd, &_ev) == 0); 
    164164  } 
    165165} 
     
    174174    eiq = master_fds[fd].e; 
    175175    master_fds[fd].e = NULL; 
    176     epoll_ctl(epoll_fd, EPOLL_CTL_DEL, fd, &_ev); 
     176    assert(epoll_ctl(epoll_fd, EPOLL_CTL_DEL, fd, &_ev) == 0); 
    177177    release_master_fd(fd, lockstate); 
    178178  } 
     
    211211    if(newmask & EVENTER_WRITE) _ev.events |= (EPOLLOUT); 
    212212    if(newmask & EVENTER_EXCEPTION) _ev.events |= (EPOLLERR|EPOLLHUP); 
    213     epoll_ctl(epoll_fd, EPOLL_CTL_MOD, fd, &_ev); 
     213    assert(epoll_ctl(epoll_fd, EPOLL_CTL_MOD, fd, &_ev) == 0); 
    214214    /* Set our mask */ 
    215215    e->mask = newmask; 
  • src/modules/check_test.c

    rde645be r33b7efe  
    191191   
    192192    if(conne) { 
    193       eventer_add(conne); 
     193      // The event already exists, why re-add it?  Did we want to update it? 
     194      //eventer_add(conne); 
    194195      eventer_trigger(conne, EVENTER_READ | EVENTER_WRITE); 
    195196    } 
  • src/modules/lua.c

    r82dc7d3 r33b7efe  
    102102  eventer_t removed, e = *value; 
    103103  noitL(nldeb, "lua check cleanup: dropping (%p)->fd (%d)\n", e, e->fd); 
     104  removed = eventer_remove(e); 
     105  noitL(nldeb, "    remove from eventer system %s\n", 
     106        removed ? "succeeded" : "failed"); 
    104107  if(e->mask & (EVENTER_READ|EVENTER_WRITE|EVENTER_EXCEPTION)) { 
    105108    noitL(nldeb, "    closing down fd %d\n", e->fd); 
    106109    e->opset->close(e->fd, &mask, e); 
    107110  } 
    108   removed = eventer_remove(e); 
    109   noitL(nldeb, "    remove from eventer system %s\n", 
    110         removed ? "succeeded" : "failed"); 
    111111  if(e->closure) { 
    112112    struct nl_generic_cl *cl; 
  • src/modules/lua_noit.c

    r1d24f9e r501e231  
    715715  } 
    716716 
     717  eventer_remove_fd(e->fd); 
    717718  e->callback = noit_lua_socket_read_complete; 
    718719  e->mask = mask | EVENTER_EXCEPTION;