Changeset 6a4ef0c
- Timestamp:
- Nov 10, 2022, 12:14:23 PM (2 years ago)
- Branches:
- ADT, ast-experimental, master
- Children:
- a757ba1
- Parents:
- 5ce0659
- Location:
- libcfa/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/bits/defs.hfa
r5ce0659 r6a4ef0c 30 30 #ifdef __cforall 31 31 #define __cfa_anonymous_object(x) inline struct x 32 #define __cfa_dlink1(x) dlink(x) 33 #define __cfa_dlink2(x, name) inline struct name { inline dlink(x); } 32 #define __cfa_dlink(x) struct { inline dlink(x); } 34 33 #else 35 34 #define __cfa_anonymous_object(x) struct x __cfa_anonymous_object 36 #define __cfa_dlink1(x) struct { struct x * next; struct x * back; } 37 #define __cfa_dlink2(x, name) struct { struct x * next; struct x * back; } __dlink ## name 35 #define __cfa_dlink(x) struct { struct x * next; struct x * back; } 38 36 #endif 39 37 -
libcfa/src/concurrency/invoke.h
r5ce0659 r6a4ef0c 197 197 // intrusive link fields, used for locks, monitors and any user defined data structure 198 198 // default link fields for dlist 199 __cfa_dlink 1(thread$) user_link;199 __cfa_dlink(thread$) user_link; 200 200 201 201 // secondary intrusive link fields, used for global cluster list 202 202 // default link fields for dlist 203 __cfa_dlink 2(thread$, cltr_link);203 __cfa_dlink(thread$) cltr_link; 204 204 205 205 // used to store state between clh lock/unlock … … 244 244 } 245 245 246 P9_EMBEDDED(thread$, thread$.cltr_link) 247 P9_EMBEDDED(thread$.cltr_link, dlink(thread$)) 246 static inline tytagref(typeof(((struct thread$ *)0p)->cltr_link), dlink(thread$)) ?`inner( struct thread$ & this ) { 247 typeof(this.cltr_link) & ib = this.cltr_link; 248 dlink(thread$) & b = ib`inner; 249 tytagref(typeof(this.cltr_link), dlink(thread$)) result = { b }; 250 return result; 251 } 252 253 P9_EMBEDDED(typeof(((struct thread$ *)0p)->cltr_link), dlink(thread$)) 248 254 249 255 static inline void ?{}(__monitor_group_t & this) { -
libcfa/src/concurrency/kernel.hfa
r5ce0659 r6a4ef0c 256 256 // List of threads 257 257 __spinlock_t thread_list_lock; 258 dlist(struct thread$, t hread$.cltr_link) threads;258 dlist(struct thread$, typeof(((struct thread$ *)0p)->cltr_link)) threads; 259 259 unsigned int nthreads; 260 260 -
libcfa/src/concurrency/kernel/startup.cfa
r5ce0659 r6a4ef0c 745 745 { 746 746 tytagref( dlink(thread$), dlink(thread$) ) ?`inner( thread$ & this ) = void; 747 with( DLINK_VIA( thread$, t hread$.cltr_link) )747 with( DLINK_VIA( thread$, typeof(((struct thread$ *)0p)->cltr_link) ) ) 748 748 remove( thrd ); 749 749 cltr->nthreads -= 1;
Note: See TracChangeset
for help on using the changeset viewer.