From 743db36cd208c6f212a6b534e6bb8ee9256505ad Mon Sep 17 00:00:00 2001 From: Jack Jansen Date: Thu, 13 Aug 1992 14:13:11 +0000 Subject: Modified to allow other threads to run in a multithreaded environment. --- Modules/cstubs | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'Modules/cstubs') diff --git a/Modules/cstubs b/Modules/cstubs index 89ac69deea..bbb3a10637 100644 --- a/Modules/cstubs +++ b/Modules/cstubs @@ -25,6 +25,11 @@ Each definition must be contained on one line: N*retval */ +/* + * An attempt has been made to make this module switch threads on qread + * calls. It is far from safe, though. + */ + #include #include @@ -32,6 +37,7 @@ Each definition must be contained on one line: #include "import.h" #include "modsupport.h" #include "cgensupport.h" +#include "ceval.h" /* Some stubs are too complicated for the stub generator. @@ -40,6 +46,27 @@ A line starting with '%' gives the name of the function so the stub generator can include it in the table of functions. */ +% qread + +static object * +gl_qread(self, args) + object *self; + object *args; +{ + long retval; + short arg1 ; + BGN_SAVE + retval = qread( & arg1 ); + END_SAVE + { object *v = newtupleobject( 2 ); + if (v == NULL) return NULL; + settupleitem(v, 0, mknewlongobject(retval)); + settupleitem(v, 1, mknewshortobject(arg1)); + return v; + } +} + + /* varray -- an array of v.. calls. The argument is an array (maybe list or tuple) of points. -- cgit v1.2.1