Project

General

Profile

Statistics
| Branch: | Revision:

scoutos / prex-0.9.0 / include / sys / capability.h @ 03e9c04a

History | View | Annotate | Download (2.6 KB)

1
/*
2
 * Copyright (c) 2007-2008, Kohsuke Ohtani
3
 * All rights reserved.
4
 *
5
 * Redistribution and use in source and binary forms, with or without
6
 * modification, are permitted provided that the following conditions
7
 * are met:
8
 * 1. Redistributions of source code must retain the above copyright
9
 *    notice, this list of conditions and the following disclaimer.
10
 * 2. Redistributions in binary form must reproduce the above copyright
11
 *    notice, this list of conditions and the following disclaimer in the
12
 *    documentation and/or other materials provided with the distribution.
13
 * 3. Neither the name of the author nor the names of any co-contributors
14
 *    may be used to endorse or promote products derived from this software
15
 *    without specific prior written permission.
16
 *
17
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
18
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20
 * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
21
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27
 * SUCH DAMAGE.
28
 */
29

    
30
#ifndef _SYS_CAPABILITY_H
31
#define _SYS_CAPABILITY_H
32

    
33
/*
34
 * Type of capability
35
 */
36
typedef uint32_t        cap_t;
37

    
38
/*
39
 * Task capabilities
40
 */
41

    
42
#define CAP_NICE        0x00000001        /* Allow changing scheduling parameters */
43
#define CAP_RAWIO        0x00000002        /* Allow raw I/O operations */
44
#define CAP_KILL        0x00000004        /* Allow raising exception to another task */
45
#define CAP_SETPCAP        0x00000008        /* Allow setting capability */
46
#define CAP_TASKCTRL        0x00000010        /* Allow controlling another task's execution */
47
#define CAP_EXTMEM        0x00000020        /* Allow touching another task's memory */
48
#define CAP_PROTSERV        0x00000040        /* Allow operations as protected server */
49
#define CAP_NETWORK        0x00000080        /* Allow accessing network service */
50
#define CAP_POWERMGMT        0x00000100        /* Allow power management operation */
51
#define CAP_DISKADMIN        0x00000200        /* Allow mount, umount, etc. */
52
#define CAP_USERFILES        0x00000400        /* Allow accessing user files */
53
#define CAP_SYSFILES        0x00000800        /* Allow accessing system files */
54

    
55
/*
56
 * Default capability set
57
 */
58
#define CAPSET_BOOT        0x00000043        /* capabilities for boot tasks */
59

    
60
#endif /* !_SYS_CAPABILITY_H */