// // Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo // // The contents of this file are covered under the licence agreement in the // file "LICENCE" distributed with Cforall. // // startup.c -- // // Author : Peter A. Buhr // Created On : Tue Jul 24 16:21:57 2018 // Last Modified By : Peter A. Buhr // Last Modified On : Mon Dec 5 11:41:58 2022 // Update Count : 73 // #include // tzset #include // setlocale #include // getenv #include "bits/defs.hfa" // rdtscl #include "bits/random.hfa" // rdtscl #include "startup.hfa" extern size_t __global_random_seed; // sequential/concurrent extern PRNG_STATE_T __global_random_state; // sequential extern "C" { void __cfaabi_memory_startup( void ) __attribute__(( constructor( STARTUP_PRIORITY_MEMORY ) )); void __cfaabi_memory_startup( void ) { extern void memory_startup(); memory_startup(); } // __cfaabi_memory_startup void __cfaabi_memory_shutdown( void ) __attribute__(( destructor( STARTUP_PRIORITY_MEMORY ) )); void __cfaabi_memory_shutdown( void ) { extern void memory_shutdown(); memory_shutdown(); } // __cfaabi_memory_shutdown void __cfaabi_appready_startup( void ) __attribute__(( constructor( STARTUP_PRIORITY_APPREADY ) )); void __cfaabi_appready_startup( void ) { tzset(); // initialize time global variables extern void heapAppStart(); heapAppStart(); } // __cfaabi_appready_startup void __cfaabi_appready_shutdown( void ) __attribute__(( destructor( STARTUP_PRIORITY_APPREADY ) )); void __cfaabi_appready_shutdown( void ) { extern void heapAppStop(); heapAppStop(); } // __cfaabi_appready_shutdown void disable_interrupts() __attribute__(( weak )) libcfa_nopreempt libcfa_public {} void enable_interrupts() __attribute__(( weak )) libcfa_nopreempt libcfa_public {} bool poll_interrupts() __attribute__(( weak )) libcfa_nopreempt libcfa_public { return false; } __attribute__((visibility("hidden"))) extern void * const __start_cfatext_nopreempt; __attribute__((visibility("hidden"))) extern void * const __stop_cfatext_nopreempt; __attribute__((visibility("protected"))) const __cfa_nopreempt_region __libcfa_nopreempt @= { (void * const)&__start_cfatext_nopreempt, (void * const)&__stop_cfatext_nopreempt }; extern void __cfaabi_interpose_startup( void ); extern void __cfaabi_device_startup ( void ); extern void __cfaabi_device_shutdown ( void ); void __cfaabi_core_startup( void ) __attribute__(( constructor( STARTUP_PRIORITY_CORE ) )); void __cfaabi_core_startup( void ) { __global_random_seed = rdtscl(); PRNG_SET_SEED( __global_random_state, __global_random_seed ); __cfaabi_interpose_startup(); __cfaabi_device_startup(); } // __cfaabi_core_startup void __cfaabi_core_shutdown( void ) __attribute__(( destructor( STARTUP_PRIORITY_CORE ) )); void __cfaabi_core_shutdown( void ) { __cfaabi_device_shutdown(); } // __cfaabi_core_shutdown } // extern "C" struct __spinlock_t; // Local Variables: // // mode: c // // tab-width: 4 // // End: //