Example #1
0
size_t shim_do_read (int fd, void * buf, size_t count)
{
    struct shim_handle * hdl = get_fd_handle(fd, NULL, NULL);
    if (!hdl)
        return -EBADF;
    int ret = do_handle_read(hdl, buf, count);
    put_handle(hdl);
    return ret;
}
Example #2
0
size_t shim_do_read (int fd, void * buf, size_t count)
{
    if (!buf || test_user_memory(buf, count, true))
        return -EFAULT;

    struct shim_handle * hdl = get_fd_handle(fd, NULL, NULL);
    if (!hdl)
        return -EBADF;

    int ret = do_handle_read(hdl, buf, count);
    put_handle(hdl);
    return ret;
}
Example #3
0
 /**
  * @brief 读事件回调函数
  * @return 调用特化版本handle_read
  */
 virtual int handle_read() {
     return do_handle_read(typename ipc_traits<ipc_acceptor_t>::ipc_category());
 }