Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 4376 → Rev 4377

/branches/tracing/uspace/lib/libc/generic/task.c
38,6 → 38,7
#include <stdlib.h>
#include <errno.h>
#include <loader/loader.h>
#include <string.h>
 
task_id_t task_get_id(void)
{
48,6 → 49,17
return task_id;
}
 
/** Set the task name.
*
* @param name The new name, typically the command used to execute the
* program.
* @return Zero on success or negative error code.
*/
int task_set_name(const char *name)
{
return __SYSCALL2(SYS_TASK_SET_NAME, (sysarg_t) name, str_size(name));
}
 
/** Create a new task by running an executable from the filesystem.
*
* This is really just a convenience wrapper over the more complicated
63,8 → 75,8
task_id_t task_id;
int rc;
 
/* Spawn a program loader. */
ldr = loader_spawn(path);
/* Connect to a program loader. */
ldr = loader_connect();
if (ldr == NULL)
return 0;
 
89,7 → 101,6
goto error;
 
/* Run it. */
/* Load the program. */
rc = loader_run(ldr);
if (rc != EOK)
goto error;