seL4/include/object/cap.h
Adrian Danis d8ae122cc8 Generalise finaliseCap to more than just IRQs
Changes finaliseCap to return a generic definition of cleanup information that
needs to be done, instead of just encoding an IRQ number. The post deletion information
is encoded as a `cap_t` due to the capability type already being a union of all
the possible information. Aside from providing a properly generic mechanism the motivation
is to support a similar cleanup phase for I/O ports in the future.
2018-02-23 10:03:50 +11:00

30 lines
823 B
C

/*
* Copyright 2017, Data61
* Commonwealth Scientific and Industrial Research Organisation (CSIRO)
* ABN 41 687 119 230.
*
* This software may be distributed and modified according to the terms of
* the GNU General Public License version 2. Note that NO WARRANTY is provided.
* See "LICENSE_GPLv2.txt" for details.
*
* @TAG(DATA61_GPL)
*/
#ifndef __OBJECT_CAP_H
#define __OBJECT_CAP_H
struct deriveCap_ret {
exception_t status;
cap_t cap;
};
typedef struct deriveCap_ret deriveCap_ret_t;
struct finaliseCap_ret {
cap_t remainder;
/* potential cap holding information for cleanup that needs to be happen *after* a
* cap has been deleted. Where deleted here means been removed from the slot in emptySlot */
cap_t cleanupInfo;
};
typedef struct finaliseCap_ret finaliseCap_ret_t;
#endif