Changeset 4:d061ad3be7fd in xplcommon for src/xplcommon/posix/Waitable.cc


Ignore:
Timestamp:
12/27/12 18:52:39 (11 years ago)
Author:
István Váradi <ivaradi@…>
Branch:
default
Phase:
public
Message:

Added support for a waitable event for POSIX and a test program

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/xplcommon/posix/Waitable.cc

    r3 r4  
    3434#include "Waiter.h"
    3535
     36#include <fcntl.h>
     37
    3638//------------------------------------------------------------------------------
    3739
    3840using xplcommon::posix::Waitable;
     41
     42//------------------------------------------------------------------------------
     43
     44void Waitable::setNonBlocking(int fd)
     45{
     46    fcntl(fd, F_SETFL, fcntl(fd, F_GETFL) | O_NONBLOCK);
     47}
    3948
    4049//------------------------------------------------------------------------------
Note: See TracChangeset for help on using the changeset viewer.