mirror of
https://github.com/drasko/codezero.git
synced 2026-01-12 02:43:15 +01:00
24 lines
422 B
C
24 lines
422 B
C
/*
|
|
* Capability checking for all system calls
|
|
*
|
|
* Copyright (C) 2009 Bahadir Balban
|
|
*/
|
|
#include <l4/generic/resource.h>
|
|
#include <l4/generic/capability.h>
|
|
|
|
struct capability *capability_create(void)
|
|
{
|
|
struct capability *cap = alloc_capability();
|
|
|
|
capability_init(cap);
|
|
|
|
return cap;
|
|
}
|
|
|
|
void capability_init(struct capability *cap)
|
|
{
|
|
cap->capid = id_new(&kernel_container.capability_ids);
|
|
link_init(&cap->list);
|
|
}
|
|
|