Changeset 8ad6533 for src/libcfa


Ignore:
Timestamp:
Apr 9, 2018, 2:21:27 PM (7 years ago)
Author:
Peter A. Buhr <pabuhr@…>
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, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, with_gc
Children:
0f56058, ca37445
Parents:
35f730f
Message:

remove cfatime.h, move itimerval constructor to "time", update concurrent examples to use Duration

Location:
src/libcfa
Files:
1 deleted
5 edited

Legend:

Unmodified
Added
Removed
  • src/libcfa/Makefile.am

    r35f730f r8ad6533  
    1111## Created On       : Sun May 31 08:54:01 2015
    1212## Last Modified By : Peter A. Buhr
    13 ## Last Modified On : Tue Mar 27 14:27:05 2018
    14 ## Update Count     : 225
     13## Last Modified On : Sun Apr  8 23:49:34 2018
     14## Update Count     : 227
    1515###############################################################################
    1616
     
    101101        gmp                             \
    102102        bits/align.h            \
    103         bits/cfatime.h          \
    104103        bits/containers.h               \
    105104        bits/defs.h             \
  • src/libcfa/Makefile.in

    r35f730f r8ad6533  
    265265        concurrency/thread concurrency/kernel concurrency/monitor \
    266266        ${shell find stdhdr -type f -printf "%p "} math gmp \
    267         bits/align.h bits/cfatime.h bits/containers.h bits/defs.h \
    268         bits/debug.h bits/locks.h concurrency/invoke.h
     267        bits/align.h bits/containers.h bits/defs.h bits/debug.h \
     268        bits/locks.h concurrency/invoke.h
    269269HEADERS = $(nobase_cfa_include_HEADERS)
    270270am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
     
    438438        gmp                             \
    439439        bits/align.h            \
    440         bits/cfatime.h          \
    441440        bits/containers.h               \
    442441        bits/defs.h             \
  • src/libcfa/concurrency/alarm.c

    r35f730f r8ad6533  
    1010// Created On       : Fri Jun 2 11:31:25 2017
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Apr  4 16:47:29 2018
    13 // Update Count     : 49
     12// Last Modified On : Mon Apr  9 13:36:18 2018
     13// Update Count     : 61
    1414//
    1515
     
    2525#include "kernel_private.h"
    2626#include "preemption.h"
    27 
    28 
    29 static inline void ?{}( itimerval & this, Duration alarm ) with( this ) {
    30         // itimerval.it_value is a duration but uses time data-structure timeval.
    31         it_value{ alarm`s, alarm`us };                                          // seconds, microseconds
    32         it_interval{ 0 };                                                                       // 0 seconds, 0 microseconds
    33 }
    3427
    3528//=============================================================================================
  • src/libcfa/concurrency/preemption.c

    r35f730f r8ad6533  
    1010// Created On       : Mon Jun 5 14:20:42 2017
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Fri Mar 30 17:27:43 2018
    13 // Update Count     : 31
     12// Last Modified On : Mon Apr  9 13:52:39 2018
     13// Update Count     : 36
    1414//
    1515
     
    2323}
    2424
    25 #include "bits/cfatime.h"
    2625#include "bits/signal.h"
    2726
     
    126125                register_self( alarm );
    127126        }
    128         // Zero duraction but alarm is set
     127        // Zero duration but alarm is set
    129128        else if ( duration == 0 && alarm->set ) {
    130129                unregister_self( alarm );
  • src/libcfa/time

    r35f730f r8ad6533  
    1010// Created On       : Wed Mar 14 23:18:57 2018
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Fri Apr  6 11:15:49 2018
    13 // Update Count     : 610
     12// Last Modified On : Mon Apr  9 13:10:23 2018
     13// Update Count     : 616
    1414//
    1515
     
    128128
    129129
     130//######################### C itimerval #########################
     131
     132static inline void ?{}( itimerval & itv, Duration alarm ) with( itv ) {
     133        // itimerval contains durations but but uses time data-structure timeval.
     134        it_value{ alarm`s, (alarm % 1`s)`us };                          // seconds, microseconds
     135        it_interval{ 0 };                                                                       // 0 seconds, 0 microseconds
     136} // itimerval
     137
     138static inline void ?{}( itimerval & itv, Duration alarm, Duration interval ) with( itv ) {
     139        // itimerval contains durations but but uses time data-structure timeval.
     140        it_value{ alarm`s, (alarm % 1`s)`us };                          // seconds, microseconds
     141        it_interval{ interval`s, interval`us };                         // seconds, microseconds
     142} // itimerval
     143
     144
    130145//######################### C time #########################
    131146
     
    142157struct Time {                                                                                   // private
    143158        uint64_t tv;                                                                            // nanoseconds since UNIX epoch
    144 };
     159}; // Time
    145160
    146161static inline void ?{}( Time & t ) with( t ) { tv = 0; } // fast
Note: See TracChangeset for help on using the changeset viewer.