lock: merge spinlock and mtx locks into one
Signed-off-by: Michael Shaw <m@michaelsshaw.com>
This commit is contained in:
parent
3e5abada9b
commit
2076f1dae1
32 changed files with 158 additions and 169 deletions
|
|
@ -2,21 +2,21 @@
|
|||
#ifndef _DCACHE_H_
|
||||
#define _DCACHE_H_
|
||||
|
||||
#include <kernel/spinlock.h>
|
||||
#include <kernel/lock.h>
|
||||
#include <fs/vfs.h>
|
||||
|
||||
#include <lib/list.h>
|
||||
|
||||
#define DCACHE_SHIFT 10
|
||||
#define DCACHE_SIZE (1 << DCACHE_SHIFT)
|
||||
#define DCACHE_SIZE (1 << DCACHE_SHIFT)
|
||||
|
||||
#define DCACHE_LOCK_SHIFT 4
|
||||
#define DCACHE_NLOCKS (1 << DCACHE_LOCK_SHIFT)
|
||||
#define DCACHE_NLOCKS (1 << DCACHE_LOCK_SHIFT)
|
||||
|
||||
struct dc_entry {
|
||||
struct dc_entry *parent;
|
||||
struct mount *mount;
|
||||
spinlock_t lock;
|
||||
lock_t lock;
|
||||
list_t children;
|
||||
dirent_t *dirent;
|
||||
char d_name[FILE_NAME_MAX_LEN + 1];
|
||||
|
|
|
|||
Loading…
Reference in a new issue