Subversion Repositories HelenOS

Rev

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

Rev 3469 Rev 3470
Line 203... Line 203...
203
    free(arg_buf);
203
    free(arg_buf);
204
 
204
 
205
    return EOK;
205
    return EOK;
206
}
206
}
207
 
207
 
-
 
208
/** Instruct loader to load the program.
-
 
209
 *
-
 
210
 * If this function succeeds, the program has been successfully loaded
-
 
211
 * and is ready to be executed.
-
 
212
 *
-
 
213
 * @param ldr       Loader connection structure.
-
 
214
 * @return      Zero on success or negative error code.
-
 
215
 */
-
 
216
int loader_load_program(loader_t *ldr)
-
 
217
{
-
 
218
    int rc;
-
 
219
 
-
 
220
    rc = async_req_0_0(ldr->phone_id, LOADER_LOAD);
-
 
221
    if (rc != EOK)
-
 
222
        return rc;
-
 
223
 
-
 
224
    return EOK;
-
 
225
}
-
 
226
 
208
/** Instruct loader to execute the program.
227
/** Instruct loader to execute the program.
209
 *
228
 *
-
 
229
 * Note that this function blocks until the loader actually replies
-
 
230
 * so you cannot expect this function to return if you are debugging
-
 
231
 * the task and its thread is stopped.
-
 
232
 *
210
 * After using this function, no further operations must be performed
233
 * After using this function, no further operations must be performed
211
 * on the loader structure. It should be de-allocated using free().
234
 * on the loader structure. It should be de-allocated using free().
212
 *
235
 *
213
 * @param ldr       Loader connection structure.
236
 * @param ldr       Loader connection structure.
214
 * @return      Zero on success or negative error code.
237
 * @return      Zero on success or negative error code.
215
 */
238
 */
216
int loader_start_program(loader_t *ldr)
239
int loader_run(loader_t *ldr)
217
{
240
{
218
    int rc;
241
    int rc;
219
 
242
 
220
    rc = async_req_0_0(ldr->phone_id, LOADER_RUN);
243
    rc = async_req_0_0(ldr->phone_id, LOADER_RUN);
221
    if (rc != EOK)
244
    if (rc != EOK)
222
        return rc;
245
        return rc;
223
 
246
 
224
    ipc_hangup(ldr->phone_id);
-
 
225
    return EOK;
247
    return EOK;
226
}
248
}
227
 
249
 
228
/** Cancel the loader session.
250
/** Cancel the loader session.
229
 *
251
 *