Ignore:
Timestamp:
Jul 8, 2006 7:46:43 PM (18 years ago)
Author:
bennylp
Message:

Attempted to fix epoll for Linux

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjlib/src/pj/ioqueue_common_abs.c

    r582 r592  
    197197        h->connecting = 0; 
    198198 
    199         ioqueue_remove_from_set(ioqueue, h->fd, WRITEABLE_EVENT); 
    200         ioqueue_remove_from_set(ioqueue, h->fd, EXCEPTION_EVENT); 
     199        ioqueue_remove_from_set(ioqueue, h, WRITEABLE_EVENT); 
     200        ioqueue_remove_from_set(ioqueue, h, EXCEPTION_EVENT); 
    201201 
    202202 
     
    273273 
    274274            if (pj_list_empty(&h->write_list)) 
    275                 ioqueue_remove_from_set(ioqueue, h->fd, WRITEABLE_EVENT); 
     275                ioqueue_remove_from_set(ioqueue, h, WRITEABLE_EVENT); 
    276276 
    277277        } 
     
    326326                /* Clear operation if there's no more data to send. */ 
    327327                if (pj_list_empty(&h->write_list)) 
    328                     ioqueue_remove_from_set(ioqueue, h->fd, WRITEABLE_EVENT); 
     328                    ioqueue_remove_from_set(ioqueue, h, WRITEABLE_EVENT); 
    329329 
    330330            } 
     
    379379        /* Clear bit in fdset if there is no more pending accept */ 
    380380        if (pj_list_empty(&h->accept_list)) 
    381             ioqueue_remove_from_set(ioqueue, h->fd, READABLE_EVENT); 
     381            ioqueue_remove_from_set(ioqueue, h, READABLE_EVENT); 
    382382 
    383383        rc=pj_sock_accept(h->fd, accept_op->accept_fd,  
     
    412412        /* Clear fdset if there is no pending read. */ 
    413413        if (pj_list_empty(&h->read_list)) 
    414             ioqueue_remove_from_set(ioqueue, h->fd, READABLE_EVENT); 
     414            ioqueue_remove_from_set(ioqueue, h, READABLE_EVENT); 
    415415 
    416416        bytes_read = read_op->size; 
     
    519519    h->connecting = 0; 
    520520 
    521     ioqueue_remove_from_set(ioqueue, h->fd, WRITEABLE_EVENT); 
    522     ioqueue_remove_from_set(ioqueue, h->fd, EXCEPTION_EVENT); 
     521    ioqueue_remove_from_set(ioqueue, h, WRITEABLE_EVENT); 
     522    ioqueue_remove_from_set(ioqueue, h, EXCEPTION_EVENT); 
    523523 
    524524    pj_mutex_unlock(h->mutex); 
     
    586586    pj_mutex_lock(key->mutex); 
    587587    pj_list_insert_before(&key->read_list, read_op); 
    588     ioqueue_add_to_set(key->ioqueue, key->fd, READABLE_EVENT); 
     588    ioqueue_add_to_set(key->ioqueue, key, READABLE_EVENT); 
    589589    pj_mutex_unlock(key->mutex); 
    590590 
     
    654654    pj_mutex_lock(key->mutex); 
    655655    pj_list_insert_before(&key->read_list, read_op); 
    656     ioqueue_add_to_set(key->ioqueue, key->fd, READABLE_EVENT); 
     656    ioqueue_add_to_set(key->ioqueue, key, READABLE_EVENT); 
    657657    pj_mutex_unlock(key->mutex); 
    658658 
     
    760760    pj_mutex_lock(key->mutex); 
    761761    pj_list_insert_before(&key->write_list, write_op); 
    762     ioqueue_add_to_set(key->ioqueue, key->fd, WRITEABLE_EVENT); 
     762    ioqueue_add_to_set(key->ioqueue, key, WRITEABLE_EVENT); 
    763763    pj_mutex_unlock(key->mutex); 
    764764 
     
    828828            status = status; 
    829829        } 
     830        PJ_LOG(3,(THIS_FILE, "pending write operation!!")); 
    830831    } 
    831832 
     
    877878    pj_mutex_lock(key->mutex); 
    878879    pj_list_insert_before(&key->write_list, write_op); 
    879     ioqueue_add_to_set(key->ioqueue, key->fd, WRITEABLE_EVENT); 
     880    ioqueue_add_to_set(key->ioqueue, key, WRITEABLE_EVENT); 
    880881    pj_mutex_unlock(key->mutex); 
    881882 
     
    946947    pj_mutex_lock(key->mutex); 
    947948    pj_list_insert_before(&key->accept_list, accept_op); 
    948     ioqueue_add_to_set(key->ioqueue, key->fd, READABLE_EVENT); 
     949    ioqueue_add_to_set(key->ioqueue, key, READABLE_EVENT); 
    949950    pj_mutex_unlock(key->mutex); 
    950951 
     
    982983            pj_mutex_lock(key->mutex); 
    983984            key->connecting = PJ_TRUE; 
    984             ioqueue_add_to_set(key->ioqueue, key->fd, WRITEABLE_EVENT); 
    985             ioqueue_add_to_set(key->ioqueue, key->fd, EXCEPTION_EVENT); 
     985            ioqueue_add_to_set(key->ioqueue, key, WRITEABLE_EVENT); 
     986            ioqueue_add_to_set(key->ioqueue, key, EXCEPTION_EVENT); 
    986987            pj_mutex_unlock(key->mutex); 
    987988            return PJ_EPENDING; 
Note: See TracChangeset for help on using the changeset viewer.