aboutsummaryrefslogtreecommitdiff
path: root/common/uapi/proc.c
blob: 7c0a69d4c7307b50dbec59669257b37744c615d1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#include <apos/uapi.h>

/* Not entirely sure how I should handle forks/execs etc, mostly whether I
 * should allow forks/execs to be called directly or only though the process
 * manager. Probably though the process manager, although that will add in a
 * slight bit of delay.
 *
 * I suppose I could add in a runtime parameter
 * that would allow them to be called directly, and then the process manager
 * would have to periodically ask the kernel about all threads it is aware of
 * via sys_sync. Dunno.
 */
SYSCALL_DEFINE1(fork)(vm_t pid)
{
	/* fork might not actually even need pid...? */
	/* TODO: create new thread in the same process family */
	return 0;
}

SYSCALL_DEFINE4(exec)(vm_t pid, vm_t bin, vm_t argc, vm_t argv)
{
	/* TODO: execute new process */
	return 0;
}

SYSCALL_DEFINE2(signal)(vm_t pid, vm_t signal)
{
	/* TODO: signals? */
	return 0;
}

SYSCALL_DEFINE1(switch)(vm_t pid)
{
	/* TODO: switch to process */
	return 0;
}

SYSCALL_DEFINE2(sync)(vm_t buf, vm_t size)
{
	/* check that only the process manager can use this syscall, otherwise
	 * just dump process info into the buffer (I guess, not sure if this
	 * will be quite required */
	return 0;
}