Add READ_ONCE and WRITE_ONCE (XCC)
[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 #pragma once
10
11 #include <ros/common.h>
12
13 /* Types of resource requests */
14 #define RES_CORES                        0
15 #define RES_MEMORY                       1
16 #define RES_APPLE_PIES           2
17 #define MAX_NUM_RESOURCES    3
18
19 /* Flags */
20 #define REQ_ASYNC                       0x01 // Sync by default (?)
21 #define REQ_SOFT                        0x02 // just making something up
22
23 struct resource_req {
24         unsigned long                           amt_wanted;
25         unsigned long                           amt_wanted_min;
26         int                                                     flags;
27 };