Ignore:
File:
1 edited

Legend:

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

    r71c8b7e r92e7631  
    1717
    1818#include <stdbool.h>
    19 #include <stdint.h>
    2019
    2120#include "invoke.h"
     
    3837void  ?{}(semaphore & this, int count = 1);
    3938void ^?{}(semaphore & this);
    40 bool   P (semaphore & this);
     39void   P (semaphore & this);
    4140bool   V (semaphore & this);
    42 bool   V (semaphore & this, unsigned count);
    4341
    4442
     
    113111
    114112//-----------------------------------------------------------------------------
    115 // I/O
    116 struct __io_data;
    117 
    118 #define CFA_CLUSTER_IO_POLLER_USER_THREAD 1 << 0
    119 // #define CFA_CLUSTER_IO_POLLER_KERNEL_SIDE 1 << 1
    120 
    121 //-----------------------------------------------------------------------------
    122113// Cluster
    123114struct cluster {
     
    150141                cluster * prev;
    151142        } node;
    152 
    153         struct __io_data * io;
    154 
    155         #if !defined(__CFA_NO_STATISTICS__)
    156                 bool print_stats;
    157         #endif
    158143};
    159144extern Duration default_preemption();
    160145
    161 void ?{} (cluster & this, const char name[], Duration preemption_rate, int flags);
     146void ?{} (cluster & this, const char name[], Duration preemption_rate);
    162147void ^?{}(cluster & this);
    163148
    164 static inline void ?{} (cluster & this)                                      { this{"Anonymous Cluster", default_preemption(), 0}; }
    165 static inline void ?{} (cluster & this, Duration preemption_rate)            { this{"Anonymous Cluster", preemption_rate, 0}; }
    166 static inline void ?{} (cluster & this, const char name[])                   { this{name, default_preemption(), 0}; }
    167 static inline void ?{} (cluster & this, int flags)                           { this{"Anonymous Cluster", default_preemption(), flags}; }
    168 static inline void ?{} (cluster & this, Duration preemption_rate, int flags) { this{"Anonymous Cluster", preemption_rate, flags}; }
    169 static inline void ?{} (cluster & this, const char name[], int flags)        { this{name, default_preemption(), flags}; }
     149static inline void ?{} (cluster & this)                           { this{"Anonymous Cluster", default_preemption()}; }
     150static inline void ?{} (cluster & this, Duration preemption_rate) { this{"Anonymous Cluster", preemption_rate}; }
     151static inline void ?{} (cluster & this, const char name[])        { this{name, default_preemption()}; }
    170152
    171153static inline [cluster *&, cluster *& ] __get( cluster & this ) __attribute__((const)) { return this.node.[next, prev]; }
     
    174156static inline struct cluster   * active_cluster  () { return TL_GET( this_processor )->cltr; }
    175157
    176 #if !defined(__CFA_NO_STATISTICS__)
    177         static inline void print_stats_at_exit( cluster & this ) {
    178                 this.print_stats = true;
    179         }
    180 #endif
    181 
    182158// Local Variables: //
    183159// mode: c //
Note: See TracChangeset for help on using the changeset viewer.