summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2024-12-16 01:18:22 -0500
committerIan Moffett <ian@osmora.org>2024-12-16 01:18:22 -0500
commita9e8529c42405ef95b775d84c01e022627c5f258 (patch)
treef272c33886a8db32d48cf1a11a8d3cbde266fa9d
parent9f5dae52cc66fbae16781fd73174c9d220e83560 (diff)
kernel: synch: Move spinlock_usleep()
Signed-off-by: Ian Moffett <ian@osmora.org>
-rw-r--r--sys/include/sys/spinlock.h1
-rw-r--r--sys/include/sys/systm.h3
-rw-r--r--sys/kern/kern_synch.c1
3 files changed, 2 insertions, 3 deletions
diff --git a/sys/include/sys/spinlock.h b/sys/include/sys/spinlock.h
index 42f6848..2cf7e5c 100644
--- a/sys/include/sys/spinlock.h
+++ b/sys/include/sys/spinlock.h
@@ -40,6 +40,7 @@ struct spinlock {
void spinlock_acquire(struct spinlock *lock);
void spinlock_release(struct spinlock *lock);
+int spinlock_usleep(struct spinlock *lock, size_t usec_max);
#endif
diff --git a/sys/include/sys/systm.h b/sys/include/sys/systm.h
index 2f870a6..1b17a06 100644
--- a/sys/include/sys/systm.h
+++ b/sys/include/sys/systm.h
@@ -31,13 +31,10 @@
#define _SYS_SYSTM_H_
#include <sys/types.h>
-#include <sys/spinlock.h>
#if defined(_KERNEL)
int copyin(const void *uaddr, void *kaddr, size_t len);
int copyout(const void *kaddr, void *uaddr, size_t len);
-
int copyinstr(const void *uaddr, char *kaddr, size_t len);
-int spinlock_usleep(struct spinlock *lock, size_t usec_max);
#endif /* _KERNEL */
#endif /* !_SYS_SYSTM_H_ */
diff --git a/sys/kern/kern_synch.c b/sys/kern/kern_synch.c
index 67ef617..9d214bb 100644
--- a/sys/kern/kern_synch.c
+++ b/sys/kern/kern_synch.c
@@ -31,6 +31,7 @@
#include <sys/systm.h>
#include <sys/errno.h>
#include <sys/syslog.h>
+#include <sys/spinlock.h>
#include <dev/timer.h>
#define pr_trace(fmt, ...) kprintf("synch: " fmt, ##__VA_ARGS__)