diff --git a/log.c b/log.c index 00a881f..f82a9d3 100644 --- a/log.c +++ b/log.c @@ -38,14 +38,15 @@ struct logheader { int sector[LOGSIZE]; }; -struct { +struct log { struct spinlock lock; int start; int size; int intrans; int dev; struct logheader lh; -} log; +}; +struct log log; static void recover_from_log(void);