Subversion Repositories HelenOS

Rev

Rev 4537 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4537 Rev 4668
Line 191... Line 191...
191
   
191
   
192
    async_serialize_end();
192
    async_serialize_end();
193
   
193
   
194
    if (retval != EOK) {
194
    if (retval != EOK) {
195
        if (handle != NULL)
195
        if (handle != NULL)
196
            *handle = -1;
196
            *handle = (dev_handle_t) -1;
197
        return retval;
197
        return retval;
198
    }
198
    }
199
   
199
   
200
    if (handle != NULL)
200
    if (handle != NULL)
201
        *handle = (dev_handle_t) IPC_GET_ARG1(answer);
201
        *handle = (dev_handle_t) IPC_GET_ARG1(answer);
Line 216... Line 216...
216
    }
216
    }
217
   
217
   
218
    return phone;
218
    return phone;
219
}
219
}
220
 
220
 
-
 
221
int devmap_null_create(void)
-
 
222
{
-
 
223
    int phone = devmap_get_phone(DEVMAP_CLIENT, IPC_FLAG_BLOCKING);
-
 
224
   
-
 
225
    if (phone < 0)
-
 
226
        return -1;
-
 
227
   
-
 
228
    ipcarg_t null_id;
-
 
229
    int retval = async_req_0_1(phone, DEVMAP_DEVICE_NULL_CREATE, &null_id);
-
 
230
    if (retval != EOK)
-
 
231
        return -1;
-
 
232
   
-
 
233
    return (int) null_id;
-
 
234
}
-
 
235
 
-
 
236
void devmap_null_destroy(int null_id)
-
 
237
{
-
 
238
    int phone = devmap_get_phone(DEVMAP_CLIENT, IPC_FLAG_BLOCKING);
-
 
239
   
-
 
240
    if (phone < 0)
-
 
241
        return;
-
 
242
   
-
 
243
    async_req_1_0(phone, DEVMAP_DEVICE_NULL_DESTROY, (ipcarg_t) null_id);
-
 
244
}
-
 
245
 
221
ipcarg_t devmap_device_get_count(void)
246
ipcarg_t devmap_device_get_count(void)
222
{
247
{
223
    int phone = devmap_get_phone(DEVMAP_CLIENT, IPC_FLAG_BLOCKING);
248
    int phone = devmap_get_phone(DEVMAP_CLIENT, IPC_FLAG_BLOCKING);
224
   
249
   
225
    if (phone < 0)
250
    if (phone < 0)