Ignore:
Timestamp:
May 12, 2021, 4:30:27 PM (4 years ago)
Author:
Michael Brooks <mlbrooks@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
e2f601f
Parents:
67b421c
Message:

Replacing "Mike's old linked list" with "Mike's new linked list," including replatforming uses of the old one.

libcfa/src/containers/list.hfa ---[becomes]--> tests/zombies/linked-list-perf/mike-old.hfa
libcfa/src/containers/list2.hfa ---[becomes]--> libcfa/src/containers/list.hfa

There are no more multiple versions of "Mike's list" in libcfa, nor tests thereof.

The libcfa concurrency uses (alarm, kernel and ready_queue) are hereby ported to "Mike's new."

A best-effort port of executor, which was found not compiling with errors that seem unrelated to the linked list, is attempted too.

Location:
libcfa/src/concurrency
Files:
4 edited

Legend:

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

    r67b421c r69914cbc  
    4949        Duration period;                        // if > 0 => period of alarm
    5050
    51         DLISTED_MGD_IMPL_IN(alarm_node_t)
     51        inline dlink(alarm_node_t);
    5252
    5353        union {
     
    6060        enum alarm_type type;           // true if this is not a user defined alarm
    6161};
    62 DLISTED_MGD_IMPL_OUT(alarm_node_t)
     62P9_EMBEDDED( alarm_node_t, dlink(alarm_node_t) )
    6363
    6464void ?{}( alarm_node_t & this, $thread * thrd, Time alarm, Duration period );
     
    6767void ^?{}( alarm_node_t & this );
    6868
    69 typedef dlist(alarm_node_t, alarm_node_t) alarm_list_t;
     69typedef dlist(alarm_node_t) alarm_list_t;
    7070
    7171void insert( alarm_list_t * this, alarm_node_t * n );
  • libcfa/src/concurrency/kernel.cfa

    r67b421c r69914cbc  
    908908        }
    909909
    910         static void crawl_list( cluster * cltr, dlist(processor, processor) & list, unsigned count ) {
     910        static void crawl_list( cluster * cltr, dlist(processor) & list, unsigned count ) {
    911911                /* paranoid */ verify( cltr->stats );
    912912
  • libcfa/src/concurrency/kernel.hfa

    r67b421c r69914cbc  
    107107
    108108        // Link lists fields
    109         DLISTED_MGD_IMPL_IN(processor)
     109        inline dlink(processor);
    110110
    111111        // special init fields
     
    129129#endif
    130130};
     131P9_EMBEDDED( processor, dlink(processor) )
    131132
    132133void  ?{}(processor & this, const char name[], struct cluster & cltr);
     
    136137static inline void  ?{}(processor & this, struct cluster & cltr) { this{ "Anonymous Processor", cltr}; }
    137138static inline void  ?{}(processor & this, const char name[])     { this{name, *mainCluster}; }
    138 
    139 DLISTED_MGD_IMPL_OUT(processor)
    140139
    141140//-----------------------------------------------------------------------------
     
    186185
    187186        // List of idle processors
    188         dlist(processor, processor) idles;
     187        dlist(processor) idles;
    189188
    190189        // List of active processors
    191         dlist(processor, processor) actives;
     190        dlist(processor) actives;
    192191};
    193192
  • libcfa/src/concurrency/ready_queue.cfa

    r67b421c r69914cbc  
    554554}
    555555
    556 static void assign_list(unsigned & value, dlist(processor, processor) & list, unsigned count) {
     556static void assign_list(unsigned & value, dlist(processor) & list, unsigned count) {
    557557        processor * it = &list`first;
    558558        for(unsigned i = 0; i < count; i++) {
Note: See TracChangeset for help on using the changeset viewer.