Ignore:
File:
1 edited

Legend:

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

    rea7d2b0 rc1a9c86  
    1414//
    1515
    16 #include "bits/defs.h"
    17 #include "bits/locks.h"
     16#include <stdbool.h>
     17#include <stdint.h>
    1818
    1919#ifdef __CFORALL__
     
    2525#define _INVOKE_H_
    2626
     27        #define unlikely(x)    __builtin_expect(!!(x), 0)
     28        #define thread_local _Thread_local
     29
    2730        typedef void (*fptr_t)();
    2831        typedef int_fast16_t __lock_size_t;
     32
     33        struct spinlock {
     34                volatile int lock;
     35                #ifdef __CFA_DEBUG__
     36                        const char * prev_name;
     37                        void* prev_thrd;
     38                #endif
     39        };
    2940
    3041        struct __thread_queue_t {
     
    4758                void push( struct __condition_stack_t &, struct __condition_criterion_t * );
    4859                struct __condition_criterion_t * pop( struct __condition_stack_t & );
     60
     61                void  ?{}(spinlock & this);
     62                void ^?{}(spinlock & this);
    4963        }
    5064        #endif
     
    108122        struct monitor_desc {
    109123                // spinlock to protect internal data
    110                 struct __spinlock_t lock;
     124                struct spinlock lock;
    111125
    112126                // current owner of the monitor
Note: See TracChangeset for help on using the changeset viewer.