X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fincludes%2FTSO.h;h=747c070d315d8de361851540d5e92fd3434e7089;hb=54fcddbea16bb98dec03593569d1f8372332fe50;hp=f68bf802c3043beb710cfb86bdfa02933b38158b;hpb=b61f70ce5ff947642c96b1ad980351691bb1e07a;p=ghc-hetmet.git diff --git a/ghc/includes/TSO.h b/ghc/includes/TSO.h index f68bf80..747c070 100644 --- a/ghc/includes/TSO.h +++ b/ghc/includes/TSO.h @@ -1,5 +1,4 @@ /* ----------------------------------------------------------------------------- - * $Id: TSO.h,v 1.39 2004/11/18 09:56:22 tharris Exp $ * * (c) The GHC Team, 1998-1999 * @@ -85,8 +84,8 @@ typedef StgWord32 StgThreadID; */ typedef unsigned int StgThreadReturnCode; -#if defined(mingw32_TARGET_OS) -/* results from an async I/O request + it's ID. */ +#if defined(mingw32_HOST_OS) +/* results from an async I/O request + its request ID. */ typedef struct { unsigned int reqID; int len; @@ -97,9 +96,9 @@ typedef struct { typedef union { StgClosure *closure; struct StgTSO_ *tso; - StgInt fd; // StgInt instead of int, so that it's the same size as the ptrs -#if defined(mingw32_TARGET_OS) - StgAsyncIOResult* async_result; + StgInt fd; /* StgInt instead of int, so that it's the same size as the ptrs */ +#if defined(mingw32_HOST_OS) + StgAsyncIOResult *async_result; #endif StgWord target; } StgTSOBlockInfo; @@ -125,21 +124,20 @@ typedef union { typedef struct StgTSO_ { StgHeader header; - struct StgTSO_* link; // Links threads onto blocking queues */ - StgMutClosure * mut_link; // TSO's are mutable of course! */ - struct StgTSO_* global_link; // Links all threads together */ + struct StgTSO_* link; /* Links threads onto blocking queues */ + struct StgTSO_* global_link; /* Links all threads together */ - StgWord16 what_next; // Values defined in Constants.h - StgWord16 why_blocked; // Values defined in Constants.h + StgWord16 what_next; /* Values defined in Constants.h */ + StgWord16 why_blocked; /* Values defined in Constants.h */ StgTSOBlockInfo block_info; struct StgTSO_* blocked_exceptions; StgThreadID id; int saved_errno; - struct StgMainThread_* main; - struct StgTRecHeader_ *trec; // STM transaction record + struct Task_* bound; // non-NULL for a bound thread + struct StgTRecHeader_ *trec; /* STM transaction record */ #ifdef TICKY_TICKY - // TICKY-specific stuff would go here. + /* TICKY-specific stuff would go here. */ #endif #ifdef PROFILING StgTSOProfInfo prof; @@ -242,7 +240,11 @@ extern StgTSO dummy_tso; /* this is the NIL ptr for a TSO queue (e.g. runnable queue) */ +#if IN_STG_CODE +#define END_TSO_QUEUE (stg_END_TSO_QUEUE_closure) +#else #define END_TSO_QUEUE ((StgTSO *)(void*)&stg_END_TSO_QUEUE_closure) +#endif #if defined(PAR) || defined(GRAN) /* this is the NIL ptr for a blocking queue */