diff options
author | Greg Lewis <glewis@FreeBSD.org> | 2011-08-03 06:30:01 +0000 |
---|---|---|
committer | Greg Lewis <glewis@FreeBSD.org> | 2011-08-03 06:30:01 +0000 |
commit | 1cc01e3044fd1abbca0d91a92345731cde14d65c (patch) | |
tree | 508b7d9788f7b2e22fc1b5c57d6f16fc1b4797bc /net/dgd-kernel | |
parent | 545e0a929948b005898b9f79eb673dc7a033ddaf (diff) |
Notes
Diffstat (limited to 'net/dgd-kernel')
-rw-r--r-- | net/dgd-kernel/Makefile | 1 | ||||
-rw-r--r-- | net/dgd-kernel/files/patch-auto.c | 108 | ||||
-rw-r--r-- | net/dgd-kernel/files/patch-driver.c | 132 |
3 files changed, 241 insertions, 0 deletions
diff --git a/net/dgd-kernel/Makefile b/net/dgd-kernel/Makefile index 0a49c3507493..d46b8e7482f5 100644 --- a/net/dgd-kernel/Makefile +++ b/net/dgd-kernel/Makefile @@ -7,6 +7,7 @@ PORTNAME= dgd-kernel PORTVERSION= 1.3.4 +PORTREVISION= 1 CATEGORIES= net games MASTER_SITES= http://ftp.dworkin.nl/kernellib/ \ http://ftp.dworkin.nl/kernellib/patches/ diff --git a/net/dgd-kernel/files/patch-auto.c b/net/dgd-kernel/files/patch-auto.c new file mode 100644 index 000000000000..a1df5545116e --- /dev/null +++ b/net/dgd-kernel/files/patch-auto.c @@ -0,0 +1,108 @@ +$FreeBSD$ + +--- kernellib/kernel/lib/auto.c.orig 2011-07-30 14:18:12.000000000 -0700 ++++ kernellib/kernel/lib/auto.c 2011-07-30 14:19:44.000000000 -0700 +@@ -765,11 +765,11 @@ + { + object rsrcd; + int stack, ticks; +- string function; ++ string funcname; + mixed tls, *limits, result; + + rsrcd = ::find_object(RSRCD); +- function = arg1; ++ funcname = arg1; + stack = ::status()[ST_STACKDEPTH]; + ticks = ::status()[ST_TICKS]; + rlimits (-1; -1) { +@@ -781,7 +781,7 @@ + } + + rlimits (limits[LIM_MAXSTACK]; limits[LIM_MAXTICKS]) { +- result = call_other(this_object(), function, args...); ++ result = call_other(this_object(), funcname, args...); + + ticks = ::status()[ST_TICKS]; + rlimits (-1; -1) { +@@ -797,36 +797,36 @@ + * NAME: call_limited() + * DESCRIPTION: call a function with the current object owner's resource limits + */ +-static mixed call_limited(string function, mixed args...) ++static mixed call_limited(string funcname, mixed args...) + { +- CHECKARG(function, 1, "call_limited"); ++ CHECKARG(funcname, 1, "call_limited"); + if (!this_object()) { + return nil; + } +- CHECKARG(function_object(function, this_object()) != AUTO || +- function == "create", ++ CHECKARG(function_object(funcname, this_object()) != AUTO || ++ funcname == "create", + 1, "call_limited"); + +- return _F_call_limited(function, args); ++ return _F_call_limited(funcname, args); + } + + /* + * NAME: call_out() + * DESCRIPTION: start a callout + */ +-static int call_out(string function, mixed delay, mixed args...) ++static int call_out(string funcname, mixed delay, mixed args...) + { + int type; + string oname; + +- CHECKARG(function, 1, "call_out"); ++ CHECKARG(funcname, 1, "call_out"); + type = typeof(delay); + CHECKARG(type == T_INT || type == T_FLOAT, 2, "call_out"); + if (!this_object()) { + return 0; + } +- CHECKARG(function_object(function, this_object()) != AUTO || +- function == "create", ++ CHECKARG(function_object(funcname, this_object()) != AUTO || ++ funcname == "create", + 1, "call_out"); + oname = object_name(this_object()); + if (sscanf(oname, "%*s#-1") != 0) { +@@ -838,9 +838,9 @@ + */ + if (sscanf(oname, "/kernel/%*s") != 0) { + /* direct callouts for kernel objects */ +- return ::call_out(function, delay, args...); ++ return ::call_out(funcname, delay, args...); + } +- return ::call_out("_F_callout", delay, function, 0, args); ++ return ::call_out("_F_callout", delay, funcname, 0, args); + } + + /* +@@ -867,11 +867,11 @@ + * NAME: _F_callout() + * DESCRIPTION: callout gate + */ +-nomask void _F_callout(string function, int handle, mixed *args) ++nomask void _F_callout(string funcname, int handle, mixed *args) + { + if (!previous_program()) { + if (handle == 0 && !::find_object(RSRCD)->suspended(this_object())) { +- _F_call_limited(function, args); ++ _F_call_limited(funcname, args); + } else { + mixed *tls; + mixed **callouts; +@@ -882,7 +882,7 @@ + ::find_object(RSRCD)->remove_callout(tls, this_object(), + handle); + } +- handle = ::call_out("_F_callout", LONG_TIME, function, 0, args); ++ handle = ::call_out("_F_callout", LONG_TIME, funcname, 0, args); + callouts = ::status(this_object())[O_CALLOUTS]; + for (i = sizeof(callouts); callouts[--i][CO_HANDLE] != handle; ) ; + callouts[i][CO_FIRSTXARG + 1] = handle; diff --git a/net/dgd-kernel/files/patch-driver.c b/net/dgd-kernel/files/patch-driver.c new file mode 100644 index 000000000000..7cdfc35cdd7b --- /dev/null +++ b/net/dgd-kernel/files/patch-driver.c @@ -0,0 +1,132 @@ +$FreeBSD$ + +--- kernellib/kernel/sys/driver.c.orig 2011-07-30 14:15:13.000000000 -0700 ++++ kernellib/kernel/sys/driver.c 2011-07-30 14:16:23.000000000 -0700 +@@ -596,16 +596,16 @@ + * NAME: _touch() + * DESCRIPTION: touch an object that has been flagged with call_touch() + */ +-private int _touch(mixed *tls, object obj, string function) ++private int _touch(mixed *tls, object obj, string funcname) + { +- return objectd->touch(obj, function); ++ return objectd->touch(obj, funcname); + } + + /* + * NAME: touch() + * DESCRIPTION: wrapper for _touch() + */ +-static int touch(object obj, string function) ++static int touch(object obj, string funcname) + { + mixed *tls; + string prog; +@@ -614,7 +614,7 @@ + if (!previous_object()) { + tls = allocate(tls_size); + } else if (KERNEL()) { +- prog = function_object(function, obj); ++ prog = function_object(funcname, obj); + if (prog && sscanf(prog, "/kernel/%*s") != 0 && + status()[ST_STACKDEPTH] < 0) { + /* +@@ -625,7 +625,7 @@ + } + } + +- return _touch(tls, obj, function); ++ return _touch(tls, obj, funcname); + } + return FALSE; + } +@@ -795,7 +795,7 @@ + private void _runtime_error(mixed tls, string str, int caught, int ticks, + mixed **trace) + { +- string line, function, progname, objname; ++ string line, funcname, progname, objname; + int i, sz, len; + object user; + +@@ -836,10 +836,10 @@ + line = line[strlen(line) - 4 ..]; + } + +- function = trace[i][TRACE_FUNCTION]; +- len = strlen(function); ++ funcname = trace[i][TRACE_FUNCTION]; ++ len = strlen(funcname); + if (progname == AUTO && i != sz - 1 && len > 3) { +- switch (function[.. 2]) { ++ switch (funcname[.. 2]) { + case "bad": + case "_F_": + case "_Q_": +@@ -847,7 +847,7 @@ + } + } + if (len < 17) { +- function += " "[len ..]; ++ funcname += " "[len ..]; + } + + objname = trace[i][TRACE_OBJNAME]; +@@ -857,10 +857,10 @@ + objname[len] == '#') { + objname = objname[len ..]; + } +- str += line + " " + function + " " + progname + " (" + objname + ++ str += line + " " + funcname + " " + progname + " (" + objname + + ")\n"; + } else { +- str += line + " " + function + " " + progname + "\n"; ++ str += line + " " + funcname + " " + progname + "\n"; + } + } + +@@ -914,7 +914,7 @@ + static void atomic_error(string str, int atom, int ticks) + { + mixed **trace; +- string line, function, progname, objname; ++ string line, funcname, progname, objname; + int i, sz, len; + object obj; + +@@ -936,10 +936,10 @@ + line = line[strlen(line) - 4 ..]; + } + +- function = trace[i][TRACE_FUNCTION]; +- len = strlen(function); ++ funcname = trace[i][TRACE_FUNCTION]; ++ len = strlen(funcname); + if (progname == AUTO && i != sz - 1 && len > 3) { +- switch (function[.. 2]) { ++ switch (funcname[.. 2]) { + case "bad": + case "_F_": + case "_Q_": +@@ -947,7 +947,7 @@ + } + } + if (len < 17) { +- function += " "[len ..]; ++ funcname += " "[len ..]; + } + + objname = trace[i][TRACE_OBJNAME]; +@@ -957,10 +957,10 @@ + objname[len] == '#') { + objname = objname[len ..]; + } +- str += line + " " + function + " " + progname + " (" + objname + ++ str += line + " " + funcname + " " + progname + " (" + objname + + ")\n"; + } else { +- str += line + " " + function + " " + progname + "\n"; ++ str += line + " " + funcname + " " + progname + "\n"; + } + } + |