Flash Translation Layer  1.0
Macros | Functions | Variables
main.c File Reference

main program for test the interface More...

#include <assert.h>
#include <climits>
#include <stdio.h>
#include <unistd.h>
#include <string.h>
#include <errno.h>
#include <fcntl.h>
#include <glib.h>
#include "include/module.h"
#include "include/flash.h"
#include "include/page.h"
#include "include/log.h"
#include "include/device.h"
Include dependency graph for main.c:

Macros

#define USE_RANDOM_WAIT
 
#define RAND_WORKLOAD
 
#define DEVICE_PATH   "/dev/nvme0n2"
 
#define WRITE_SIZE   ((size_t)8192 * 8192)
 
#define NR_ERASE   (10)
 
#define BLOCK_SIZE   ((size_t)4096)
 

Functions

void * read_thread (void *data)
 
void * write_thread (void *data)
 
void * overwrite_thread (void *data)
 
void * erase_thread (void *data)
 
int main (void)
 

Variables

int is_check [WRITE_SIZE/BLOCK_SIZE]
 
gint is_overwrite = 0
 

Detailed Description

main program for test the interface

Author
Gijun Oh
Version
0.2
Date
2021-09-22

Macro Definition Documentation

◆ BLOCK_SIZE

#define BLOCK_SIZE   ((size_t)4096)

◆ DEVICE_PATH

#define DEVICE_PATH   "/dev/nvme0n2"

◆ NR_ERASE

#define NR_ERASE   (10)

◆ RAND_WORKLOAD

#define RAND_WORKLOAD

◆ USE_RANDOM_WAIT

#define USE_RANDOM_WAIT

◆ WRITE_SIZE

#define WRITE_SIZE   ((size_t)8192 * 8192)

Function Documentation

◆ erase_thread()

void* erase_thread ( void *  data)

◆ main()

int main ( void  )
Here is the call graph for this function:

◆ overwrite_thread()

void* overwrite_thread ( void *  data)

◆ read_thread()

void* read_thread ( void *  data)

◆ write_thread()

void* write_thread ( void *  data)

Variable Documentation

◆ is_check

int is_check[WRITE_SIZE/BLOCK_SIZE]

◆ is_overwrite

gint is_overwrite = 0