<commit_before>/* -----------------------------------------------------------------------------
 *
 * (c) The GHC Team 1998-2009
 *
 * External API for the scheduler.  For most uses, the functions in
 * RtsAPI.h should be enough.
 *
 * Do not #include this file directly: #include "Rts.h" instead.
 *
 * To understand the structure of the RTS headers, see the wiki:
 *   http://hackage.haskell.org/trac/ghc/wiki/Commentary/SourceTree/Includes
 *
 * ---------------------------------------------------------------------------*/

#ifndef RTS_THREADS_H
#define RTS_THREADS_H

// 
// Creating threads
//
StgTSO *createThread (Capability *cap, nat stack_size);

void scheduleWaitThread (/* in    */ StgTSO *tso,
                         /* out   */ HaskellObj* ret,
                         /* inout */ Capability **cap);

StgTSO *createGenThread       (Capability *cap, nat stack_size,  
			       StgClosure *closure);
StgTSO *createIOThread        (Capability *cap, nat stack_size,  
			       StgClosure *closure);
StgTSO *createStrictIOThread  (Capability *cap, nat stack_size,  
			       StgClosure *closure);

// Suspending/resuming threads around foreign calls
void *        suspendThread (StgRegTable *, rtsBool interruptible);
StgRegTable * resumeThread  (void *);

//
// Thread operations from Threads.c
//
int    cmp_thread      (StgPtr tso1, StgPtr tso2);
int    rts_getThreadId (StgPtr tso);

#if !defined(mingw32_HOST_OS)<commit_msg>Fix build on Win64<commit_after>/* -----------------------------------------------------------------------------
 *
 * (c) The GHC Team 1998-2009
 *
 * External API for the scheduler.  For most uses, the functions in
 * RtsAPI.h should be enough.
 *
 * Do not #include this file directly: #include "Rts.h" instead.
 *
 * To understand the structure of the RTS headers, see the wiki:
 *   http://hackage.haskell.org/trac/ghc/wiki/Commentary/SourceTree/Includes
 *
 * ---------------------------------------------------------------------------*/

#ifndef RTS_THREADS_H
#define RTS_THREADS_H

#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif

// 
// Creating threads
//
StgTSO *createThread (Capability *cap, nat stack_size);

void scheduleWaitThread (/* in    */ StgTSO *tso,
                         /* out   */ HaskellObj* ret,
                         /* inout */ Capability **cap);

StgTSO *createGenThread       (Capability *cap, nat stack_size,  
			       StgClosure *closure);
StgTSO *createIOThread        (Capability *cap, nat stack_size,  
			       StgClosure *closure);
StgTSO *createStrictIOThread  (Capability *cap, nat stack_size,  
			       StgClosure *closure);

// Suspending/resuming threads around foreign calls
void *        suspendThread (StgRegTable *, rtsBool interruptible);
StgRegTable * resumeThread  (void *);

//
// Thread operations from Threads.c
//
int    cmp_thread      (StgPtr tso1, StgPtr tso2);
int    rts_getThreadId (StgPtr tso);

#if !defined(mingw32_HOST_OS)
{'fraction_non_alphanumeric': 0.19843962008141114, 'fraction_numerical': 0.008819538670284939, 'mean_word_length': 1.9908722109533468, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1839784', 'n_tokens_mistral': 945, 'n_tokens_neox': 881, 'n_words': 243}