Changeset 8ad6533


Ignore:
Timestamp:
Apr 9, 2018, 2:21:27 PM (4 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
aaron-thesis, arm-eh, cleanup-dtors, deferred_resn, demangler, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, with_gc
Children:
0f56058, ca37445
Parents:
35f730f
Message:

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

Location:
src
Files:
1 deleted
19 edited

Legend:

Unmodified
Added
Removed
  • src/benchmark/bench.h

    r35f730f r8ad6533  
    1010#if defined(__cforall)
    1111}
    12 #include <bits/cfatime.h>
     12//#include <bits/cfatime.h>
    1313#endif
    1414
  • 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
  • src/tests/concurrent/examples/datingService.c

    r35f730f r8ad6533  
    88// Created On       : Mon Oct 30 12:56:20 2017
    99// Last Modified By : Peter A. Buhr
    10 // Last Modified On : Tue Jan  2 12:19:01 2018
    11 // Update Count     : 22
     10// Last Modified On : Wed Mar 14 22:48:40 2018
     11// Update Count     : 23
    1212//
    1313
     
    8888int main() {
    8989        DatingService TheExchange;
    90         Girl *girls[NoOfPairs];
    91         Boy  *boys[NoOfPairs];
     90        Girl * girls[NoOfPairs];
     91        Boy  * boys[NoOfPairs];
    9292
    9393        srandom( /*getpid()*/ 103 );
  • src/tests/concurrent/preempt.c

    r35f730f r8ad6533  
    33
    44#ifndef PREEMPTION_RATE
    5 #define PREEMPTION_RATE 10_000ul
     5#define PREEMPTION_RATE 10`ms
    66#endif
    77
    8 unsigned int default_preemption() {
     8Duration default_preemption() {
    99        return PREEMPTION_RATE;
    1010}
  • src/tests/concurrent/signal/barge.c

    r35f730f r8ad6533  
    1616
    1717#ifndef PREEMPTION_RATE
    18 #define PREEMPTION_RATE 10_000ul
     18#define PREEMPTION_RATE 10`ms
    1919#endif
    2020
    21 unsigned int default_preemption() {
     21Duration default_preemption() {
    2222        return 0;
    2323}
  • src/tests/concurrent/signal/block.c

    r35f730f r8ad6533  
    2222
    2323#ifndef PREEMPTION_RATE
    24 #define PREEMPTION_RATE 10_000ul
     24#define PREEMPTION_RATE 10`ms
    2525#endif
    2626
    27 unsigned int default_preemption() {
     27Duration default_preemption() {
    2828        return PREEMPTION_RATE;
    2929}
  • src/tests/concurrent/signal/disjoint.c

    r35f730f r8ad6533  
    1313
    1414#ifndef PREEMPTION_RATE
    15 #define PREEMPTION_RATE 10_000ul
     15#define PREEMPTION_RATE 10`ms
    1616#endif
    1717
    18 unsigned int default_preemption() {
     18Duration default_preemption() {
    1919        return PREEMPTION_RATE;
    2020}
  • src/tests/concurrent/signal/wait.c

    r35f730f r8ad6533  
    2020
    2121#ifndef PREEMPTION_RATE
    22 #define PREEMPTION_RATE 10_000ul
     22#define PREEMPTION_RATE 10`ms
    2323#endif
    2424
    25 unsigned int default_preemption() {
     25Duration default_preemption() {
    2626        return PREEMPTION_RATE;
    2727}
  • src/tests/concurrent/waitfor/simple.c

    r35f730f r8ad6533  
    1010
    1111#ifndef PREEMPTION_RATE
    12 #define PREEMPTION_RATE 10_000ul
     12#define PREEMPTION_RATE 10`ms
    1313#endif
    1414
    15 unsigned int default_preemption() {
     15Duration default_preemption() {
    1616        return PREEMPTION_RATE;
    1717}
  • src/tests/preempt_longrun/create.c

    r35f730f r8ad6533  
    55
    66#ifndef PREEMPTION_RATE
    7 #define PREEMPTION_RATE 10_000ul
     7#define PREEMPTION_RATE 10`ms
    88#endif
    99
    10 unsigned int default_preemption() {
     10Duration default_preemption() {
    1111        return PREEMPTION_RATE;
    1212}
  • src/tests/preempt_longrun/enter.c

    r35f730f r8ad6533  
    66
    77#ifndef PREEMPTION_RATE
    8 #define PREEMPTION_RATE 10_000ul
     8#define PREEMPTION_RATE 10`ms
    99#endif
    1010
    11 unsigned int default_preemption() {
     11Duration default_preemption() {
    1212        return PREEMPTION_RATE;
    1313}
  • src/tests/preempt_longrun/enter3.c

    r35f730f r8ad6533  
    66
    77#ifndef PREEMPTION_RATE
    8 #define PREEMPTION_RATE 10_000ul
     8#define PREEMPTION_RATE 10`ms
    99#endif
    1010
    11 unsigned int default_preemption() {
     11Duration default_preemption() {
    1212        return PREEMPTION_RATE;
    1313}
  • src/tests/preempt_longrun/processor.c

    r35f730f r8ad6533  
    55
    66#ifndef PREEMPTION_RATE
    7 #define PREEMPTION_RATE 10_000ul
     7#define PREEMPTION_RATE 10`ms
    88#endif
    99
    10 unsigned int default_preemption() {
     10Duration default_preemption() {
    1111        return PREEMPTION_RATE;
    1212}
  • src/tests/preempt_longrun/stack.c

    r35f730f r8ad6533  
    55
    66#ifndef PREEMPTION_RATE
    7 #define PREEMPTION_RATE 10_000ul
     7#define PREEMPTION_RATE 10`ms
    88#endif
    99
    10 unsigned int default_preemption() {
     10Duration default_preemption() {
    1111        return PREEMPTION_RATE;
    1212}
  • src/tests/preempt_longrun/yield.c

    r35f730f r8ad6533  
    99
    1010#ifndef PREEMPTION_RATE
    11 #define PREEMPTION_RATE 10_000ul
     11#define PREEMPTION_RATE 10`ms
    1212#endif
    1313
    14 unsigned int default_preemption() {
     14Duration default_preemption() {
    1515        return PREEMPTION_RATE;
    1616}
Note: See TracChangeset for help on using the changeset viewer.