97 |
{ |
{ |
98 |
error_t err; |
error_t err; |
99 |
|
|
100 |
size += hurd_cap_obj_get_size (alignment); |
/* The alignment requirements must be a power of 2. */ |
101 |
|
assert ((alignment & (alignment - 1)) == 0 |
102 |
|
|| ! __func__ ": requested alignment not a power of 2"); |
103 |
|
|
104 |
|
/* Find the smallest alignment requirement common to the user object |
105 |
|
and a struct hurd_cap_obj. Since both are required to be a power |
106 |
|
of 2, we need simply take the larger one. */ |
107 |
|
if (alignment < __alignof__(struct hurd_cap_obj)) |
108 |
|
alignment = __alignof__(struct hurd_cap_obj); |
109 |
|
|
110 |
/* FIXME: Find the smallest possible alignment common to the user |
size += hurd_cap_obj_user_offset (alignment); |
|
object and a struct hurd_cap_obj. */ |
|
|
assert (alignment >= __alignof__(struct hurd_cap_obj)); |
|
111 |
|
|
112 |
/* Capability object management. */ |
/* Capability object management. */ |
113 |
|
|
145 |
if (err) |
if (err) |
146 |
goto err_cond; |
goto err_cond; |
147 |
|
|
148 |
/* The cond_waiter member doesn't need to be initialized. It is set |
/* The cond_waiter member doesn't need to be initialized. It is |
149 |
whenever the state changes to _HURD_CAP_STATE_YELLOW by the |
only valid when CAP_CLASS->STATE is _HURD_CAP_STATE_YELLOW. */ |
|
inhibitor. */ |
|
150 |
|
|
151 |
cap_class->pending_rpcs = NULL; |
cap_class->pending_rpcs = NULL; |
152 |
|
|