libcutils/mq.c
static void peerProxyBeforeSelect(SelectableFd* fd) {
    LOGD("Before select...");

    PeerProxy* peerProxy = (PeerProxy*) fd->data;
  
    peerLock(peerProxy->peer);
    bool hasPackets = peerProxy->currentPacket != NULL;
    peerUnlock(peerProxy->peer);
    
    if (hasPackets) {
        LOGD("Packets found. Setting onWritable().");
            
        fd->onWritable = &peerProxyWrite;
    } else {
        // We have nothing to write.
        fd->onWritable = NULL;
    }
}
/**
 * Sets up a peer proxy's fd before we try to select() it.
 */
Sets up a peer proxy's fd before we try to select() it.
Sets up a peer proxy ' s fd before we try to select () it .
static void peerProxyBeforeSelect(SelectableFd* fd) {
    LOGD("Before select...");
    PeerProxy* peerProxy = (PeerProxy*) fd->data;
    peerLock(peerProxy->peer);
    bool hasPackets = peerProxy->currentPacket != NULL;
    peerUnlock(peerProxy->peer);
    if (hasPackets) {
        LOGD("Packets found. Setting onWritable().");
        fd->onWritable = &peerProxyWrite;
    } else {
        fd->onWritable = NULL;
    }
}
static void peerProxyBeforeSelect ( SelectableFd * fd ) { LOGD ( " " ) ; PeerProxy * peerProxy = ( PeerProxy * ) fd -> data ; peerLock ( peerProxy -> peer ) ; bool hasPackets = peerProxy -> currentPacket != NULL ; peerUnlock ( peerProxy -> peer ) ; if ( hasPackets ) { LOGD ( " " ) ; fd -> onWritable = & peerProxyWrite ; } else { fd -> onWritable = NULL ; } }
Sets up a peer proxy's fd before we try to select() it.
Sets up a peer proxy ' s fd before we try to select () it .
// We have nothing to write.