diff options
author | Warner Losh <imp@FreeBSD.org> | 2021-04-26 17:04:15 +0000 |
---|---|---|
committer | Warner Losh <imp@FreeBSD.org> | 2021-04-26 17:41:08 +0000 |
commit | 099919b76dce8ae118fea8bc950d2a7157a9c28b (patch) | |
tree | 16e5baced902055fb9d73dab8f51f0308296a17b /sys/tools | |
parent | 5eb9c93a20d7320b24635ed09eba4908951bdeb2 (diff) | |
download | src-099919b76dce8ae118fea8bc950d2a7157a9c28b.tar.gz src-099919b76dce8ae118fea8bc950d2a7157a9c28b.zip |
Diffstat (limited to 'sys/tools')
-rw-r--r-- | sys/tools/makeobjops.awk | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/sys/tools/makeobjops.awk b/sys/tools/makeobjops.awk index c0fb8db10f3e..5a4ccf759960 100644 --- a/sys/tools/makeobjops.awk +++ b/sys/tools/makeobjops.awk @@ -325,18 +325,13 @@ function handle_method (static, doc) line_width, length(prototype))); } printh("{"); - if (singleton) - printh("\tstatic kobjop_t _m;"); - else - printh("\tkobjop_t _m;"); + printh("\tkobjop_t _m;"); if (ret != "void") printh("\t" ret " rc;"); if (!static) firstvar = "((kobj_t)" firstvar ")"; if (prolog != "") printh(prolog); - if (singleton) - printh("\tif (_m == NULL)"); printh("\tKOBJOPLOOKUP(" firstvar "->ops," mname ");"); rceq = (ret != "void") ? "rc = " : ""; printh("\t" rceq "((" mname "_t *) _m)(" varname_list ");"); @@ -458,7 +453,6 @@ for (file_i = 0; file_i < num_files; file_i++) { lastdoc = ""; prolog = ""; epilog = ""; - singleton = 0; while (!error && (getline < src) > 0) { lineno++; @@ -503,8 +497,6 @@ for (file_i = 0; file_i < num_files; file_i++) { prolog = handle_code(); else if (/^EPILOG[ ]*{$/) epilog = handle_code(); - else if (/^SINGLETON/) - singleton = 1; else { debug($0); warnsrc("Invalid line encountered"); |