Added (temporary) mechanism to pass argc/argv
[akaros.git] / kern / include / ros / procdata.h
1 /* See COPYRIGHT for copyright information. */
2
3 #ifndef ROS_PROCDATA_H
4 #define ROS_PROCDATA_H
5
6 #include <ros/memlayout.h>
7 #include <ros/syscall.h>
8 #include <ros/sysevent.h>
9 #include <ros/error.h>
10 #include <ros/common.h>
11
12 #define PROCINFO_MAX_ARGC 32
13 #define PROCINFO_MAX_ARGV_SIZE 1024
14
15 typedef struct procinfo {
16         pid_t id;
17         size_t max_harts;
18
19         size_t argc;
20         char* argv[PROCINFO_MAX_ARGC];
21         char argv_buf[PROCINFO_MAX_ARGV_SIZE];
22 } procinfo_t;
23 #define PROCINFO_NUM_PAGES  ((sizeof(procinfo_t)-1)/PGSIZE + 1) 
24
25 typedef struct procdata {
26         // The actual ring buffers for communicating with user space
27         syscall_sring_t  syscallring;  // Per-process ring buffer for async syscalls
28         sysevent_sring_t syseventring; // Per-process ring buffer for async sysevents
29 } procdata_t;
30 #define PROCDATA_NUM_PAGES  ((sizeof(procdata_t)-1)/PGSIZE + 1)
31
32 #endif // !ROS_PROCDATA_H