Changes in / [bede27b:a722c7a]
- Location:
- src/libcfa
- Files:
-
- 1 deleted
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
src/libcfa/Makefile.am
rbede27b ra722c7a 10 10 ## Author : Peter A. Buhr 11 11 ## Created On : Sun May 31 08:54:01 2015 12 ## Last Modified By : Peter A. Buhr13 ## Last Modified On : Fri Feb 9 15:51:24 201814 ## Update Count : 22 312 ## Last Modified By : Andrew Beach 13 ## Last Modified On : Wed Jul 26 14:15:00 2017 14 ## Update Count : 221 15 15 ############################################################################### 16 16 … … 92 92 libcfa_d_a_CFLAGS = -debug -O0 #No need for __CFA_DEBUG__ since we pass -debug 93 93 94 stdhdr = ${shell find stdhdr -type f -printf "%p "}94 stdhdr = ${shell echo stdhdr/*} 95 95 96 96 cfa_includedir = $(CFA_INCDIR) -
src/libcfa/concurrency/invoke.c
rbede27b ra722c7a 10 10 // Created On : Tue Jan 17 12:27:26 2016 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Fri Feb 9 16:37:42201813 // Update Count : 512 // Last Modified On : Thu Feb 8 16:18:11 2018 13 // Update Count : 4 14 14 // 15 15 … … 93 93 struct coStack_t* stack = &get_coroutine( this )->stack; 94 94 95 #if defined( __i386 )95 #if defined( __i386__ ) 96 96 97 97 struct FakeStack { … … 114 114 ((struct FakeStack *)(((struct machine_context_t *)stack->context)->SP))->fcw = 0x037F; //Vol. 1 8-7 115 115 116 #elif defined( __x86_64 )116 #elif defined( __x86_64__ ) 117 117 118 118 struct FakeStack { … … 150 150 fs->arg[0] = this; 151 151 fs->arg[1] = invoke; 152 153 152 #else 154 #error uknown hardware architecture153 #error Only __i386__ and __x86_64__ is supported for threads in cfa 155 154 #endif 156 155 } -
src/libcfa/concurrency/invoke.h
rbede27b ra722c7a 10 10 // Created On : Tue Jan 17 12:27:26 2016 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Fri Feb 9 14:41:55201813 // Update Count : 612 // Last Modified On : Tue Jan 23 14:55:46 2018 13 // Update Count : 3 14 14 // 15 15 … … 202 202 void CtxSwitch( void * from, void * to ) asm ("CtxSwitch"); 203 203 204 #if defined( __i386 ) 204 #if defined( __x86_64__ ) 205 #define CtxGet( ctx ) __asm__ ( \ 206 "movq %%rsp,%0\n" \ 207 "movq %%rbp,%1\n" \ 208 : "=rm" (ctx.SP), "=rm" (ctx.FP) ) 209 #elif defined( __i386__ ) 205 210 #define CtxGet( ctx ) __asm__ ( \ 206 211 "movl %%esp,%0\n" \ 207 212 "movl %%ebp,%1\n" \ 208 : "=rm" (ctx.SP), "=rm" (ctx.FP) )209 #elif defined( __x86_64 )210 #define CtxGet( ctx ) __asm__ ( \211 "movq %%rsp,%0\n" \212 "movq %%rbp,%1\n" \213 213 : "=rm" (ctx.SP), "=rm" (ctx.FP) ) 214 214 #elif defined( __ARM_ARCH ) … … 217 217 "mov %1,%%r11\n" \ 218 218 : "=rm" (ctx.SP), "=rm" (ctx.FP) ) 219 #else220 #error unknown hardware architecture221 219 #endif 222 220 -
src/libcfa/concurrency/kernel.c
rbede27b ra722c7a 10 10 // Created On : Tue Jan 17 12:27:26 2017 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : T hu Feb 8 23:52:19201813 // Update Count : 512 // Last Modified On : Tue Feb 6 21:51:26 2018 13 // Update Count : 4 14 14 // 15 15 16 16 //C Includes 17 17 #include <stddef.h> 18 #define ftype `ftype` 18 19 extern "C" { 19 20 #include <stdio.h> … … 23 24 #include <unistd.h> 24 25 } 26 #undef ftype 25 27 26 28 //CFA Includes -
src/libcfa/concurrency/preemption.c
rbede27b ra722c7a 10 10 // Created On : Mon Jun 5 14:20:42 2017 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Fri Feb 9 16:38:13201813 // Update Count : 1 412 // Last Modified On : Thu Feb 8 17:01:56 2018 13 // Update Count : 13 14 14 // 15 15 16 16 #include "preemption.h" 17 17 18 #define ftype `ftype` 18 19 extern "C" { 19 20 #include <errno.h> … … 22 23 #include <unistd.h> 23 24 } 25 #undef ftype 24 26 25 27 #include "bits/signal.h" … … 48 50 49 51 // Machine specific register name 50 #if defined( __i386 ) 52 #if defined(__x86_64__) 53 #define CFA_REG_IP gregs[REG_RIP] 54 #elif defined(__i386__) 51 55 #define CFA_REG_IP gregs[REG_EIP] 52 #elif defined( __x86_64 ) 53 #define CFA_REG_IP gregs[REG_RIP] 54 #elif defined( __ARM_ARCH ) 56 #elif defined(__ARM_ARCH__) 55 57 #define CFA_REG_IP arm_pc 56 #else57 #error unknown hardware architecture58 58 #endif 59 59 -
src/libcfa/exception.c
rbede27b ra722c7a 9 9 // Author : Andrew Beach 10 10 // Created On : Mon Jun 26 15:13:00 2017 11 // Last Modified By : Peter A. Buhr12 // Last Modified On : Fri Feb 9 14:41:55 201813 // Update Count : 811 // Last Modified By : Andrew Beach 12 // Last Modified On : Thr Aug 17 15:45:00 2017 13 // Update Count : 7 14 14 // 15 15 … … 453 453 // match, which is no way generic. Some more works need to be done if we want to have a single call to the try routine. 454 454 455 #if defined( __ i386 ) || defined( __x86_64)455 #if defined( __x86_64__ ) || defined( __i386__ ) 456 456 asm ( 457 457 //HEADER … … 476 476 // " .section .note.GNU-stack,\"x\",@progbits\n" 477 477 ); 478 #endif // __ i386 || __x86_64478 #endif // __x86_64__ || __i386__
Note: See TracChangeset
for help on using the changeset viewer.