Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/pgoyette-compat]: src/sys/sys Insist that all hooks are of type int
details: https://anonhg.NetBSD.org/src/rev/bace043a9c76
branches: pgoyette-compat
changeset: 830713:bace043a9c76
user: pgoyette <pgoyette%NetBSD.org@localhost>
date: Sun Sep 16 01:51:58 2018 +0000
description:
Insist that all hooks are of type int
diffstat:
sys/sys/compat_stub.h | 19 ++++++++-----------
1 files changed, 8 insertions(+), 11 deletions(-)
diffs (61 lines):
diff -r 0dceb50a346f -r bace043a9c76 sys/sys/compat_stub.h
--- a/sys/sys/compat_stub.h Sun Sep 16 00:40:27 2018 +0000
+++ b/sys/sys/compat_stub.h Sun Sep 16 01:51:58 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: compat_stub.h,v 1.1.2.19 2018/09/16 00:40:27 pgoyette Exp $ */
+/* $NetBSD: compat_stub.h,v 1.1.2.20 2018/09/16 01:51:58 pgoyette Exp $ */
/*-
* Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -44,25 +44,25 @@
* unloaded.
*/
-#define COMPAT_HOOK(hook,type,args) \
+#define COMPAT_HOOK(hook,args) \
extern struct __CONCAT(hook,_t) { \
kmutex_t lock; \
kcondvar_t cv; \
struct localcount lc; \
pserialize_t psz; \
bool hooked; \
- type (*func)args; \
+ int (*func)args; \
} hook __cacheline_aligned;
-#define COMPAT_HOOK2(hook,type1,args1,type2,args2) \
+#define COMPAT_HOOK2(hook,args1,args2) \
extern struct __CONCAT(hook,_t) { \
kmutex_t lock; \
kcondvar_t cv; \
struct localcount lc; \
pserialize_t psz; \
bool hooked; \
- type1 (*func1)args1; \
- type2 (*func2)args2; \
+ int (*func1)args1; \
+ int (*func2)args2; \
} hook __cacheline_aligned;
#define COMPAT_SET_HOOK(hook, waitchan, f) \
@@ -152,7 +152,7 @@
}
#define COMPAT_CALL_HOOK(hook, which, args, no_hook) \
-type \
+int \
__CONCAT(call_,hook)(args) \
{ \
bool hooked; \
@@ -191,10 +191,7 @@
* Routine vector for dev/ccd ioctl()
*/
-extern int (*compat_ccd_ioctl_60)(dev_t, u_long, void *, int, struct lwp *,
- int (*f)(dev_t, u_long, void *, int, struct lwp *));
-
-COMPAT_HOOK(ccd_ioctl_hook, int, (dev_t, u_long, void *, int, struct lwp *,
+COMPAT_HOOK(ccd_ioctl_60_hook, (dev_t, u_long, void *, int, struct lwp *,
int (*f)(dev_t, u_long, void *, int, struct lwp *)))
/*
Home |
Main Index |
Thread Index |
Old Index