Changes in / [a722c7a:bede27b]


Ignore:
Location:
src/libcfa
Files:
1 added
6 edited

Legend:

Unmodified
Added
Removed
  • src/libcfa/Makefile.am

    ra722c7a rbede27b  
    1010## Author           : Peter A. Buhr
    1111## Created On       : Sun May 31 08:54:01 2015
    12 ## Last Modified By : Andrew Beach
    13 ## Last Modified On : Wed Jul 26 14:15:00 2017
    14 ## Update Count     : 221
     12## Last Modified By : Peter A. Buhr
     13## Last Modified On : Fri Feb  9 15:51:24 2018
     14## Update Count     : 223
    1515###############################################################################
    1616
     
    9292libcfa_d_a_CFLAGS = -debug -O0 #No need for __CFA_DEBUG__ since we pass -debug
    9393
    94 stdhdr = ${shell echo stdhdr/*}
     94stdhdr = ${shell find stdhdr -type f -printf "%p "}
    9595
    9696cfa_includedir = $(CFA_INCDIR)
  • src/libcfa/concurrency/invoke.c

    ra722c7a rbede27b  
    1010// Created On       : Tue Jan 17 12:27:26 2016
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Feb  8 16:18:11 2018
    13 // Update Count     : 4
     12// Last Modified On : Fri Feb  9 16:37:42 2018
     13// Update Count     : 5
    1414//
    1515
     
    9393        struct coStack_t* stack = &get_coroutine( this )->stack;
    9494
    95 #if defined( __i386__ )
     95#if defined( __i386 )
    9696
    9797        struct FakeStack {
     
    114114        ((struct FakeStack *)(((struct machine_context_t *)stack->context)->SP))->fcw = 0x037F;  //Vol. 1 8-7
    115115
    116 #elif defined( __x86_64__ )
     116#elif defined( __x86_64 )
    117117
    118118        struct FakeStack {
     
    150150        fs->arg[0] = this;
    151151        fs->arg[1] = invoke;
     152
    152153#else
    153         #error Only __i386__ and __x86_64__ is supported for threads in cfa
     154        #error uknown hardware architecture
    154155#endif
    155156}
  • src/libcfa/concurrency/invoke.h

    ra722c7a rbede27b  
    1010// Created On       : Tue Jan 17 12:27:26 2016
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Tue Jan 23 14:55:46 2018
    13 // Update Count     : 3
     12// Last Modified On : Fri Feb  9 14:41:55 2018
     13// Update Count     : 6
    1414//
    1515
     
    202202        void CtxSwitch( void * from, void * to ) asm ("CtxSwitch");
    203203
    204         #if   defined( __x86_64__ )
     204        #if   defined( __i386 )
     205        #define CtxGet( ctx ) __asm__ ( \
     206                        "movl %%esp,%0\n"   \
     207                        "movl %%ebp,%1\n"   \
     208                : "=rm" (ctx.SP), "=rm" (ctx.FP) )
     209        #elif defined( __x86_64 )
    205210        #define CtxGet( ctx ) __asm__ ( \
    206211                        "movq %%rsp,%0\n"   \
    207212                        "movq %%rbp,%1\n"   \
    208                 : "=rm" (ctx.SP), "=rm" (ctx.FP) )
    209         #elif defined( __i386__ )
    210         #define CtxGet( ctx ) __asm__ ( \
    211                         "movl %%esp,%0\n"   \
    212                         "movl %%ebp,%1\n"   \
    213213                : "=rm" (ctx.SP), "=rm" (ctx.FP) )
    214214        #elif defined( __ARM_ARCH )
     
    217217                        "mov %1,%%r11\n"   \
    218218                : "=rm" (ctx.SP), "=rm" (ctx.FP) )
     219        #else
     220                #error unknown hardware architecture
    219221        #endif
    220222
  • src/libcfa/concurrency/kernel.c

    ra722c7a rbede27b  
    1010// Created On       : Tue Jan 17 12:27:26 2017
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Tue Feb  6 21:51:26 2018
    13 // Update Count     : 4
     12// Last Modified On : Thu Feb  8 23:52:19 2018
     13// Update Count     : 5
    1414//
    1515
    1616//C Includes
    1717#include <stddef.h>
    18 #define ftype `ftype`
    1918extern "C" {
    2019#include <stdio.h>
     
    2423#include <unistd.h>
    2524}
    26 #undef ftype
    2725
    2826//CFA Includes
  • src/libcfa/concurrency/preemption.c

    ra722c7a rbede27b  
    1010// Created On       : Mon Jun 5 14:20:42 2017
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Feb  8 17:01:56 2018
    13 // Update Count     : 13
     12// Last Modified On : Fri Feb  9 16:38:13 2018
     13// Update Count     : 14
    1414//
    1515
    1616#include "preemption.h"
    1717
    18 #define ftype `ftype`
    1918extern "C" {
    2019#include <errno.h>
     
    2322#include <unistd.h>
    2423}
    25 #undef ftype
    2624
    2725#include "bits/signal.h"
     
    5048
    5149// Machine specific register name
    52 #if   defined(__x86_64__)
     50#if   defined( __i386 )
     51#define CFA_REG_IP gregs[REG_EIP]
     52#elif defined( __x86_64 )
    5353#define CFA_REG_IP gregs[REG_RIP]
    54 #elif defined(__i386__)
    55 #define CFA_REG_IP gregs[REG_EIP]
    56 #elif defined(__ARM_ARCH__)
     54#elif defined( __ARM_ARCH )
    5755#define CFA_REG_IP arm_pc
     56#else
     57#error unknown hardware architecture
    5858#endif
    5959
  • src/libcfa/exception.c

    ra722c7a rbede27b  
    99// Author           : Andrew Beach
    1010// Created On       : Mon Jun 26 15:13:00 2017
    11 // Last Modified By : Andrew Beach
    12 // Last Modified On : Thr Aug 17 15:45:00 2017
    13 // Update Count     : 7
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Fri Feb  9 14:41:55 2018
     13// Update Count     : 8
    1414//
    1515
     
    453453// 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.
    454454
    455 #if defined( __x86_64__ ) || defined( __i386__ )
     455#if defined( __i386 ) || defined( __x86_64 )
    456456asm (
    457457        //HEADER
     
    476476//      "       .section        .note.GNU-stack,\"x\",@progbits\n"
    477477);
    478 #endif // __x86_64__ || __i386__
     478#endif // __i386 || __x86_64
Note: See TracChangeset for help on using the changeset viewer.