Changes in src/libcfa/concurrency/thread [d67cdb7:83a071f9]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/libcfa/concurrency/thread
rd67cdb7 r83a071f9 1 // -*- Mode: CFA -*- 1 2 // 2 3 // Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo … … 9 10 // Author : Thierry Delisle 10 11 // Created On : Tue Jan 17 12:27:26 2017 11 // Last Modified By : Peter A. Buhr12 // Last Modified On : Sat Jul 22 09:59:40 201713 // Update Count : 312 // Last Modified By : Thierry Delisle 13 // Last Modified On : -- 14 // Update Count : 0 14 15 // 15 16 16 #pragma once 17 #ifndef THREADS_H 18 #define THREADS_H 17 19 18 #include <assert.h>20 #include "assert" 19 21 #include "invoke.h" 20 22 … … 36 38 forall( dtype T | is_thread(T) ) 37 39 static inline coroutine_desc* get_coroutine(T & this) { 38 return &get_thread(this)-> self_cor;40 return &get_thread(this)->cor; 39 41 } 40 42 41 43 forall( dtype T | is_thread(T) ) 42 44 static inline monitor_desc* get_monitor(T & this) { 43 return &get_thread(this)-> self_mon;45 return &get_thread(this)->mon; 44 46 } 45 47 46 48 static inline coroutine_desc* get_coroutine(thread_desc * this) { 47 return &this-> self_cor;49 return &this->cor; 48 50 } 49 51 50 52 static inline monitor_desc* get_monitor(thread_desc * this) { 51 return &this-> self_mon;53 return &this->mon; 52 54 } 53 55 54 extern thread_local thread_desc * volatilethis_thread;56 extern volatile thread_local thread_desc * this_thread; 55 57 56 58 forall( dtype T | is_thread(T) ) … … 82 84 void yield( unsigned times ); 83 85 86 #endif //THREADS_H 87 84 88 // Local Variables: // 85 89 // mode: c //
Note:
See TracChangeset
for help on using the changeset viewer.