| [f30e6a0b] | 1 | /*
|
|---|
| [d7f7a4a] | 2 | * SPDX-FileCopyrightText: 2006 Jakub Jermar
|
|---|
| [f30e6a0b] | 3 | *
|
|---|
| [d7f7a4a] | 4 | * SPDX-License-Identifier: BSD-3-Clause
|
|---|
| [f30e6a0b] | 5 | */
|
|---|
| 6 |
|
|---|
| [fadd381] | 7 | /** @addtogroup libc
|
|---|
| [b2951e2] | 8 | * @{
|
|---|
| 9 | */
|
|---|
| 10 | /** @file
|
|---|
| 11 | */
|
|---|
| 12 |
|
|---|
| [4805495] | 13 | #ifndef _LIBC_TASK_H_
|
|---|
| 14 | #define _LIBC_TASK_H_
|
|---|
| [f30e6a0b] | 15 |
|
|---|
| [2443ad8] | 16 | #include <async.h>
|
|---|
| [8d2dd7f2] | 17 | #include <stdint.h>
|
|---|
| [9f5cf68] | 18 | #include <stdarg.h>
|
|---|
| [8d2dd7f2] | 19 | #include <abi/proc/task.h>
|
|---|
| [1c635d6] | 20 | #include <async.h>
|
|---|
| 21 | #include <types/task.h>
|
|---|
| [f30e6a0b] | 22 |
|
|---|
| [1c635d6] | 23 | typedef struct {
|
|---|
| 24 | ipc_call_t result;
|
|---|
| 25 | aid_t aid;
|
|---|
| 26 | } task_wait_t;
|
|---|
| 27 |
|
|---|
| 28 | struct _TASK;
|
|---|
| 29 | typedef struct _TASK task_t;
|
|---|
| [adb49f58] | 30 |
|
|---|
| [d3b8c1f] | 31 | extern task_id_t task_get_id(void);
|
|---|
| [b7fd2a0] | 32 | extern errno_t task_set_name(const char *);
|
|---|
| 33 | extern errno_t task_kill(task_id_t);
|
|---|
| [1e9f8ab] | 34 |
|
|---|
| [b7fd2a0] | 35 | extern errno_t task_spawnv(task_id_t *, task_wait_t *, const char *path,
|
|---|
| [1c635d6] | 36 | const char *const []);
|
|---|
| [2443ad8] | 37 | extern errno_t task_spawnv_debug(task_id_t *, task_wait_t *, const char *path,
|
|---|
| 38 | const char *const [], async_sess_t **);
|
|---|
| [b7fd2a0] | 39 | extern errno_t task_spawnvf(task_id_t *, task_wait_t *, const char *path,
|
|---|
| [bb9ec2d] | 40 | const char *const [], int, int, int);
|
|---|
| [2443ad8] | 41 | extern errno_t task_spawnvf_debug(task_id_t *, task_wait_t *, const char *path,
|
|---|
| 42 | const char *const [], int, int, int, async_sess_t **);
|
|---|
| [b7fd2a0] | 43 | extern errno_t task_spawn(task_id_t *, task_wait_t *, const char *path, int,
|
|---|
| [1c635d6] | 44 | va_list ap);
|
|---|
| [b7fd2a0] | 45 | extern errno_t task_spawnl(task_id_t *, task_wait_t *, const char *path, ...)
|
|---|
| [53031c2] | 46 | __attribute__((sentinel));
|
|---|
| [0485135] | 47 |
|
|---|
| [b7fd2a0] | 48 | extern errno_t task_setup_wait(task_id_t, task_wait_t *);
|
|---|
| [1c635d6] | 49 | extern void task_cancel_wait(task_wait_t *);
|
|---|
| [b7fd2a0] | 50 | extern errno_t task_wait(task_wait_t *, task_exit_t *, int *);
|
|---|
| 51 | extern errno_t task_wait_task_id(task_id_t, task_exit_t *, int *);
|
|---|
| 52 | extern errno_t task_retval(int);
|
|---|
| [f30e6a0b] | 53 |
|
|---|
| 54 | #endif
|
|---|
| [b2951e2] | 55 |
|
|---|
| [fadd381] | 56 | /** @}
|
|---|
| [b2951e2] | 57 | */
|
|---|