Skip to content
This repository was archived by the owner on Jan 4, 2026. It is now read-only.

Commit 9cacb45

Browse files
committed
C++
1 parent 8d0d7f9 commit 9cacb45

File tree

4 files changed

+362
-282
lines changed

4 files changed

+362
-282
lines changed

drivers/virtio/VirtioBlk.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@
33
#include <BlockDevice.h>
44
#include <Console.h>
55
#include <DriveNaming.h>
6-
#include <Format.h>
76
#include <PCI/PCI.h>
8-
#include <../../kernel/atomic/cpp/Spinlock.h>
97
#include <SpinlockRust.h>
108
#include <VMem.h>
119
#include <Virtio.h>

kernel/atomic/cpp/Spinlock.h

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,10 @@ class SpinlockGuard {
1717
public:
1818
explicit SpinlockGuard(Spinlock& lock);
1919
~SpinlockGuard();
20-
20+
SpinlockGuard(const SpinlockGuard&) = delete;
21+
SpinlockGuard& operator=(const SpinlockGuard&) = delete;
22+
SpinlockGuard(SpinlockGuard&&) = delete;
23+
SpinlockGuard& operator=(SpinlockGuard&&) = delete;
2124
private:
2225
Spinlock& lock;
2326
};
@@ -28,7 +31,7 @@ class SpinlockGuard {
2831
extern "C" {
2932
#endif
3033

31-
typedef struct Spinlock Spinlock;
34+
typedef Spinlock Spinlock;
3235

3336
void spinlock_lock(Spinlock* lock);
3437
void spinlock_unlock(Spinlock* lock);

0 commit comments

Comments
 (0)