[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 5/7] Created qemu-os.h for function prototype
From: |
Ajeets6 |
Subject: |
[PATCH 5/7] Created qemu-os.h for function prototype |
Date: |
Sat, 22 Apr 2023 21:49:32 +0530 |
From: Stacey Son <sson@FreeBSD.org>
+Added t2h_freebsd_timespec and h2t_freebsd_timespec function protype in
qemu-is.h
+included qemu-os.h in os-time.c and os-time.h
Signed-off-by: Stacey Son <sson@FreeBSD.org>
Signed-off-by: Ajeets6 <itachis6234@gmail.com>
---
bsd-user/freebsd/os-time.c | 2 ++
bsd-user/freebsd/os-time.h | 5 ++++-
bsd-user/freebsd/qemu-os.h | 30 ++++++++++++++++++++++++++++++
3 files changed, 36 insertions(+), 1 deletion(-)
create mode 100644 bsd-user/freebsd/qemu-os.h
diff --git a/bsd-user/freebsd/os-time.c b/bsd-user/freebsd/os-time.c
index e71eed6519..5c88e1f13d 100644
--- a/bsd-user/freebsd/os-time.c
+++ b/bsd-user/freebsd/os-time.c
@@ -23,6 +23,8 @@
#include "qemu/osdep.h"
#include <time.h>
#include "qemu.h"
+#include "qemu-os.h"
+
abi_long t2h_freebsd_timespec(struct timespec *ts, abi_ulong target_ts_addr)
diff --git a/bsd-user/freebsd/os-time.h b/bsd-user/freebsd/os-time.h
index f76744e808..bd995c8a7b 100644
--- a/bsd-user/freebsd/os-time.h
+++ b/bsd-user/freebsd/os-time.h
@@ -22,6 +22,7 @@
#include "qemu.h"
+#include "qemu-os.h"
@@ -94,4 +95,6 @@ static inline abi_long do_freebsd_clock_getres(abi_long arg1,
abi_long arg2)
}
return ret;
-}
\ No newline at end of file
+}
+
+#endif /* FREEBSD_OS_TIME_H */
diff --git a/bsd-user/freebsd/qemu-os.h b/bsd-user/freebsd/qemu-os.h
new file mode 100644
index 0000000000..0c502ff0e5
--- /dev/null
+++ b/bsd-user/freebsd/qemu-os.h
@@ -0,0 +1,30 @@
+/*
+ * FreeBSD conversion extern declarations
+ *
+ * Copyright (c) 2013 Stacey D. Son
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef QEMU_OS_H
+#define QEMU_OS_H
+
+#include <sys/timex.h>
+
+/* os-time.c */
+abi_long t2h_freebsd_timespec(struct timespec *ts, abi_ulong target_ts_addr);
+abi_long h2t_freebsd_timespec(abi_ulong target_ts_addr, struct timespec *ts);
+
+
+#endif /* QEMU_OS_H */
\ No newline at end of file
--
2.34.1
- [PATCH 1/7] Create os-time.c and add t2h_freebsd_timeval, Ajeets6, 2023/04/22
- [PATCH 5/7] Created qemu-os.h for function prototype,
Ajeets6 <=
- [PATCH 2/7] Create os-time.h and modify os-time.c, Ajeets6, 2023/04/22
- [PATCH 6/7] Added case staements for time functions, Ajeets6, 2023/04/22
- [PATCH 4/7] Added clock_gettime(2) and clock_getres(2), Ajeets6, 2023/04/22
- [PATCH 3/7] Add clock_nanosleep, Ajeets6, 2023/04/22
- [PATCH 7/7] Added safe_syscalls for time functions., Ajeets6, 2023/04/22