Changeset bff7408283cab40cb7ba5f8c76538eaabc4f969f

Show
Ignore:
Timestamp:
11/11/11 18:53:32 (3 years ago)
Author:
Theo Schlossnagle <jesus@omniti.com>
git-committer:
Theo Schlossnagle <jesus@omniti.com> 1321037612 -0500
git-parent:

[a23f396910835ccd3d57d8f12cb36126660012e2], [501e231d70284a477bc5679249d40b68f9167fc0]

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

Merge branch 'fix_eventer_usage_under_epoll' of http://github.com/ddispaltro/reconnoiter into evmisuse

Files:

Legend:

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

    rcd97caa r33b7efe  
    114114  master_fds[e->fd].e = e; 
    115115 
    116   epoll_ctl(epoll_fd, EPOLL_CTL_ADD, e->fd, &_ev); 
     116  assert(epoll_ctl(epoll_fd, EPOLL_CTL_ADD, e->fd, &_ev) == 0); 
    117117 
    118118  release_master_fd(e->fd, lockstate); 
     
    132132      removed = e; 
    133133      master_fds[e->fd].e = NULL; 
    134       epoll_ctl(epoll_fd, EPOLL_CTL_DEL, e->fd, &_ev); 
     134      assert(epoll_ctl(epoll_fd, EPOLL_CTL_DEL, e->fd, &_ev) == 0); 
    135135    } 
    136136    release_master_fd(e->fd, lockstate); 
     
    160160    if(e->mask & EVENTER_WRITE) _ev.events |= (EPOLLOUT); 
    161161    if(e->mask & EVENTER_EXCEPTION) _ev.events |= (EPOLLERR|EPOLLHUP); 
    162     epoll_ctl(epoll_fd, EPOLL_CTL_MOD, e->fd, &_ev); 
     162    assert(epoll_ctl(epoll_fd, EPOLL_CTL_MOD, e->fd, &_ev) == 0); 
    163163  } 
    164164} 
     
    173173    eiq = master_fds[fd].e; 
    174174    master_fds[fd].e = NULL; 
    175     epoll_ctl(epoll_fd, EPOLL_CTL_DEL, fd, &_ev); 
     175    assert(epoll_ctl(epoll_fd, EPOLL_CTL_DEL, fd, &_ev) == 0); 
    176176    release_master_fd(fd, lockstate); 
    177177  } 
     
    208208    if(newmask & EVENTER_WRITE) _ev.events |= (EPOLLOUT); 
    209209    if(newmask & EVENTER_EXCEPTION) _ev.events |= (EPOLLERR|EPOLLHUP); 
    210     epoll_ctl(epoll_fd, EPOLL_CTL_MOD, fd, &_ev); 
     210    assert(epoll_ctl(epoll_fd, EPOLL_CTL_MOD, fd, &_ev) == 0); 
    211211    /* Set our mask */ 
    212212    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;