Ignore:
Timestamp:
Mar 27, 2018, 5:22:58 PM (6 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:
43725bd
Parents:
af1ed1ad
Message:

second draft of time package and incorporation into runtime kernel

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/libcfa/concurrency/alarm.h

    raf1ed1ad r2a84d06d  
    1010// Created On       : Fri Jun 2 11:31:25 2017
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sat Jul 22 09:59:27 2017
    13 // Update Count     : 3
     12// Last Modified On : Mon Mar 26 16:25:41 2018
     13// Update Count     : 11
    1414//
    1515
     
    2121#include <assert.h>
    2222
    23 #include "bits/cfatime.h"
     23#include "time"
    2424
    2525struct thread_desc;
     
    3030//=============================================================================================
    3131
    32 __cfa_time_t __kernel_get_time();
    33 void __kernel_set_timer( __cfa_time_t alarm );
     32Time __kernel_get_time();
     33void __kernel_set_timer( Duration alarm );
    3434
    3535//=============================================================================================
     
    3838
    3939struct alarm_node_t {
    40         __cfa_time_t alarm;             // time when alarm goes off
    41         __cfa_time_t period;            // if > 0 => period of alarm
     40        Time alarm;                             // time when alarm goes off
     41        Duration period;                        // if > 0 => period of alarm
    4242        alarm_node_t * next;            // intrusive link list field
    4343
     
    5353typedef alarm_node_t ** __alarm_it_t;
    5454
    55 void ?{}( alarm_node_t & this, thread_desc * thrd, __cfa_time_t alarm = 0`cfa_s, __cfa_time_t period = 0`cfa_s );
    56 void ?{}( alarm_node_t & this, processor   * proc, __cfa_time_t alarm = 0`cfa_s, __cfa_time_t period = 0`cfa_s );
     55void ?{}( alarm_node_t & this, thread_desc * thrd, Time alarm, Duration period );
     56void ?{}( alarm_node_t & this, processor   * proc, Time alarm, Duration period );
    5757void ^?{}( alarm_node_t & this );
    5858
Note: See TracChangeset for help on using the changeset viewer.