Add back the plan 9 system calls
[akaros.git] / kern / include / ros / resource.h
1 /*
2  * Copyright (c) 2009 The Regents of the University of California
3  * Barret Rhoden <brho@cs.berkeley.edu>
4  * See LICENSE for details.
5  *
6  * Interface for asking for resources from the kernel.
7  */
8
9 #ifndef ROS_INCLUDE_RESOURCE_H
10 #define ROS_INCLUDE_RESOURCE_H
11
12 #include <ros/common.h>
13
14 /* Types of resource requests */
15 #define RES_CORES                        0
16 #define RES_MEMORY                       1
17 #define RES_APPLE_PIES           2
18 #define MAX_NUM_RESOURCES    3
19
20 /* Flags */
21 #define REQ_ASYNC                       0x01 // Sync by default (?)
22 #define REQ_SOFT                        0x02 // just making something up
23
24 struct resource_req {
25         unsigned long                           amt_wanted;
26         unsigned long                           amt_wanted_min;
27         int                                                     flags;
28 };
29
30 #endif // !ROS_INCLUDE_RESOURCE_H