Rev 1239 | Rev 1358 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1239 | Rev 1248 | ||
---|---|---|---|
Line 24... | Line 24... | ||
24 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
24 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
25 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
25 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
26 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
27 | */ |
27 | */ |
28 | 28 | ||
- | 29 | /** |
|
- | 30 | * @file task.c |
|
- | 31 | * @brief Task management. |
|
- | 32 | */ |
|
- | 33 | ||
29 | #include <main/uinit.h> |
34 | #include <main/uinit.h> |
30 | #include <proc/thread.h> |
35 | #include <proc/thread.h> |
31 | #include <proc/task.h> |
36 | #include <proc/task.h> |
32 | #include <proc/uarg.h> |
37 | #include <proc/uarg.h> |
33 | #include <mm/as.h> |
38 | #include <mm/as.h> |
Line 113... | Line 118... | ||
113 | return ta; |
118 | return ta; |
114 | } |
119 | } |
115 | 120 | ||
116 | /** Create new task with 1 thread and run it |
121 | /** Create new task with 1 thread and run it |
117 | * |
122 | * |
118 | * @param programe_addr Address of program executable image. |
123 | * @param program_addr Address of program executable image. |
119 | * @param name Program name. |
124 | * @param name Program name. |
120 | * |
125 | * |
121 | * @return Task of the running program or NULL on error. |
126 | * @return Task of the running program or NULL on error. |
122 | */ |
127 | */ |
123 | task_t * task_run_program(void *program_addr, char *name) |
128 | task_t * task_run_program(void *program_addr, char *name) |
Line 161... | Line 166... | ||
161 | return task; |
166 | return task; |
162 | } |
167 | } |
163 | 168 | ||
164 | /** Syscall for reading task ID from userspace. |
169 | /** Syscall for reading task ID from userspace. |
165 | * |
170 | * |
166 | * @param uaddr Userspace address of 8-byte buffer where to store current task ID. |
171 | * @param uspace_task_id Userspace address of 8-byte buffer where to store current task ID. |
167 | * |
172 | * |
168 | * @return Always returns 0. |
173 | * @return Always returns 0. |
169 | */ |
174 | */ |
170 | __native sys_task_get_id(task_id_t *uspace_task_id) |
175 | __native sys_task_get_id(task_id_t *uspace_task_id) |
171 | { |
176 | { |