Rev 4343 | Rev 4348 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4343 | Rev 4344 | ||
---|---|---|---|
Line 36... | Line 36... | ||
36 | #include <task.h> |
36 | #include <task.h> |
37 | #include <libc.h> |
37 | #include <libc.h> |
38 | #include <stdlib.h> |
38 | #include <stdlib.h> |
39 | #include <errno.h> |
39 | #include <errno.h> |
40 | #include <loader/loader.h> |
40 | #include <loader/loader.h> |
- | 41 | #include <string.h> |
|
41 | 42 | ||
42 | task_id_t task_get_id(void) |
43 | task_id_t task_get_id(void) |
43 | { |
44 | { |
44 | task_id_t task_id; |
45 | task_id_t task_id; |
45 | 46 | ||
46 | (void) __SYSCALL1(SYS_TASK_GET_ID, (sysarg_t) &task_id); |
47 | (void) __SYSCALL1(SYS_TASK_GET_ID, (sysarg_t) &task_id); |
47 | 48 | ||
48 | return task_id; |
49 | return task_id; |
49 | } |
50 | } |
50 | 51 | ||
- | 52 | /** Set the task name. |
|
- | 53 | * |
|
- | 54 | * @param name The new name, typically the command used to execute the |
|
- | 55 | * program. |
|
- | 56 | * @return Zero on success or negative error code. |
|
- | 57 | */ |
|
- | 58 | int task_set_name(const char *name) |
|
- | 59 | { |
|
- | 60 | return __SYSCALL2(SYS_TASK_SET_NAME, (sysarg_t) name, strlen(name)); |
|
- | 61 | } |
|
- | 62 | ||
51 | /** Create a new task by running an executable from the filesystem. |
63 | /** Create a new task by running an executable from the filesystem. |
52 | * |
64 | * |
53 | * This is really just a convenience wrapper over the more complicated |
65 | * This is really just a convenience wrapper over the more complicated |
54 | * loader API. |
66 | * loader API. |
55 | * |
67 | * |