Flash Translation Layer
1.0
|
implementation of the device More...
#include "include/device.h"
#include "include/log.h"
#include "include/ramdisk.h"
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <errno.h>
#include <pthread.h>
Functions | |
struct device_request * | device_alloc_request (uint64_t flags) |
dynamic allocate the device request More... | |
void | device_free_request (struct device_request *request) |
free pre-allocated device_request resource More... | |
int | device_module_init (const uint64_t modnum, struct device **__dev, uint64_t flags) |
initialize the device module More... | |
int | device_module_exit (struct device *dev) |
deallocate the device module More... | |
Variables | |
static int(* | submodule_init [])(struct device *, uint64_t) |
initialize the submodule More... | |
implementation of the device
struct device_request* device_alloc_request | ( | uint64_t | flags | ) |
dynamic allocate the device request
flags | flags for allocate the device request |
void device_free_request | ( | struct device_request * | request | ) |
free pre-allocated device_request resource
request | pointer of the device request |
int device_module_exit | ( | struct device * | dev | ) |
deallocate the device module
dev | pointer of the device module's structure |
int device_module_init | ( | const uint64_t | modnum, |
struct device ** | __dev, | ||
uint64_t | flags | ||
) |
initialize the device module
modnum | module's number |
__dev | device structure pointer (will be allocated) |
flags | initializing flag |
|
static |
initialize the submodule
device | pointer of the device structure |
uint64_t | contain the flag information |