[Stackless-checkins] CVS: slpdev/src/2.3/dev/Stackless/core slp_transfer.c, 1.27, 1.28

Christian Tismer tismer at centera.de
Mon Jul 19 01:20:14 CEST 2004


Update of /home/cvs/slpdev/src/2.3/dev/Stackless/core
In directory centera.de:/tmp/cvs-serv7578/core

Modified Files:
	slp_transfer.c 
Log Message:
started to add real stack switching.
I generated some similar slp_switch_stack
implementations from the existing includes.

Alas, I have no real clue yet, how this will fit the system.
There is just a wrong dummy which is not used, yet.

Index: slp_transfer.c
===================================================================
RCS file: /home/cvs/slpdev/src/2.3/dev/Stackless/core/slp_transfer.c,v
retrieving revision 1.27
retrieving revision 1.28
diff -C2 -d -r1.27 -r1.28
*** slp_transfer.c	3 Jun 2004 18:02:11 -0000	1.27
--- slp_transfer.c	18 Jul 2004 23:20:12 -0000	1.28
***************
*** 118,120 ****
--- 118,154 ----
  #endif
  
+ /* experimental feature:
+    Doing a real stack switch.
+    I still have no exact clue how to fit this
+    into the rest of the system...
+  */
+ 
+ #define SLP_STACK_BEGIN(stackref, stsizediff) \
+ 	int stsizeb; \
+ 	\
+ 	stackref += STACK_MAGIC; \
+ 	if (_cstprev != NULL) { \
+ 		if (slp_cstack_new(_cstprev, stackref, _prev) == NULL) \
+ 			return -1; \
+ 		stsizeb = slp_cstack_save(*_cstprev); \
+ 	} \
+ 	else \
+ 		stsizeb = (_cst->startaddr - stackref) * sizeof(int*); \
+ 	if (_cst == NULL) return 0; \
+ 	stsizediff = stsizeb - (_cst->ob_size * sizeof(int*));
+ 
+ #define SLP_STACK_END() \
+ 	if (_cst != NULL) { \
+ 		slp_cstack_restore(_cst); \
+ 	}
+ 
+ #include "platf/slp_switch_stack.h"
+ 
+ int
+ slp_transfer_stack(PyCStackObject **cstprev, PyCStackObject *cst)
+ {
+ 	/* this is defunct, no idea how it must be */
+ 	return slp_switch_stack();
+ }
+ 
  #endif


_______________________________________________
Stackless-checkins mailing list
Stackless-checkins at stackless.com
http://www.stackless.com/mailman/listinfo/stackless-checkins



More information about the Stackless-checkins mailing list