[teklib-general] teklib: Visual module: Cleanup, now using Exec inline calls; min...

Timm S. Mueller tmueller at neoscientists.org
Sun Feb 1 14:25:57 CET 2009


details:   http://hg.teklib.org/teklib/rev/8640109d478e
changeset: 240:8640109d478e
user:      Timm S. Mueller <tmueller at neoscientists.org>
date:      Thu Jan 22 16:59:59 2009 +0100
description:
Visual module: Cleanup, now using Exec inline calls; minor corrections in
build configuration files for release builds

diffs (truncated from 566 to 100 lines):

diff -r 0bf2a06e7dc9 -r 8640109d478e build/config/posix_fbsd.tmk
--- a/build/config/posix_fbsd.tmk	Thu Jan 22 15:47:11 2009 +0100
+++ b/build/config/posix_fbsd.tmk	Thu Jan 22 16:59:59 2009 +0100
@@ -54,7 +54,7 @@
 	[switch]
 		[case config="_gcc_release"]
 			OPT 	= -O2 -fomit-frame-pointer
-			WARN	=
+			WARN	+= -Wno-unused
 		[/case]
 		[case config="_gcc_debug"]
 			OPT 	= -O1
diff -r 0bf2a06e7dc9 -r 8640109d478e build/config/posix_linux.tmk
--- a/build/config/posix_linux.tmk	Thu Jan 22 15:47:11 2009 +0100
+++ b/build/config/posix_linux.tmk	Thu Jan 22 16:59:59 2009 +0100
@@ -54,7 +54,7 @@
 	[switch]
 		[case config="_gcc_release"]
 			OPT     = -O2 -fomit-frame-pointer
-			WARN	=
+			WARN	+= -Wno-unused
 		[/case]
 		[case config="_gcc_debug"]
 			OPT     = -O1
diff -r 0bf2a06e7dc9 -r 8640109d478e build/config/winnt_winnt.tmk
--- a/build/config/winnt_winnt.tmk	Thu Jan 22 15:47:11 2009 +0100
+++ b/build/config/winnt_winnt.tmk	Thu Jan 22 16:59:59 2009 +0100
@@ -58,7 +58,7 @@
 	[switch]
 		[case config="_gcc_release"]
 			OPT     = -O2 -fomit-frame-pointer
-			WARN	=
+			WARN	+= -Wno-unused
 		[/case]
 		[case config="_gcc_debug"]
 			OPT     = -O1
diff -r 0bf2a06e7dc9 -r 8640109d478e src/visual/visual_api.c
--- a/src/visual/visual_api.c	Thu Jan 22 15:47:11 2009 +0100
+++ b/src/visual/visual_api.c	Thu Jan 22 16:59:59 2009 +0100
@@ -12,7 +12,9 @@
 static struct TVRequest *
 visi_getreq(struct TVisualBase *inst, TUINT cmd, TAPTR display, TTAGITEM *tags)
 {
-	struct TVisualBase *mod = (struct TVisualBase *) inst->vis_Module.tmd_ModSuper;
+	struct TVisualBase *mod =
+		(struct TVisualBase *) inst->vis_Module.tmd_ModSuper;
+	struct TExecBase *TExecBase = TGetExecBase(mod);
 	struct TVRequest *req = TNULL;
 
 	if (display == TNULL)
@@ -22,7 +24,7 @@
 	{
 		if (mod == inst)
 		{
-			TExecLock(inst->vis_ExecBase, inst->vis_Lock);
+			TLock(inst->vis_Lock);
 			if (inst->vis_InitRequest)
 			{
 				req = inst->vis_InitRequest;
@@ -31,14 +33,14 @@
 			}
 			else
 			{
-				TExecUnlock(inst->vis_ExecBase, inst->vis_Lock);
+				TUnlock(inst->vis_Lock);
 				req = TDisplayAllocReq(display);
 			}
 
 			if (req)
 			{
 				req->tvr_Req.io_Command = cmd;
-				req->tvr_Req.io_ReplyPort = TNULL; /* syncport */
+				req->tvr_Req.io_ReplyPort = TGetSyncPort(TNULL);
 			}
 		}
 		else
@@ -55,7 +57,7 @@
 					if (inst->vis_NumRequests >= VISUAL_MAXREQPERINSTANCE)
 					{
 						/* wait and unlink from waitlist: */
-						TExecWaitIO(inst->vis_ExecBase, &req->tvr_Req);
+						TWaitIO(&req->tvr_Req);
 						TRemove(&req->tvr_Req.io_Node);
 					}
 					else
@@ -83,45 +85,48 @@
 }
 
 static void
-visi_ungetreq(struct TVisualBase *inst, struct TVRequest *req)
+visi_ungetreq(struct TVisualBase *mod, struct TVRequest *req)
 {
-	if (inst->vis_Module.tmd_ModSuper == (struct TModule *) inst)
+	struct TExecBase *TExecBase = TGetExecBase(mod);
+	if (mod->vis_Module.tmd_ModSuper == (struct TModule *) mod)
 	{
-		TExecLock(inst->vis_ExecBase, inst->vis_Lock);
-		if (inst->vis_InitRequest == TNULL)
+		TLock(mod->vis_Lock);
+		if (mod->vis_InitRequest == TNULL)


More information about the teklib-general mailing list