[303c61d] | 1 | //
|
---|
[891790ef] | 2 | // Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo
|
---|
| 3 | //
|
---|
| 4 | // The contents of this file are covered under the licence agreement in the
|
---|
| 5 | // file "LICENCE" distributed with Cforall.
|
---|
[303c61d] | 6 | //
|
---|
| 7 | // startup.c --
|
---|
| 8 | //
|
---|
[891790ef] | 9 | // Author : Peter A. Buhr
|
---|
| 10 | // Created On : Tue Jul 24 16:21:57 2018
|
---|
| 11 | // Last Modified By : Peter A. Buhr
|
---|
[e112a24] | 12 | // Last Modified On : Sat Jan 9 23:18:23 2021
|
---|
| 13 | // Update Count : 34
|
---|
[303c61d] | 14 | //
|
---|
[891790ef] | 15 |
|
---|
[e112a24] | 16 | #include <time.h> // tzset
|
---|
| 17 | #include <locale.h> // setlocale
|
---|
| 18 | #include <stdlib.h> // getenv
|
---|
[4834563] | 19 | #include "startup.hfa"
|
---|
[891790ef] | 20 |
|
---|
| 21 | extern "C" {
|
---|
[96f002c1] | 22 | void __cfaabi_appready_startup( void ) __attribute__(( constructor( STARTUP_PRIORITY_APPREADY ) ));
|
---|
| 23 | void __cfaabi_appready_startup( void ) {
|
---|
[6e7de84] | 24 | tzset(); // initialize time global variables
|
---|
[e112a24] | 25 | setlocale( LC_NUMERIC, getenv("LANG") );
|
---|
[891790ef] | 26 | #ifdef __CFA_DEBUG__
|
---|
| 27 | extern void heapAppStart();
|
---|
| 28 | heapAppStart();
|
---|
| 29 | #endif // __CFA_DEBUG__
|
---|
[96f002c1] | 30 | } // __cfaabi_appready_startup
|
---|
[891790ef] | 31 |
|
---|
[96f002c1] | 32 | void __cfaabi_appready_shutdown( void ) __attribute__(( destructor( STARTUP_PRIORITY_APPREADY ) ));
|
---|
| 33 | void __cfaabi_appready_shutdown( void ) {
|
---|
[891790ef] | 34 | #ifdef __CFA_DEBUG__
|
---|
| 35 | extern void heapAppStop();
|
---|
| 36 | heapAppStop();
|
---|
| 37 | #endif // __CFA_DEBUG__
|
---|
[96f002c1] | 38 | } // __cfaabi_appready_shutdown
|
---|
[891790ef] | 39 |
|
---|
[96f002c1] | 40 | void disable_interrupts() __attribute__(( weak )) {}
|
---|
| 41 | void enable_interrupts() __attribute__(( weak )) {}
|
---|
| 42 |
|
---|
| 43 |
|
---|
| 44 | extern void __cfaabi_interpose_startup( void );
|
---|
| 45 | extern void __cfaabi_device_startup ( void );
|
---|
| 46 | extern void __cfaabi_device_shutdown ( void );
|
---|
| 47 |
|
---|
| 48 | void __cfaabi_core_startup( void ) __attribute__(( constructor( STARTUP_PRIORITY_CORE ) ));
|
---|
| 49 | void __cfaabi_core_startup( void ) {
|
---|
| 50 | __cfaabi_interpose_startup();
|
---|
| 51 | __cfaabi_device_startup();
|
---|
| 52 | } // __cfaabi_core_startup
|
---|
| 53 |
|
---|
| 54 | void __cfaabi_core_shutdown( void ) __attribute__(( destructor( STARTUP_PRIORITY_CORE ) ));
|
---|
| 55 | void __cfaabi_core_shutdown( void ) {
|
---|
| 56 | __cfaabi_device_shutdown();
|
---|
| 57 | } // __cfaabi_core_shutdown
|
---|
[891790ef] | 58 | } // extern "C"
|
---|
| 59 |
|
---|
[36463e2] | 60 | struct __spinlock_t;
|
---|
[1997b4e] | 61 | extern "C" {
|
---|
[ae66348] | 62 | void __cfaabi_dbg_record_lock(struct __spinlock_t & this, const char prev_name[]) __attribute__(( weak )) {}
|
---|
[1997b4e] | 63 | }
|
---|
[303c61d] | 64 |
|
---|
[891790ef] | 65 | // Local Variables: //
|
---|
| 66 | // mode: c //
|
---|
| 67 | // tab-width: 4 //
|
---|
| 68 | // End: //
|
---|