1 /* Declarations of privilege functions and types.
2 Copyright (C) 2008 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, write to the Free
17 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
23 #include <sys/types.h>
24 #include <sys/isa_defs.h>
32 #define DOOR_UNREFSYS 8
34 #define DOOR_RETURN 10
35 #define DOOR_GETPARAM 11
36 #define DOOR_SETPARAM 12
39 #define DOOR_UNREF_DATA ((void *)1)
43 #define DOOR_UNREF 0x01
44 #define DOOR_PRIVATE 0x02
45 #define DOOR_UNREF_MULTI 0x10
46 #define DOOR_REFUSE_DESC 0x40
47 #define DOOR_NO_CANCEL 0x80
49 #define DOOR_LOCAL 0x04
50 #define DOOR_REVOKED 0x08
51 #define DOOR_IS_UNREF 0x20
53 #define DOOR_CREATE_MASK (DOOR_UNREF | DOOR_PRIVATE | \
54 DOOR_UNREF_MULTI | DOOR_REFUSE_DESC | DOOR_NO_CANCEL)
55 #define DOOR_KI_CREATE_MASK (DOOR_UNREF | DOOR_UNREF_MULTI)
57 #define DOOR_ATTR_MASK (DOOR_CREATE_MASK | DOOR_LOCAL | DOOR_REVOKED | \
60 #define DOOR_DESCRIPTOR 0x10000
61 #define DOOR_RELEASE 0x40000
62 #define DOOR_DELAY 0x80000
63 #define DOOR_UNREF_ACTIVE 0x100000
65 #define DOOR_PARAM_DESC_MAX 1
66 #define DOOR_PARAM_DATA_MAX 2
67 #define DOOR_PARAM_DATA_MIN 3
69 typedef unsigned long long door_ptr_t;
70 typedef unsigned int door_attr_t;
71 typedef unsigned long long door_id_t;
73 #if _LONG_LONG_ALIGNMENT == 8 && _LONG_LONG_ALIGNMENT_32 == 4
77 typedef struct door_info
82 door_attr_t di_attributes;
83 door_id_t di_uniquifier;
87 typedef struct door_desc
89 door_attr_t d_attributes;
101 #if _LONG_LONG_ALIGNMENT == 8 && _LONG_LONG_ALIGNMENT_32 == 4
105 typedef struct door_cred
115 typedef struct door_arg
119 door_desc_t *desc_ptr;
120 unsigned int desc_num;
130 door_desc_t *desc_ptr;
134 door_info_t *door_info;
137 typedef struct door_return_desc
139 door_desc_t *desc_ptr;
140 unsigned int desc_num;
141 } door_return_desc_t;
143 #endif /* _SYS_DOOR_H */