X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fincludes%2FRtsAPI.h;h=32e73622fdfbcadec52f55244082faa9f3c05100;hb=af13609607da81e7837a7c7c598de82452363ab5;hp=cf0792307d051251c94b9da79cf420e7e99ebba8;hpb=be6592933f4cdf78a495233376e44c9458b17b78;p=ghc-hetmet.git diff --git a/ghc/includes/RtsAPI.h b/ghc/includes/RtsAPI.h index cf079230..32e7362 100644 --- a/ghc/includes/RtsAPI.h +++ b/ghc/includes/RtsAPI.h @@ -1,5 +1,5 @@ /* ---------------------------------------------------------------------------- - * $Id: RtsAPI.h,v 1.30 2002/09/05 08:58:55 simonmar Exp $ + * $Id: RtsAPI.h,v 1.31 2003/01/25 15:54:48 wolfgang Exp $ * * (c) The GHC Team, 1998-1999 * @@ -38,6 +38,20 @@ extern void shutdownHaskellAndExit ( int exitCode ); extern void setProgArgv ( int argc, char *argv[] ); extern void getProgArgv ( int *argc, char **argv[] ); + +/* ---------------------------------------------------------------------------- + Locking. + + In a multithreaded environments, you have to surround all access to the + RtsAPI with these calls. + ------------------------------------------------------------------------- */ + +void +rts_lock ( void ); + +void +rts_unlock ( void ); + /* ---------------------------------------------------------------------------- Building Haskell objects from C datatypes. ------------------------------------------------------------------------- */ @@ -85,6 +99,8 @@ HsBool rts_getBool ( HaskellObj ); Evaluating Haskell expressions The versions ending in '_' allow you to specify an initial stack size. + Note that these calls may cause Garbage Collection, so all HaskellObj + references are rendered invalid by these calls. ------------------------------------------------------------------------- */ SchedulerStatus rts_eval ( HaskellObj p, /*out*/HaskellObj *ret );