#include #include #include #if PLATFORM_OS_IRIX #define signal(a,b) bsd_signal(a,b) #endif typedef void (*upcri_sighandlerfn_t)(int); #define MEGABYTE (1024*1024LU) // TODO-EX: initializers? gex_Client_t upcri_client; gex_EP_t upcri_ep; gex_TM_t upcri_tm; gex_Segment_t upcri_segment; // Vector of gex_RankInfo_t enumerating local Host membership static gex_Rank_t upcri_my_host_size; static gex_RankInfo_t *upcri_my_host; #if UPCRI_USING_PSHM // Vector of gex_RankInfo_t enumerating local Nbrhd membership static gex_Rank_t upcri_my_nbrhd_size; static gex_RankInfo_t *upcri_my_nbrhd; #endif /* for debugging support */ volatile int bupc_frozen = 1; static const char * upcri_main_name = NULL; GASNETT_THREADKEY_DEFINE(upcri_AMhandlercontext_key); struct upcri_spawn_arg { int argc; char **argv; int mythread; #if UPCRI_UPC_PTHREADS int mypthread; #endif uintptr_t static_data_size; uintptr_t default_cache_size; struct upcr_startup_spawnfuncs *spawnfuncs; }; /* TODO: move to caching implementation file when there is one: * right now these are placeholders */ uintptr_t upcri_cache_size = 0; void upcri_init_cache(void *start, uintptr_t len) { return; } extern void upcri_init_extern(void); #if 0 && UPCR_EXTEND_PRINTF /* * Functions to extend printf, etc., to recognize %S and %P