Commit e43ec0a6 authored by Charlie Jacobsen's avatar Charlie Jacobsen Committed by Vikram Narayanan
Browse files

host-resource-trees: Clean up internal header, documentation.

Clean up microkernel's module init/exit file, add init/exits for
each subsystem.
parent 4acf9cbb
......@@ -179,9 +179,9 @@ static void sync_endpoint_delete(struct cspace *cspace, struct cnode *cnode,
{
/*
* No one has a capability to the endpoint, so no one should
* be in the queues; free object
* be in the queues; destroy endpoint
*/
kfree(object);
__lcd_destroy_sync_endpoint__(object);
}
static void lcd_delete(struct cspace *cspace, struct cnode *cnode,
......
......@@ -3,6 +3,8 @@
*
* Copyright: University of Utah
*/
#include <linux/printk.h>
#include "internal.h"
int __lcd_put_char(struct lcd *lcd, char c)
......@@ -36,3 +38,21 @@ int __lcd_put_char(struct lcd *lcd, char c)
}
return 0;
}
/* INIT/EXIT ------------------------------------------------------------ */
int __lcd_console_init(void)
{
/*
* Nothing for now
*/
return 0;
}
void __lcd_console_exit(void)
{
/*
* Nothing for now
*/
return;
}
This diff is collapsed.
......@@ -12,7 +12,7 @@
/* CREATE -------------------------------------------------- */
int __lcd_create_sync_endpoint(struct lcd *caller, cptr_t slot)
int __lcd_create_sync_endpoint__(struct lcd_sync_endpoint **ep_out)
{
struct lcd_sync_endpoint *e;
int ret;
......@@ -34,6 +34,28 @@ int __lcd_create_sync_endpoint(struct lcd *caller, cptr_t slot)
* Set up lock
*/
mutex_init(&e->lock);
return 0;
fail1:
return ret;
}
void __lcd_destroy_sync_endpoint__(struct lcd_sync_endpoint *ep)
{
kfree(ep);
}
int __lcd_create_sync_endpoint(struct lcd *caller, cptr_t slot)
{
struct lcd_sync_endpoint *e;
int ret;
/*
* Create it
*/
ret = __lcd_create_sync_endpoint__(&e);
if (ret)
goto fail1;
/*
* Insert into caller's cspace
*/
......@@ -48,14 +70,11 @@ int __lcd_create_sync_endpoint(struct lcd *caller, cptr_t slot)
return 0;
fail2:
kfree(e);
__lcd_destroy_sync_endpoint(e);
fail1:
return ret;
}
/* Destroy is trivial, and happens in the delete callback for the
* sync endpoint capability type. */
/* LOOKUP -------------------------------------------------- */
static int lookup_ep(struct cspace *cspace, cptr_t slot, struct cnode **cnode)
......
This diff is collapsed.
......@@ -627,3 +627,21 @@ fail2:
fail1:
return ret;
}
/* INIT/EXIT -------------------------------------------------- */
int __lcd_mem_init(void)
{
/*
* Nothing for now
*/
return 0;
}
void __lcd_mem_exit(void)
{
/*
* Nothing for now
*/
return;
}
......@@ -429,3 +429,21 @@ fail2:
fail1:
return ret;
}
/* INIT/EXIT -------------------------------------------------- */
int __lcd_run_init(void)
{
/*
* Nothing for now
*/
return 0;
}
void __lcd_run_exit(void)
{
/*
* Nothing for now
*/
return;
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment