Changeset c0d00b6 for src/libcfa/concurrency/invoke.h
- Timestamp:
- Nov 25, 2017, 3:22:18 PM (6 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, cleanup-dtors, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- c6e2c18
- Parents:
- 9d06142 (diff), 3de176d (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/libcfa/concurrency/invoke.h
r9d06142 rc0d00b6 14 14 // 15 15 16 #include <stdbool.h>17 #include <stdint.h>16 #include "bits/defs.h" 17 #include "bits/locks.h" 18 18 19 19 #ifdef __CFORALL__ … … 25 25 #define _INVOKE_H_ 26 26 27 #define unlikely(x) __builtin_expect(!!(x), 0)28 #define thread_local _Thread_local29 30 27 typedef void (*fptr_t)(); 31 28 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 #endif39 };40 29 41 30 struct __thread_queue_t { … … 58 47 void push( struct __condition_stack_t &, struct __condition_criterion_t * ); 59 48 struct __condition_criterion_t * pop( struct __condition_stack_t & ); 60 61 void ?{}(spinlock & this);62 void ^?{}(spinlock & this);63 49 } 64 50 #endif … … 122 108 struct monitor_desc { 123 109 // spinlock to protect internal data 124 struct spinlocklock;110 struct __spinlock_t lock; 125 111 126 112 // current owner of the monitor
Note: See TracChangeset
for help on using the changeset viewer.