diff options
Diffstat (limited to 'libs/pbd/crossthread.cc')
-rw-r--r-- | libs/pbd/crossthread.cc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/libs/pbd/crossthread.cc b/libs/pbd/crossthread.cc index 2bcb444b36..7ccf741380 100644 --- a/libs/pbd/crossthread.cc +++ b/libs/pbd/crossthread.cc @@ -104,3 +104,15 @@ CrossThreadChannel::drain (int fd) char buf[64]; while (::read (fd, buf, sizeof (buf)) > 0); } + +int +CrossThreadChannel::deliver (char msg) +{ + return ::write (fds[1], &msg, 1); +} + +int +CrossThreadChannel::receive (char& msg) +{ + return ::read (fds[0], &msg, 1); +} |