r5291 chris_y - in /trunk/netsurf/amiga: gui.c schedule.c

netsurf at semichrome.net netsurf at semichrome.net
Tue Sep 9 07:25:23 BST 2008


Author: chris_y
Date: Tue Sep  9 01:25:22 2008
New Revision: 5291

URL: http://source.netsurf-browser.org?rev=5291&view=rev
Log:
Disabled the new scheduler by default as it is more unstable than I thought :(
Defining AMI_SCHEDULER_USES_TIMER will enable it again.

Modified:
    trunk/netsurf/amiga/gui.c
    trunk/netsurf/amiga/schedule.c

Modified: trunk/netsurf/amiga/gui.c
URL: http://source.netsurf-browser.org/trunk/netsurf/amiga/gui.c?rev=5291&r1=5290&r2=5291&view=diff
==============================================================================
--- trunk/netsurf/amiga/gui.c (original)
+++ trunk/netsurf/amiga/gui.c Tue Sep  9 01:25:22 2008
@@ -609,6 +609,9 @@
 		        break;
 
 				case WMHI_INTUITICK:
+#ifndef AMI_SCHEDULER_USES_TIMER
+					schedule_run();
+#endif
 				break;
 
 	   	     	default:

Modified: trunk/netsurf/amiga/schedule.c
URL: http://source.netsurf-browser.org/trunk/netsurf/amiga/schedule.c?rev=5291&r1=5290&r2=5291&view=diff
==============================================================================
--- trunk/netsurf/amiga/schedule.c (original)
+++ trunk/netsurf/amiga/schedule.c Tue Sep  9 01:25:22 2008
@@ -39,8 +39,15 @@
 	struct timeval tv;
 
 	obj = AddObject(schedule_list,AMINS_CALLBACK);
+	if(!obj) return;
+
 	obj->objstruct_size = sizeof(struct nscallback);
 	obj->objstruct = AllocVec(obj->objstruct_size,MEMF_CLEAR);
+	if(!obj->objstruct)
+	{
+		DelObject(obj);
+		return;
+	}
 
 	nscb = (struct nscallback *)obj->objstruct;
 
@@ -55,15 +62,16 @@
 
 	GetSysTime(&tv);
 	AddTime(&nscb->tv,&tv); // now contains time when event occurs
-
-	nscb->treq = AllocVec(sizeof(struct timerequest),MEMF_CLEAR);
-
-	*nscb->treq = *tioreq;
-    nscb->treq->tr_node.io_Command=TR_ADDREQUEST;
-    nscb->treq->tr_time.tv_sec=nscb->tv.tv_sec; // secs
-    nscb->treq->tr_time.tv_micro=nscb->tv.tv_micro; // micro
-    SendIO((struct IORequest *)nscb->treq);
-
+#ifdef AMI_SCHEDULER_USES_TIMER
+	if(nscb->treq = AllocVec(sizeof(struct timerequest),MEMF_CLEAR))
+	{
+		*nscb->treq = *tioreq;
+    	nscb->treq->tr_node.io_Command=TR_ADDREQUEST;
+    	nscb->treq->tr_time.tv_sec=nscb->tv.tv_sec; // secs
+    	nscb->treq->tr_time.tv_micro=nscb->tv.tv_micro; // micro
+    	SendIO((struct IORequest *)nscb->treq);
+	}
+#endif
 	nscb->callback = callback;
 	nscb->p = p;
 }
@@ -147,7 +155,7 @@
 
 	if(nscb->treq)
 	{
-		if(CheckIO((struct IORequest *)nscb->treq)==0)
+		if(CheckIO((struct IORequest *)nscb->treq)==NULL)
    			AbortIO((struct IORequest *)nscb->treq);
 
 		WaitIO((struct IORequest *)nscb->treq);




More information about the netsurf-commits mailing list