Changeset 73abe95 for libcfa


Ignore:
Timestamp:
Aug 6, 2018, 2:50:03 PM (4 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
aaron-thesis, arm-eh, 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
Children:
58b6d1b
Parents:
ff593a3
Message:

Replace extension-less headers with .hfa

Location:
libcfa/src
Files:
16 edited
31 moved

Legend:

Unmodified
Added
Removed
  • libcfa/src/Makefile.am

    rff593a3 r73abe95  
    3333CFACC = @CFACC@
    3434
    35 headers = fstream iostream iterator limits rational time stdlib common \
    36           containers/maybe containers/pair containers/result containers/vector
     35#----------------------------------------------------------------------------------------------------------------
     36headers = 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
    3738
    3839# not all platforms support concurrency, add option do disable it
    39 headers += concurrency/coroutine concurrency/thread concurrency/kernel concurrency/monitor concurrency/mutex
     40headers += concurrency/coroutine.hfa concurrency/thread.hfa concurrency/kernel.hfa concurrency/monitor.hfa concurrency/mutex.hfa
    4041
    41 libobjs = ${headers:=.o}
     42libobjs = ${headers:.hfa=.o}
    4243libsrc = prelude.c startup.cfa interpose.cfa bits/debug.cfa assert.cfa exception.c virtual.c heap.cfa \
    43         ${headers:=.cfa}
     44        ${headers:.hfa=.cfa}
    4445
    4546# not all platforms support concurrency, add option do disable it
    4647libsrc += concurrency/CtxSwitch-@ARCHITECTURE@.S concurrency/alarm.cfa concurrency/invoke.c concurrency/preemption.cfa
    4748
    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}
    6152
    6253libcfa_a_SOURCES = ${libsrc}
     
    6556
    6657cfa_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
     58nobase_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
    7970
    80 CLEANFILES = prelude.c
     71MOSTLYCLEANFILES = prelude.c
    8172
     73#----------------------------------------------------------------------------------------------------------------
    8274maintainer-clean-local:
    8375        -rm -rf ${CFA_INCDIR} ${CFA_LIBDIR}
  • libcfa/src/assert.cfa

    rff593a3 r73abe95  
    1717#include <stdarg.h>                                                             // varargs
    1818#include <stdio.h>                                                              // fprintf
    19 #include "bits/debug.h"
     19#include "bits/debug.hfa"
    2020
    2121extern "C" {
  • libcfa/src/bits/algorithm.hfa

    rff593a3 r73abe95  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // bits/algorithms.h -- Builtins for exception handling.
     7// bits/algorithms.hfa -- Builtins for exception handling.
    88//
    99// Author           : Thierry Delisle
  • libcfa/src/bits/align.hfa

    rff593a3 r73abe95  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // align.h --
     7// align.hfa --
    88//
    99// Author           : Thierry Delisle
  • libcfa/src/bits/containers.hfa

    rff593a3 r73abe95  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // bits/containers.h -- Intrusive generic containers.h
     7// bits/containers.hfa -- Intrusive generic containers.hfa
    88//
    99// Author           : Thierry Delisle
     
    1515#pragma once
    1616
    17 #include "bits/align.h"
    18 #include "bits/defs.h"
     17#include "bits/align.hfa"
     18#include "bits/defs.hfa"
    1919
    2020//-----------------------------------------------------------------------------
  • libcfa/src/bits/debug.hfa

    rff593a3 r73abe95  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // debug.h --
     7// debug.hfa --
    88//
    99// Author           : Thierry Delisle
  • libcfa/src/bits/defs.hfa

    rff593a3 r73abe95  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // defs.h --
     7// defs.hfa --
    88//
    99// Author           : Thierry Delisle
  • libcfa/src/bits/locks.hfa

    rff593a3 r73abe95  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // bits/locks.h -- Fast internal locks.
     7// bits/locks.hfa -- Fast internal locks.
    88//
    99// Author           : Thierry Delisle
     
    1616#pragma once
    1717
    18 #include "bits/debug.h"
    19 #include "bits/defs.h"
     18#include "bits/debug.hfa"
     19#include "bits/defs.hfa"
    2020#include <assert.h>
    2121
  • libcfa/src/bits/signal.hfa

    rff593a3 r73abe95  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // bits/signal.h -- Helper functions and defines to use signals
     7// bits/signal.hfa -- Helper functions and defines to use signals
    88//
    99// Author           : Thierry Delisle
     
    1616#pragma once
    1717
    18 #include "bits/debug.h"
    19 #include "bits/defs.h"
     18#include "bits/debug.hfa"
     19#include "bits/defs.hfa"
    2020
    2121extern "C" {
    2222#include <errno.h>
    2323#define __USE_GNU
    24 #include <signal.h>
     24#include <signal.hfa>
    2525#undef __USE_GNU
    2626#include <stdlib.h>
  • libcfa/src/clock.hfa

    rff593a3 r73abe95  
    1 // 
     1//
    22// Cforall Version 1.0.0 Copyright (C) 2018 University of Waterloo
    33//
    44// The contents of this file are covered under the licence agreement in the
    55// file "LICENCE" distributed with Cforall.
    6 // 
    7 // clock -- 
    8 // 
     6//
     7// clock --
     8//
    99// Author           : Peter A. Buhr
    1010// Created On       : Thu Apr 12 14:36:06 2018
     
    1212// Last Modified On : Mon Jul  2 21:40:01 2018
    1313// Update Count     : 7
    14 // 
     14//
    1515
    16 #include <time>
     16#include <time.hfa>
    1717
    1818
  • libcfa/src/concurrency/alarm.cfa

    rff593a3 r73abe95  
    2222}
    2323
    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"
    2727
    2828//=============================================================================================
  • libcfa/src/concurrency/alarm.hfa

    rff593a3 r73abe95  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // alarm.h --
     7// alarm.hfa --
    88//
    99// Author           : Thierry Delisle
  • libcfa/src/concurrency/coroutine.cfa

    rff593a3 r73abe95  
    2525}
    2626
    27 #include "kernel_private.h"
     27#include "kernel_private.hfa"
    2828
    2929#define __CFA_INVOKE_PRIVATE__
  • libcfa/src/concurrency/invoke.h

    rff593a3 r73abe95  
    1414//
    1515
    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"
    1919
    2020#ifdef __cforall
  • libcfa/src/concurrency/kernel.cfa

    rff593a3 r73abe95  
    2222#include <fenv.h>
    2323#include <sys/resource.h>
    24 #include <signal.h>
     24#include <signal.hfa>
    2525#include <unistd.h>
    2626}
     
    2828//CFA Includes
    2929#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"
    3333
    3434//Private includes
  • libcfa/src/concurrency/kernel.hfa

    rff593a3 r73abe95  
    1919
    2020#include "invoke.h"
    21 #include "time_t.h"
     21#include "time_t.hfa"
    2222
    2323extern "C" {
  • libcfa/src/concurrency/kernel_private.hfa

    rff593a3 r73abe95  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // kernel_private.h --
     7// kernel_private.hfa --
    88//
    99// Author           : Thierry Delisle
     
    1919#include "thread"
    2020
    21 #include "alarm.h"
     21#include "alarm.hfa"
    2222
    2323
  • libcfa/src/concurrency/monitor.cfa

    rff593a3 r73abe95  
    1616#include "monitor"
    1717
    18 #include <stdlib>
     18#include <stdlib.hfa>
    1919#include <inttypes.h>
    2020
    21 #include "kernel_private.h"
    22 
    23 #include "bits/algorithms.h"
     21#include "kernel_private.hfa"
     22
     23#include "bits/algorithms.hfa"
    2424
    2525//-----------------------------------------------------------------------------
  • libcfa/src/concurrency/mutex.cfa

    rff593a3 r73abe95  
    1818#include "mutex"
    1919
    20 #include "kernel_private.h"
     20#include "kernel_private.hfa"
    2121
    2222//-----------------------------------------------------------------------------
  • libcfa/src/concurrency/mutex.hfa

    rff593a3 r73abe95  
    2020#include <stdbool.h>
    2121
    22 #include "bits/algorithms.h"
    23 #include "bits/locks.h"
     22#include "bits/algorithms.hfa"
     23#include "bits/locks.hfa"
    2424
    2525#include "invoke.h"
    26 #include "time_t.h"
     26#include "time_t.hfa"
    2727
    2828//-----------------------------------------------------------------------------
  • libcfa/src/concurrency/preemption.cfa

    rff593a3 r73abe95  
    1414//
    1515
    16 #include "preemption.h"
     16#include "preemption.hfa"
    1717#include <assert.h>
    1818
     
    2424}
    2525
    26 #include "bits/signal.h"
     26#include "bits/signal.hfa"
    2727
    2828#if !defined(__CFA_DEFAULT_PREEMPTION__)
  • libcfa/src/concurrency/preemption.hfa

    rff593a3 r73abe95  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // preemption.h --
     7// preemption.hfa --
    88//
    99// Author           : Thierry Delisle
     
    1616#pragma once
    1717
    18 #include "alarm.h"
    19 #include "kernel_private.h"
     18#include "alarm.hfa"
     19#include "kernel_private.hfa"
    2020
    2121void kernel_start_preemption();
  • libcfa/src/concurrency/thread.cfa

    rff593a3 r73abe95  
    1616#include "thread"
    1717
    18 #include "kernel_private.h"
     18#include "kernel_private.hfa"
    1919
    2020#define __CFA_INVOKE_PRIVATE__
  • libcfa/src/containers/vector.cfa

    rff593a3 r73abe95  
    1616#include <containers/vector>
    1717
    18 #include <stdlib>
     18#include <stdlib.hfa>
    1919
    2020forall(otype T, otype allocator_t | allocator_c(T, allocator_t))
  • libcfa/src/exception.c

    rff593a3 r73abe95  
    2323#include <stdio.h>
    2424#include <unwind.h>
    25 #include <bits/debug.h>
     25#include <bits/debug.hfa>
    2626
    2727// FIX ME: temporary hack to keep ARM build working
  • libcfa/src/gmp.hfa

    rff593a3 r73abe95  
    1919
    2020#include <gmp.h>                                                                                // GNU multi-precise integers
    21 #include <fstream>                                                                              // sout
     21#include <fstream.hfa>                                                                          // sout
    2222
    2323struct Int { mpz_t mpz; };                                                              // wrap GMP implementation
  • libcfa/src/heap.cfa

    rff593a3 r73abe95  
    1 // 
     1//
    22// Cforall Version 1.0.0 Copyright (C) 2017 University of Waterloo
    33//
    44// The contents of this file are covered under the licence agreement in the
    55// file "LICENCE" distributed with Cforall.
    6 // 
    7 // heap.c -- 
    8 // 
     6//
     7// heap.c --
     8//
    99// Author           : Peter A. Buhr
    1010// Created On       : Tue Dec 19 21:58:35 2017
     
    1212// Last Modified On : Tue Jul 31 18:08:50 2018
    1313// Update Count     : 470
    14 // 
     14//
    1515
    1616#include <unistd.h>                                                                             // sbrk, sysconf
     
    2222} // extern "C"
    2323
    24 #include "bits/align.h"                                                                 // libPow2
    25 #include "bits/defs.h"                                                                  // likely, unlikely
    26 #include "bits/locks.h"                                                                 // __spinlock_t
    27 #include "startup.h"                                                                    // STARTUP_PRIORITY_MEMORY
     24#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
    2828#include "stdlib"                                                                               // bsearchl
    2929#include "malloc.h"
     
    283283static void ?{}( HeapManager & manager ) with ( manager ) {
    284284    pageSize = sysconf( _SC_PAGESIZE );
    285    
     285
    286286    for ( unsigned int i = 0; i < NoBucketSizes; i += 1 ) { // initialize the free lists
    287287                freeLists[i].blockSize = bucketSizes[i];
     
    760760                _Bool mapped __attribute__(( unused )) = headers( "calloc", area, header, freeElem, asize, alignment );
    761761                #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.
    763763                if ( ! mapped )
    764764                #endif // __CFA_DEBUG__
     
    783783                _Bool mapped __attribute__(( unused )) = headers( "cmemalign", area, header, freeElem, asize, alignment );
    784784                #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.
    786786                if ( ! mapped )
    787787                #endif // __CFA_DEBUG__
     
    828828                        _Bool mapped __attribute__(( unused )) = headers( "realloc", area, header, freeElem, asize, alignment );
    829829                        #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.
    831831                        if ( ! mapped )
    832832                        #endif // __CFA_DEBUG__
  • libcfa/src/interpose.cfa

    rff593a3 r73abe95  
    1818#include <unistd.h>                                                                             // _exit, getpid
    1919#define __USE_GNU
    20 #include <signal.h>
     20#include <signal.hfa>
    2121#undef __USE_GNU
    2222extern "C" {
     
    2525}
    2626
    27 #include "bits/debug.h"
    28 #include "bits/defs.h"
    29 #include "bits/signal.h"                                                                // sigHandler_?
    30 #include "startup.h"                                                                    // STARTUP_PRIORITY_CORE
     27#include "bits/debug.hfa"
     28#include "bits/defs.hfa"
     29#include "bits/signal.hfa"                                                              // sigHandler_?
     30#include "startup.hfa"                                                                  // STARTUP_PRIORITY_CORE
    3131
    3232//=============================================================================================
  • libcfa/src/iostream

    rff593a3 r73abe95  
    164164
    165165
    166 #include <time_t.h>                                                                             // Duration (constructors) / Time (constructors)
     166#include <time_t.hfa>                                                                           // Duration (constructors) / Time (constructors)
    167167
    168168forall( dtype ostype | ostream( ostype ) ) ostype & ?|?( ostype & os, Duration dur );
  • libcfa/src/startup.cfa

    rff593a3 r73abe95  
    1414//
    1515
    16 #include "startup.h"
     16#include "startup.hfa"
    1717#include <unistd.h>
    1818
  • libcfa/src/startup.hfa

    rff593a3 r73abe95  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // startup.h --
     7// startup.hfa --
    88//
    99// Author           : Thierry Delisle
  • libcfa/src/time.hfa

    rff593a3 r73abe95  
    2323#include <sys/time.h>                                                                   // timeval
    2424}
    25 #include <time_t.h>                                                                             // Duration/Time types
     25#include <time_t.hfa>                                                                           // Duration/Time types
    2626
    2727enum { TIMEGRAN = 1_000_000_000LL };                                    // nanosecond granularity, except for timeval
  • libcfa/src/time_t.hfa

    rff593a3 r73abe95  
    1 // 
     1//
    22// Cforall Version 1.0.0 Copyright (C) 2018 University of Waterloo
    33//
    44// The contents of this file are covered under the licence agreement in the
    55// file "LICENCE" distributed with Cforall.
    6 // 
    7 // time_t.h --
    8 // 
     6//
     7// time_t.hfa --
     8//
    99// Author           : Peter A. Buhr
    1010// Created On       : Tue Apr 10 14:42:03 2018
     
    1212// Last Modified On : Fri Apr 13 07:51:47 2018
    1313// Update Count     : 6
    14 // 
     14//
    1515
    1616#pragma once
Note: See TracChangeset for help on using the changeset viewer.