- Timestamp:
- Aug 6, 2018, 2:50:03 PM (6 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, no_list, persistent-indexer, pthread-emulation, qualifiedEnum
- Children:
- 58b6d1b
- Parents:
- ff593a3
- Location:
- libcfa/src
- Files:
-
- 16 edited
- 31 moved
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/Makefile.am
rff593a3 r73abe95 33 33 CFACC = @CFACC@ 34 34 35 headers = fstream iostream iterator limits rational time stdlib common \ 36 containers/maybe containers/pair containers/result containers/vector 35 #---------------------------------------------------------------------------------------------------------------- 36 headers = fstream.hfa iostream.hfa iterator.hfa limits.hfa rational.hfa time.hfa stdlib.hfa common.hfa \ 37 containers/maybe.hfa containers/pair.hfa containers/result.hfa containers/vector.hfa 37 38 38 39 # not all platforms support concurrency, add option do disable it 39 headers += concurrency/coroutine concurrency/thread concurrency/kernel concurrency/monitor concurrency/mutex40 headers += concurrency/coroutine.hfa concurrency/thread.hfa concurrency/kernel.hfa concurrency/monitor.hfa concurrency/mutex.hfa 40 41 41 libobjs = ${headers: =.o}42 libobjs = ${headers:.hfa=.o} 42 43 libsrc = prelude.c startup.cfa interpose.cfa bits/debug.cfa assert.cfa exception.c virtual.c heap.cfa \ 43 ${headers: =.cfa}44 ${headers:.hfa=.cfa} 44 45 45 46 # not all platforms support concurrency, add option do disable it 46 47 libsrc += concurrency/CtxSwitch-@ARCHITECTURE@.S concurrency/alarm.cfa concurrency/invoke.c concurrency/preemption.cfa 47 48 48 # extensionless header files are overridden by -o flag in default makerule => explicitly override default rule to silently do nothing 49 # SKULLDUGGERY in order to make sure this isn't called make the rule always fail but also create a rule for headers 50 % : %.c 51 echo "Dummy rule, should never be called" 52 false 53 54 # This rule should always match headers and since it has no prerequisite it will never be called 55 $(addprefix $(srcdir)/,$(headers)): 56 echo "Dummy rule, should never be called" 57 false 58 59 60 ${libobjs} : ${cfalib_DATA} # add dependency to cfa-cpp so all libraries are rebuilt with new translator 49 #---------------------------------------------------------------------------------------------------------------- 50 # add dependency to cfa-cpp so all libraries are rebuilt with new translator 51 ${libobjs} : ${cfalib_DATA} 61 52 62 53 libcfa_a_SOURCES = ${libsrc} … … 65 56 66 57 cfa_includedir = $(CFA_INCDIR) 67 nobase_cfa_include_HEADERS = 68 ${headers} 69 ${stdhdr} 70 math 71 gmp 72 time_t.h 73 bits/align.h 74 bits/containers.h 75 bits/defs.h 76 bits/debug.h 77 bits/locks.h 78 concurrency/invoke.h 58 nobase_cfa_include_HEADERS = \ 59 ${headers} \ 60 ${stdhdr} \ 61 math.hfa \ 62 gmp.hfa \ 63 time_t.hfa \ 64 bits/align.hfa \ 65 bits/containers.hfa \ 66 bits/defs.hfa \ 67 bits/debug.hfa \ 68 bits/locks.hfa \ 69 concurrency/invoke.hfa 79 70 80 CLEANFILES = prelude.c71 MOSTLYCLEANFILES = prelude.c 81 72 73 #---------------------------------------------------------------------------------------------------------------- 82 74 maintainer-clean-local: 83 75 -rm -rf ${CFA_INCDIR} ${CFA_LIBDIR} -
libcfa/src/assert.cfa
rff593a3 r73abe95 17 17 #include <stdarg.h> // varargs 18 18 #include <stdio.h> // fprintf 19 #include "bits/debug.h "19 #include "bits/debug.hfa" 20 20 21 21 extern "C" { -
libcfa/src/bits/algorithm.hfa
rff593a3 r73abe95 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // bits/algorithms.h -- Builtins for exception handling.7 // bits/algorithms.hfa -- Builtins for exception handling. 8 8 // 9 9 // Author : Thierry Delisle -
libcfa/src/bits/align.hfa
rff593a3 r73abe95 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // align.h --7 // align.hfa -- 8 8 // 9 9 // Author : Thierry Delisle -
libcfa/src/bits/containers.hfa
rff593a3 r73abe95 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // bits/containers.h -- Intrusive generic containers.h7 // bits/containers.hfa -- Intrusive generic containers.hfa 8 8 // 9 9 // Author : Thierry Delisle … … 15 15 #pragma once 16 16 17 #include "bits/align.h "18 #include "bits/defs.h "17 #include "bits/align.hfa" 18 #include "bits/defs.hfa" 19 19 20 20 //----------------------------------------------------------------------------- -
libcfa/src/bits/debug.hfa
rff593a3 r73abe95 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // debug.h --7 // debug.hfa -- 8 8 // 9 9 // Author : Thierry Delisle -
libcfa/src/bits/defs.hfa
rff593a3 r73abe95 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // defs.h --7 // defs.hfa -- 8 8 // 9 9 // Author : Thierry Delisle -
libcfa/src/bits/locks.hfa
rff593a3 r73abe95 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // bits/locks.h -- Fast internal locks.7 // bits/locks.hfa -- Fast internal locks. 8 8 // 9 9 // Author : Thierry Delisle … … 16 16 #pragma once 17 17 18 #include "bits/debug.h "19 #include "bits/defs.h "18 #include "bits/debug.hfa" 19 #include "bits/defs.hfa" 20 20 #include <assert.h> 21 21 -
libcfa/src/bits/signal.hfa
rff593a3 r73abe95 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // bits/signal.h -- Helper functions and defines to use signals7 // bits/signal.hfa -- Helper functions and defines to use signals 8 8 // 9 9 // Author : Thierry Delisle … … 16 16 #pragma once 17 17 18 #include "bits/debug.h "19 #include "bits/defs.h "18 #include "bits/debug.hfa" 19 #include "bits/defs.hfa" 20 20 21 21 extern "C" { 22 22 #include <errno.h> 23 23 #define __USE_GNU 24 #include <signal.h >24 #include <signal.hfa> 25 25 #undef __USE_GNU 26 26 #include <stdlib.h> -
libcfa/src/clock.hfa
rff593a3 r73abe95 1 // 1 // 2 2 // Cforall Version 1.0.0 Copyright (C) 2018 University of Waterloo 3 3 // 4 4 // The contents of this file are covered under the licence agreement in the 5 5 // file "LICENCE" distributed with Cforall. 6 // 7 // clock -- 8 // 6 // 7 // clock -- 8 // 9 9 // Author : Peter A. Buhr 10 10 // Created On : Thu Apr 12 14:36:06 2018 … … 12 12 // Last Modified On : Mon Jul 2 21:40:01 2018 13 13 // Update Count : 7 14 // 14 // 15 15 16 #include <time >16 #include <time.hfa> 17 17 18 18 -
libcfa/src/concurrency/alarm.cfa
rff593a3 r73abe95 22 22 } 23 23 24 #include "alarm.h "25 #include "kernel_private.h "26 #include "preemption.h "24 #include "alarm.hfa" 25 #include "kernel_private.hfa" 26 #include "preemption.hfa" 27 27 28 28 //============================================================================================= -
libcfa/src/concurrency/alarm.hfa
rff593a3 r73abe95 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // alarm.h --7 // alarm.hfa -- 8 8 // 9 9 // Author : Thierry Delisle -
libcfa/src/concurrency/coroutine.cfa
rff593a3 r73abe95 25 25 } 26 26 27 #include "kernel_private.h "27 #include "kernel_private.hfa" 28 28 29 29 #define __CFA_INVOKE_PRIVATE__ -
libcfa/src/concurrency/invoke.h
rff593a3 r73abe95 14 14 // 15 15 16 #include "bits/containers.h "17 #include "bits/defs.h "18 #include "bits/locks.h "16 #include "bits/containers.hfa" 17 #include "bits/defs.hfa" 18 #include "bits/locks.hfa" 19 19 20 20 #ifdef __cforall -
libcfa/src/concurrency/kernel.cfa
rff593a3 r73abe95 22 22 #include <fenv.h> 23 23 #include <sys/resource.h> 24 #include <signal.h >24 #include <signal.hfa> 25 25 #include <unistd.h> 26 26 } … … 28 28 //CFA Includes 29 29 #include "time" 30 #include "kernel_private.h "31 #include "preemption.h "32 #include "startup.h "30 #include "kernel_private.hfa" 31 #include "preemption.hfa" 32 #include "startup.hfa" 33 33 34 34 //Private includes -
libcfa/src/concurrency/kernel.hfa
rff593a3 r73abe95 19 19 20 20 #include "invoke.h" 21 #include "time_t.h "21 #include "time_t.hfa" 22 22 23 23 extern "C" { -
libcfa/src/concurrency/kernel_private.hfa
rff593a3 r73abe95 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // kernel_private.h --7 // kernel_private.hfa -- 8 8 // 9 9 // Author : Thierry Delisle … … 19 19 #include "thread" 20 20 21 #include "alarm.h "21 #include "alarm.hfa" 22 22 23 23 -
libcfa/src/concurrency/monitor.cfa
rff593a3 r73abe95 16 16 #include "monitor" 17 17 18 #include <stdlib >18 #include <stdlib.hfa> 19 19 #include <inttypes.h> 20 20 21 #include "kernel_private.h "22 23 #include "bits/algorithms.h "21 #include "kernel_private.hfa" 22 23 #include "bits/algorithms.hfa" 24 24 25 25 //----------------------------------------------------------------------------- -
libcfa/src/concurrency/mutex.cfa
rff593a3 r73abe95 18 18 #include "mutex" 19 19 20 #include "kernel_private.h "20 #include "kernel_private.hfa" 21 21 22 22 //----------------------------------------------------------------------------- -
libcfa/src/concurrency/mutex.hfa
rff593a3 r73abe95 20 20 #include <stdbool.h> 21 21 22 #include "bits/algorithms.h "23 #include "bits/locks.h "22 #include "bits/algorithms.hfa" 23 #include "bits/locks.hfa" 24 24 25 25 #include "invoke.h" 26 #include "time_t.h "26 #include "time_t.hfa" 27 27 28 28 //----------------------------------------------------------------------------- -
libcfa/src/concurrency/preemption.cfa
rff593a3 r73abe95 14 14 // 15 15 16 #include "preemption.h "16 #include "preemption.hfa" 17 17 #include <assert.h> 18 18 … … 24 24 } 25 25 26 #include "bits/signal.h "26 #include "bits/signal.hfa" 27 27 28 28 #if !defined(__CFA_DEFAULT_PREEMPTION__) -
libcfa/src/concurrency/preemption.hfa
rff593a3 r73abe95 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // preemption.h --7 // preemption.hfa -- 8 8 // 9 9 // Author : Thierry Delisle … … 16 16 #pragma once 17 17 18 #include "alarm.h "19 #include "kernel_private.h "18 #include "alarm.hfa" 19 #include "kernel_private.hfa" 20 20 21 21 void kernel_start_preemption(); -
libcfa/src/concurrency/thread.cfa
rff593a3 r73abe95 16 16 #include "thread" 17 17 18 #include "kernel_private.h "18 #include "kernel_private.hfa" 19 19 20 20 #define __CFA_INVOKE_PRIVATE__ -
libcfa/src/containers/vector.cfa
rff593a3 r73abe95 16 16 #include <containers/vector> 17 17 18 #include <stdlib >18 #include <stdlib.hfa> 19 19 20 20 forall(otype T, otype allocator_t | allocator_c(T, allocator_t)) -
libcfa/src/exception.c
rff593a3 r73abe95 23 23 #include <stdio.h> 24 24 #include <unwind.h> 25 #include <bits/debug.h >25 #include <bits/debug.hfa> 26 26 27 27 // FIX ME: temporary hack to keep ARM build working -
libcfa/src/gmp.hfa
rff593a3 r73abe95 19 19 20 20 #include <gmp.h> // GNU multi-precise integers 21 #include <fstream > // sout21 #include <fstream.hfa> // sout 22 22 23 23 struct Int { mpz_t mpz; }; // wrap GMP implementation -
libcfa/src/heap.cfa
rff593a3 r73abe95 1 // 1 // 2 2 // Cforall Version 1.0.0 Copyright (C) 2017 University of Waterloo 3 3 // 4 4 // The contents of this file are covered under the licence agreement in the 5 5 // file "LICENCE" distributed with Cforall. 6 // 7 // heap.c -- 8 // 6 // 7 // heap.c -- 8 // 9 9 // Author : Peter A. Buhr 10 10 // Created On : Tue Dec 19 21:58:35 2017 … … 12 12 // Last Modified On : Tue Jul 31 18:08:50 2018 13 13 // Update Count : 470 14 // 14 // 15 15 16 16 #include <unistd.h> // sbrk, sysconf … … 22 22 } // extern "C" 23 23 24 #include "bits/align.h " // libPow225 #include "bits/defs.h " // likely, unlikely26 #include "bits/locks.h " // __spinlock_t27 #include "startup.h " // STARTUP_PRIORITY_MEMORY24 #include "bits/align.hfa" // libPow2 25 #include "bits/defs.hfa" // likely, unlikely 26 #include "bits/locks.hfa" // __spinlock_t 27 #include "startup.hfa" // STARTUP_PRIORITY_MEMORY 28 28 #include "stdlib" // bsearchl 29 29 #include "malloc.h" … … 283 283 static void ?{}( HeapManager & manager ) with ( manager ) { 284 284 pageSize = sysconf( _SC_PAGESIZE ); 285 285 286 286 for ( unsigned int i = 0; i < NoBucketSizes; i += 1 ) { // initialize the free lists 287 287 freeLists[i].blockSize = bucketSizes[i]; … … 760 760 _Bool mapped __attribute__(( unused )) = headers( "calloc", area, header, freeElem, asize, alignment ); 761 761 #ifndef __CFA_DEBUG__ 762 // Mapped storage is zero filled, but in debug mode mapped memory is scrubbed in doMalloc, so it has to be reset to zero. 762 // Mapped storage is zero filled, but in debug mode mapped memory is scrubbed in doMalloc, so it has to be reset to zero. 763 763 if ( ! mapped ) 764 764 #endif // __CFA_DEBUG__ … … 783 783 _Bool mapped __attribute__(( unused )) = headers( "cmemalign", area, header, freeElem, asize, alignment ); 784 784 #ifndef __CFA_DEBUG__ 785 // Mapped storage is zero filled, but in debug mode mapped memory is scrubbed in doMalloc, so it has to be reset to zero. 785 // Mapped storage is zero filled, but in debug mode mapped memory is scrubbed in doMalloc, so it has to be reset to zero. 786 786 if ( ! mapped ) 787 787 #endif // __CFA_DEBUG__ … … 828 828 _Bool mapped __attribute__(( unused )) = headers( "realloc", area, header, freeElem, asize, alignment ); 829 829 #ifndef __CFA_DEBUG__ 830 // Mapped storage is zero filled, but in debug mode mapped memory is scrubbed in doMalloc, so it has to be reset to zero. 830 // Mapped storage is zero filled, but in debug mode mapped memory is scrubbed in doMalloc, so it has to be reset to zero. 831 831 if ( ! mapped ) 832 832 #endif // __CFA_DEBUG__ -
libcfa/src/interpose.cfa
rff593a3 r73abe95 18 18 #include <unistd.h> // _exit, getpid 19 19 #define __USE_GNU 20 #include <signal.h >20 #include <signal.hfa> 21 21 #undef __USE_GNU 22 22 extern "C" { … … 25 25 } 26 26 27 #include "bits/debug.h "28 #include "bits/defs.h "29 #include "bits/signal.h " // sigHandler_?30 #include "startup.h " // STARTUP_PRIORITY_CORE27 #include "bits/debug.hfa" 28 #include "bits/defs.hfa" 29 #include "bits/signal.hfa" // sigHandler_? 30 #include "startup.hfa" // STARTUP_PRIORITY_CORE 31 31 32 32 //============================================================================================= -
libcfa/src/iostream
rff593a3 r73abe95 164 164 165 165 166 #include <time_t.h > // Duration (constructors) / Time (constructors)166 #include <time_t.hfa> // Duration (constructors) / Time (constructors) 167 167 168 168 forall( dtype ostype | ostream( ostype ) ) ostype & ?|?( ostype & os, Duration dur ); -
libcfa/src/startup.cfa
rff593a3 r73abe95 14 14 // 15 15 16 #include "startup.h "16 #include "startup.hfa" 17 17 #include <unistd.h> 18 18 -
libcfa/src/startup.hfa
rff593a3 r73abe95 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // startup.h --7 // startup.hfa -- 8 8 // 9 9 // Author : Thierry Delisle -
libcfa/src/time.hfa
rff593a3 r73abe95 23 23 #include <sys/time.h> // timeval 24 24 } 25 #include <time_t.h > // Duration/Time types25 #include <time_t.hfa> // Duration/Time types 26 26 27 27 enum { TIMEGRAN = 1_000_000_000LL }; // nanosecond granularity, except for timeval -
libcfa/src/time_t.hfa
rff593a3 r73abe95 1 // 1 // 2 2 // Cforall Version 1.0.0 Copyright (C) 2018 University of Waterloo 3 3 // 4 4 // The contents of this file are covered under the licence agreement in the 5 5 // file "LICENCE" distributed with Cforall. 6 // 7 // time_t.h --8 // 6 // 7 // time_t.hfa -- 8 // 9 9 // Author : Peter A. Buhr 10 10 // Created On : Tue Apr 10 14:42:03 2018 … … 12 12 // Last Modified On : Fri Apr 13 07:51:47 2018 13 13 // Update Count : 6 14 // 14 // 15 15 16 16 #pragma once
Note: See TracChangeset
for help on using the changeset viewer.