Skip to content

Commit 16f3f58

Browse files
committed
Rename to microkit_cspace_root_slot_to_cptr
This reflects the intended usecase of this. Signed-off-by: Julia Vassiliki <julia.vassiliki@unsw.edu.au>
1 parent 38d6827 commit 16f3f58

3 files changed

Lines changed: 7 additions & 7 deletions

File tree

docs/manual.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -826,7 +826,7 @@ virtual CPU with ID `vcpu`.
826826
Write the registers of a given virtual CPU with ID `vcpu`. The `regs` argument is the pointer to
827827
the struct of registers `seL4_VCPUContext` that are written from.
828828

829-
## `seL4_CPtr microkit_cspace_slot_to_cptr(seL4_Word slot)` {#libmicrokit_cspace_slot_to_cptr}
829+
## `seL4_CPtr microkit_cspace_root_slot_to_cptr(seL4_Word slot)` {#libmicrokit_cspace_root_slot_to_cptr}
830830

831831
Converts the slot identifier of the `<cspace>`'s capability element into an
832832
`seL4_CPtr` value to be used in `libsel4` calls by the PD.
@@ -990,7 +990,7 @@ It supports no attributes, but supports the following elements as children:
990990
* `cap_cspace`: A capability to a protection domain's CSpace.
991991

992992
All of the elements support the `slot` attribute, which is is an opaque identifier used to address the capability at runtime.
993-
To convert the `slot` to an `seL4_CPtr`, use the [`seL4_CPtr microkit_cspace_slot_to_cptr(seL4_Word slot)`](#libmicrokit_cspace_slot_to_cptr) function.
993+
To convert the `slot` to an `seL4_CPtr`, use the [`seL4_CPtr microkit_cspace_root_slot_to_cptr(seL4_Word slot)`](#libmicrokit_cspace_root_slot_to_cptr) function.
994994

995995
See the 'cap_sharing' example packaged in your SDK or [on GitHub](https://github.com/seL4/microkit/tree/main/example/cap_sharing).
996996

example/cap_sharing/cap_sharing.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99
#define CH_SECONDARY ((microkit_channel)0)
1010

1111
// As per cap_sharing.system
12-
#define CAP_SECONDARY_SC (microkit_cspace_slot_to_cptr(1))
13-
#define CAP_SECONDARY_TCB (microkit_cspace_slot_to_cptr(2))
14-
#define CAP_MY_SC (microkit_cspace_slot_to_cptr(3))
15-
#define CAP_MY_TCB (microkit_cspace_slot_to_cptr(4))
12+
#define CAP_SECONDARY_SC (microkit_cspace_root_slot_to_cptr(1))
13+
#define CAP_SECONDARY_TCB (microkit_cspace_root_slot_to_cptr(2))
14+
#define CAP_MY_SC (microkit_cspace_root_slot_to_cptr(3))
15+
#define CAP_MY_TCB (microkit_cspace_root_slot_to_cptr(4))
1616

1717
static void halt(void)
1818
{

libmicrokit/include/microkit.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,7 @@ static inline void microkit_deferred_irq_ack(microkit_channel ch)
516516
* If the slot exceeds the valid range of inputs (0 <= slot < MICROKIT_MAX_USER_CAPS),
517517
* it returns the value `seL4_CapNull`.
518518
**/
519-
static inline seL4_CPtr microkit_cspace_slot_to_cptr(seL4_Word slot)
519+
static inline seL4_CPtr microkit_cspace_root_slot_to_cptr(seL4_Word slot)
520520
{
521521
if (slot > MICROKIT_MAX_USER_CAPS) {
522522
return seL4_CapNull;

0 commit comments

Comments
 (0)