[teklib-general] teklib: Removed TTimeBase function calls from DirectFB, RawFB Di...

Timm S. Mueller tmueller at neoscientists.org
Wed Jan 14 13:36:42 CET 2009


details:   http://hg.teklib.org/teklib/rev/bfe0b2a7f498
changeset: 221:bfe0b2a7f498
user:      Timm S. Mueller <tmueller at neoscientists.org>
date:      Sat Jan 10 02:11:51 2009 +0100
description:
Removed TTimeBase function calls from DirectFB, RawFB Displays

diffs (truncated from 259 to 100 lines):

diff -r 6a88b9254afe -r bfe0b2a7f498 src/display_directfb/display_dfb_mod.c
--- a/src/display_directfb/display_dfb_mod.c	Sat Jan 10 01:31:19 2009 +0100
+++ b/src/display_directfb/display_dfb_mod.c	Sat Jan 10 02:11:51 2009 +0100
@@ -188,12 +188,9 @@
 	{
 		TTAGITEM tags[2];
 
-		mod->dfb_TimeBase =
-			TExecOpenModule(mod->dfb_ExecBase, "time", 0, TNULL);
-		if (mod->dfb_TimeBase == TNULL) break;
-
 		mod->dfb_TimeReq =
-			TTimeAllocTimeRequest(mod->dfb_TimeBase, TNULL);
+			TExecAllocTimeRequest(mod->dfb_ExecBase, TNULL);
+		if (mod->dfb_TimeReq == TNULL) break;
 
 		tags[0].tti_Tag = TTask_UserData;
 		tags[0].tti_Value = (TTAG) mod;
@@ -224,11 +221,7 @@
 		TDestroy(mod->dfb_Task);
 	}
 
-	if (mod->dfb_TimeBase)
-	{
-		TTimeFreeTimeRequest(mod->dfb_TimeBase, mod->dfb_TimeReq);
-		TExecCloseModule(mod->dfb_ExecBase, mod->dfb_TimeBase);
-	}
+	TExecFreeTimeRequest(mod->dfb_ExecBase, mod->dfb_TimeReq);
 }
 
 /*****************************************************************************/
@@ -541,8 +534,8 @@
 	TTIME nextt;
 	TTIME waitt, nowt;
 
-	TTimeQueryTime(inst->dfb_TimeBase, inst->dfb_TimeReq, &nextt);
-	TTimeAddTime(inst->dfb_TimeBase, &nextt, &intt);
+	TExecQueryTime(inst->dfb_ExecBase, inst->dfb_TimeReq, &nextt);
+	TExecAddTime(inst->dfb_ExecBase, &nextt, &intt);
 
 	TDBPRINTF(TDB_ERROR,("Device instance running\n"));
 
@@ -568,9 +561,9 @@
 		FD_SET(inst->dfb_FDSigPipeRead, &rset);
 
 		/* calculate new delta to wait: */
-		TTimeQueryTime(inst->dfb_TimeBase, inst->dfb_TimeReq, &nowt);
+		TExecQueryTime(inst->dfb_ExecBase, inst->dfb_TimeReq, &nowt);
 		waitt = nextt;
-		TTimeSubTime(inst->dfb_TimeBase, &waitt, &nowt);
+		TExecSubTime(inst->dfb_ExecBase, &waitt, &nowt);
 
 		tv.tv_sec = waitt.ttm_Sec;
 		tv.tv_usec = waitt.ttm_USec;
@@ -593,17 +586,17 @@
 		}
 
 		/* check if time interval has expired: */
-		TTimeQueryTime(inst->dfb_TimeBase, inst->dfb_TimeReq, &nowt);
-		if (TTimeCmpTime(inst->dfb_TimeBase, &nowt, &nextt) > 0)
+		TExecQueryTime(inst->dfb_ExecBase, inst->dfb_TimeReq, &nowt);
+		if (TExecCmpTime(inst->dfb_ExecBase, &nowt, &nextt) > 0)
 		{
 			/* expired; send interval: */
 			do_interval = TTRUE;
-			TTimeAddTime(inst->dfb_TimeBase, &nextt, &intt);
-			if (TTimeCmpTime(inst->dfb_TimeBase, &nowt, &nextt) >= 0)
+			TExecAddTime(inst->dfb_ExecBase, &nextt, &intt);
+			if (TExecCmpTime(inst->dfb_ExecBase, &nowt, &nextt) >= 0)
 			{
 				/* nexttime expired already; create new time from now: */
 				nextt = nowt;
-				TTimeAddTime(inst->dfb_TimeBase, &nextt, &intt);
+				TExecAddTime(inst->dfb_ExecBase, &nextt, &intt);
 			}
 		}
 
@@ -998,7 +991,7 @@
 		msg->timsg_Qualifier = mod->dfb_KeyQual;
 		msg->timsg_MouseX = mod->dfb_MouseX;
 		msg->timsg_MouseY = mod->dfb_MouseY;
-		TTimeQueryTime(mod->dfb_TimeBase, mod->dfb_TimeReq, &msg->timsg_TimeStamp);
+		TExecQueryTime(mod->dfb_ExecBase, mod->dfb_TimeReq, &msg->timsg_TimeStamp);
 		*msgptr = msg;
 		return TTRUE;
 	}
diff -r 6a88b9254afe -r bfe0b2a7f498 src/display_directfb/display_dfb_mod.h
--- a/src/display_directfb/display_dfb_mod.h	Sat Jan 10 01:31:19 2009 +0100
+++ b/src/display_directfb/display_dfb_mod.h	Sat Jan 10 02:11:51 2009 +0100
@@ -139,15 +139,15 @@
 	/* Module header: */
 	struct TModule dfb_Module;
 	/* Exec module base ptr: */
-	TAPTR dfb_ExecBase;
+	struct TExecBase *dfb_ExecBase;
 	/* Locking for module base structure: */
-	TAPTR dfb_Lock;
+	struct TLock *dfb_Lock;
 	/* Number of module opens: */
-	TAPTR dfb_RefCount;


More information about the teklib-general mailing list