[teklib-general] teklib: Added prototype Exec interface; Exec memory: now using E...

Timm S. Mueller tmueller at neoscientists.org
Sun Feb 15 17:05:59 CET 2009


details:   http://hg.teklib.org/teklib/rev/b924ba57cbdc
changeset: 243:b924ba57cbdc
user:      Timm S. Mueller <tmueller at neoscientists.org>
date:      Sat Feb 07 04:17:21 2009 +0100
description:
Added prototype Exec interface; Exec memory: now using Exec inline calls;
TEKlib: Added TInitInterface function; Exec: Removed TFillMem32() and
TDropInterface() functions

diffs (truncated from 2420 to 100 lines):

diff -r 7a018a1a8e8f -r b924ba57cbdc src/exec/build/tmkmakefile
--- a/src/exec/build/tmkmakefile	Sat Feb 07 00:43:20 2009 +0100
+++ b/src/exec/build/tmkmakefile	Sat Feb 07 04:17:21 2009 +0100
@@ -74,6 +74,7 @@
 		aligntest
 		timedwait
 		interval
+		interface
 	[/embed]
 
 	[embed body="tooldep"]
@@ -100,6 +101,10 @@
 		$(OBJDIR)/interval.to
 		tests/interval.c
 	[/embed]
+	[embed body="tooldep"]
+		$(OBJDIR)/interface.to
+		tests/interface.c
+	[/embed]
 
 	[embed body="toollink"]
 		atomterror
@@ -125,6 +130,10 @@
 		interval
 		$(OBJDIR)/interval.to
 	[/embed]
+	[embed body="toollink"]
+		interface
+		$(OBJDIR)/interface.to
+	[/embed]
 
 [/body]
 
diff -r 7a018a1a8e8f -r b924ba57cbdc src/exec/exec_api.c
--- a/src/exec/exec_api.c	Sat Feb 07 00:43:20 2009 +0100
+++ b/src/exec/exec_api.c	Sat Feb 07 04:17:21 2009 +0100
@@ -331,7 +331,7 @@
 {
 	TAPTR mem = TAlloc(&TExecBase->texb_MsgMMU, size);
 	if (mem)
-		exec_FillMem(TExecBase, mem, size, 0);
+		TFillMem(mem, size, 0);
 	return mem;
 }
 
@@ -874,27 +874,20 @@
 {
 	if (mod && (mod->tmd_Flags & TMODF_QUERYIFACE))
 	{
-		struct TIFaceQuery ifq;
-		ifq.tfq_Name = name;
-		ifq.tfq_Version = version;
-		ifq.tfq_Tags = tags;
-		return (struct TModule *) TCALLHOOKPKT(&mod->tmd_Handle.thn_Hook,
+		struct TInterfaceQuery ifq;
+		struct TInterface *iface;
+		ifq.tifq_Name = name;
+		ifq.tifq_Version = version;
+		ifq.tifq_Tags = tags;
+		iface = (struct TInterface *) TCALLHOOKPKT(&mod->tmd_Handle.thn_Hook,
 			&ifq, TMSG_QUERYIFACE);
+		if (iface)
+		{
+			iface->tif_Handle.thn_Owner = mod;
+			return iface;
+		}
 	}
 	return TNULL;
-}
-
-/*****************************************************************************/
-/*
-**	exec_DropInterface(exec, mod, iface)
-**	Drop an interface
-*/
-
-EXPORT void exec_DropInterface(struct TExecBase *TExecBase,
-	struct TModule *mod, TAPTR iface)
-{
-	if (mod && iface && (mod->tmd_Flags & TMODF_QUERYIFACE))
-		TCALLHOOKPKT(&mod->tmd_Handle.thn_Hook, iface, TMSG_DROPIFACE);
 }
 
 /*****************************************************************************/
diff -r 7a018a1a8e8f -r b924ba57cbdc src/exec/exec_memory.c
--- a/src/exec/exec_memory.c	Sat Feb 07 00:43:20 2009 +0100
+++ b/src/exec/exec_memory.c	Sat Feb 07 04:17:21 2009 +0100
@@ -25,8 +25,9 @@
 	if (msg == TMSG_DESTROY)
 	{
 		struct TMemManager *mmu = obj;
+		struct TExecBase *TExecBase = TGetExecBase(mmu);
 		TCALLHOOKPKT(&mmu->tmm_Hook, mmu, (TTAG) &msg_destroy);
-		exec_Free((TEXECBASE *) mmu->tmm_Handle.thn_Owner, mmu);
+		TFree(mmu);
 	}
 	return 0;
 }
@@ -37,9 +38,10 @@
 	if (msg == TMSG_DESTROY)


More information about the teklib-general mailing list