Subversion Repositories HelenOS

Rev

Rev 2675 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2675 Rev 2678
Line 71... Line 71...
71
            futex_up(&vfs_phone_futex);
71
            futex_up(&vfs_phone_futex);
72
            return res;
72
            return res;
73
        }
73
        }
74
    }
74
    }
75
    req = async_send_1(vfs_phone, VFS_MOUNT, dev_handle, NULL);
75
    req = async_send_1(vfs_phone, VFS_MOUNT, dev_handle, NULL);
76
    rc = ipc_data_write_send(vfs_phone, (void *)fs_name, strlen(fs_name));
76
    rc = ipc_data_write_start(vfs_phone, (void *)fs_name, strlen(fs_name));
77
    if (rc != EOK) {
77
    if (rc != EOK) {
78
        async_wait_for(req, NULL);
78
        async_wait_for(req, NULL);
79
        async_serialize_end();
79
        async_serialize_end();
80
        futex_up(&vfs_phone_futex);
80
        futex_up(&vfs_phone_futex);
81
        return (int) rc;
81
        return (int) rc;
82
    }
82
    }
83
    rc = ipc_data_write_send(vfs_phone, (void *)mp, strlen(mp));
83
    rc = ipc_data_write_start(vfs_phone, (void *)mp, strlen(mp));
84
    if (rc != EOK) {
84
    if (rc != EOK) {
85
        async_wait_for(req, NULL);
85
        async_wait_for(req, NULL);
86
        async_serialize_end();
86
        async_serialize_end();
87
        futex_up(&vfs_phone_futex);
87
        futex_up(&vfs_phone_futex);
88
        return (int) rc;
88
        return (int) rc;
Line 110... Line 110...
110
            futex_up(&vfs_phone_futex);
110
            futex_up(&vfs_phone_futex);
111
            return res;
111
            return res;
112
        }
112
        }
113
    }
113
    }
114
    req = async_send_2(vfs_phone, VFS_OPEN, oflag, 0, &answer);
114
    req = async_send_2(vfs_phone, VFS_OPEN, oflag, 0, &answer);
115
    rc = ipc_data_write_send(vfs_phone, name, strlen(name));
115
    rc = ipc_data_write_start(vfs_phone, name, strlen(name));
116
    if (rc != EOK) {
116
    if (rc != EOK) {
117
        async_wait_for(req, NULL);
117
        async_wait_for(req, NULL);
118
        async_serialize_end();
118
        async_serialize_end();
119
        futex_up(&vfs_phone_futex);
119
        futex_up(&vfs_phone_futex);
120
        return (int) rc;
120
        return (int) rc;
Line 141... Line 141...
141
            futex_up(&vfs_phone_futex);
141
            futex_up(&vfs_phone_futex);
142
            return res;
142
            return res;
143
        }
143
        }
144
    }
144
    }
145
    req = async_send_1(vfs_phone, VFS_READ, fildes, &answer);
145
    req = async_send_1(vfs_phone, VFS_READ, fildes, &answer);
146
    if (ipc_data_read_send(vfs_phone, (void *)buf, nbyte) != EOK) {
146
    if (ipc_data_read_start(vfs_phone, (void *)buf, nbyte) != EOK) {
147
        async_wait_for(req, NULL);
147
        async_wait_for(req, NULL);
148
        async_serialize_end();
148
        async_serialize_end();
149
        futex_up(&vfs_phone_futex);
149
        futex_up(&vfs_phone_futex);
150
        return (ssize_t) rc;
150
        return (ssize_t) rc;
151
    }
151
    }
Line 171... Line 171...
171
            futex_up(&vfs_phone_futex);
171
            futex_up(&vfs_phone_futex);
172
            return res;
172
            return res;
173
        }
173
        }
174
    }
174
    }
175
    req = async_send_1(vfs_phone, VFS_WRITE, fildes, &answer);
175
    req = async_send_1(vfs_phone, VFS_WRITE, fildes, &answer);
176
    if (ipc_data_write_send(vfs_phone, (void *)buf, nbyte) != EOK) {
176
    if (ipc_data_write_start(vfs_phone, (void *)buf, nbyte) != EOK) {
177
        async_wait_for(req, NULL);
177
        async_wait_for(req, NULL);
178
        async_serialize_end();
178
        async_serialize_end();
179
        futex_up(&vfs_phone_futex);
179
        futex_up(&vfs_phone_futex);
180
        return (ssize_t) rc;
180
        return (ssize_t) rc;
181
    }
181
    }