Ignore:
Timestamp:
Mar 12, 2021, 4:30:39 PM (23 months ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
arm-eh, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
df65c0c
Parents:
b1d83ba
Message:

Implemented part of the same C api for threads as libfibre.

File:
1 edited

Legend:

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

    rb1d83ba ra1538cd  
    107107        DLISTED_MGD_IMPL_IN(processor)
    108108
     109        // special init fields
     110        // This is needed for memcached integration
     111        // once memcached experiments are done this should probably be removed
     112        // it is not a particularly safe scheme as it can make processors less homogeneous
     113        struct {
     114                void (*fnc) (void *);
     115                void * arg;
     116        } init;
     117
    109118        #if !defined(__CFA_NO_STATISTICS__)
    110119                int print_stats;
     
    118127};
    119128
    120 void  ?{}(processor & this, const char name[], struct cluster & cltr);
     129void  ?{}(processor & this, const char name[], struct cluster & cltr, void (*init) (void *), void * arg);
    121130void ^?{}(processor & this);
    122131
    123 static inline void  ?{}(processor & this)                    { this{ "Anonymous Processor", *mainCluster}; }
    124 static inline void  ?{}(processor & this, struct cluster & cltr)    { this{ "Anonymous Processor", cltr}; }
    125 static inline void  ?{}(processor & this, const char name[]) { this{name, *mainCluster }; }
     132static inline void  ?{}(processor & this)                        { this{ "Anonymous Processor", *mainCluster, 0p, 0p}; }
     133static inline void  ?{}(processor & this, struct cluster & cltr) { this{ "Anonymous Processor", cltr, 0p, 0p}; }
     134static inline void  ?{}(processor & this, const char name[])     { this{name, *mainCluster, 0p, 0p }; }
    126135
    127136DLISTED_MGD_IMPL_OUT(processor)
Note: See TracChangeset for help on using the changeset viewer.