Changes in / [6a16806:2d59d53]
- Files:
-
- 1 deleted
- 8 edited
-
Jenkinsfile (modified) (1 diff)
-
aclocal.m4 (modified) (1 diff)
-
configure (modified) (6 diffs)
-
configure.ac (modified) (2 diffs)
-
src/libcfa/concurrency/CtxSwitch-i686.S (deleted)
-
src/libcfa/concurrency/CtxSwitch-x86_64.S (modified) (1 diff)
-
src/libcfa/concurrency/invoke.c (modified) (3 diffs)
-
src/libcfa/concurrency/invoke.h (modified) (1 diff)
-
src/libcfa/concurrency/threads.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
Jenkinsfile
r6a16806 r2d59d53 168 168 architectureFlag = '' 169 169 if (buildArchitecture == '64-bit') { 170 architectureFlag = '--host=x86_64 CXXFLAGS="-m64 -O2" CFAFLAGS="-m64"'170 architectureFlag = '--host=x86_64 CXXFLAGS="-m64" CFAFLAGS="-m64"' 171 171 } else if (buildArchitecture == '32-bit'){ 172 architectureFlag = '--host=i386 CXXFLAGS="-m32 -O2" CFAFLAGS="-m32"'172 architectureFlag = '--host=i386 CXXFLAGS="-m32" CFAFLAGS="-m32"' 173 173 } else { 174 174 architectureFlag = 'ERROR' -
aclocal.m4
r6a16806 r2d59d53 135 135 # expand $ac_aux_dir to an absolute path 136 136 am_aux_dir=`cd $ac_aux_dir && pwd` 137 ])138 139 # AM_COND_IF -*- Autoconf -*-140 141 # Copyright (C) 2008, 2010 Free Software Foundation, Inc.142 #143 # This file is free software; the Free Software Foundation144 # gives unlimited permission to copy and/or distribute it,145 # with or without modifications, as long as this notice is preserved.146 147 # serial 3148 149 # _AM_COND_IF150 # _AM_COND_ELSE151 # _AM_COND_ENDIF152 # --------------153 # These macros are only used for tracing.154 m4_define([_AM_COND_IF])155 m4_define([_AM_COND_ELSE])156 m4_define([_AM_COND_ENDIF])157 158 159 # AM_COND_IF(COND, [IF-TRUE], [IF-FALSE])160 # ---------------------------------------161 # If the shell condition COND is true, execute IF-TRUE, otherwise execute162 # IF-FALSE. Allow automake to learn about conditional instantiating macros163 # (the AC_CONFIG_FOOS).164 AC_DEFUN([AM_COND_IF],165 [m4_ifndef([_AM_COND_VALUE_$1],166 [m4_fatal([$0: no such condition "$1"])])dnl167 _AM_COND_IF([$1])dnl168 if test -z "$$1_TRUE"; then :169 m4_n([$2])[]dnl170 m4_ifval([$3],171 [_AM_COND_ELSE([$1])dnl172 else173 $3174 ])dnl175 _AM_COND_ENDIF([$1])dnl176 fi[]dnl177 137 ]) 178 138 -
configure
r6a16806 r2d59d53 658 658 CFA_INCDIR 659 659 CFA_PREFIX 660 BUILD_DEBUG_FALSE661 BUILD_DEBUG_TRUE662 BUILD_RELEASE_FALSE663 BUILD_RELEASE_TRUE664 660 CFA_BACKEND_CC 665 661 BACKEND_CC … … 738 734 enable_maintainer_mode 739 735 with_backend_compiler 740 enable_target_release741 enable_target_debug742 736 enable_dependency_tracking 743 737 ' … … 1382 1376 --disable-maintainer-mode disable make rules and dependencies not useful 1383 1377 (and sometimes confusing) to the casual installer 1384 --enable-target-release Build and install the release target1385 --enable-target-debug Build and install the debug target1386 1378 --disable-dependency-tracking speeds up one-time build 1387 1379 --enable-dependency-tracking do not reject slow dependency extractors … … 3107 3099 _ACEOF 3108 3100 3109 3110 3111 3112 3113 # Check whether --enable-target-release was given.3114 if test "${enable_target_release+set}" = set; then :3115 enableval=$enable_target_release;3116 fi3117 3118 # Check whether --enable-target-debug was given.3119 if test "${enable_target_debug+set}" = set; then :3120 enableval=$enable_target_debug;3121 fi3122 3123 3124 case "$enable_target_release" in3125 yes)3126 case "$enable_target_debug" in3127 yes)3128 build_release="yes"3129 build_debug="yes"3130 ;;3131 no)3132 build_release="yes"3133 build_debug="no"3134 ;;3135 *)3136 build_release="yes"3137 build_debug="no"3138 ;;3139 esac3140 ;;3141 no)3142 case "$enable_target_debug" in3143 yes)3144 build_release="no"3145 build_debug="yes"3146 ;;3147 no)3148 as_fn_error $? "Must build target debug or release" "$LINENO" 53149 exit 1;3150 ;;3151 *)3152 build_release="no"3153 build_debug="yes"3154 ;;3155 esac3156 ;;3157 *)3158 case "$enable_target_debug" in3159 yes)3160 build_release="no"3161 build_debug="yes"3162 ;;3163 no)3164 build_release="yes"3165 build_debug="no"3166 ;;3167 *)3168 build_release="yes"3169 build_debug="yes"3170 ;;3171 esac3172 ;;3173 esac3174 3175 if test "x$build_release" = "xyes"; then3176 BUILD_RELEASE_TRUE=3177 BUILD_RELEASE_FALSE='#'3178 else3179 BUILD_RELEASE_TRUE='#'3180 BUILD_RELEASE_FALSE=3181 fi3182 3183 if test "x$build_debug" = "xyes"; then3184 BUILD_DEBUG_TRUE=3185 BUILD_DEBUG_FALSE='#'3186 else3187 BUILD_DEBUG_TRUE='#'3188 BUILD_DEBUG_FALSE=3189 fi3190 3101 3191 3102 … … 6296 6207 if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then 6297 6208 as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined. 6298 Usually this means the macro was only invoked conditionally." "$LINENO" 56299 fi6300 if test -z "${BUILD_RELEASE_TRUE}" && test -z "${BUILD_RELEASE_FALSE}"; then6301 as_fn_error $? "conditional \"BUILD_RELEASE\" was never defined.6302 Usually this means the macro was only invoked conditionally." "$LINENO" 56303 fi6304 if test -z "${BUILD_DEBUG_TRUE}" && test -z "${BUILD_DEBUG_FALSE}"; then6305 as_fn_error $? "conditional \"BUILD_DEBUG\" was never defined.6306 6209 Usually this means the macro was only invoked conditionally." "$LINENO" 5 6307 6210 fi … … 7663 7566 7664 7567 7665 if test -z "$BUILD_RELEASE_TRUE"; then :7666 if test -z "$BUILD_DEBUG_TRUE"; then :7667 { $as_echo "$as_me:${as_lineno-$LINENO}: Building libcfa for target: release & debug" >&57668 $as_echo "$as_me: Building libcfa for target: release & debug" >&6;}7669 else7670 { $as_echo "$as_me:${as_lineno-$LINENO}: Building libcfa for target: release" >&57671 $as_echo "$as_me: Building libcfa for target: release" >&6;}7672 fi7673 else7674 { $as_echo "$as_me:${as_lineno-$LINENO}: Building libcfa for target: debug" >&57675 $as_echo "$as_me: Building libcfa for target: debug" >&6;}7676 fi7677 7678 7568 # Final text 7679 7569 { $as_echo "$as_me:${as_lineno-$LINENO}: result: Cforall configuraton completed. Type \"make -j 8 install\"." >&5 -
configure.ac
r6a16806 r2d59d53 52 52 AC_DEFINE_UNQUOTED(CFA_BACKEND_CC, "${BACKEND_CC}", [Location of include files.]) 53 53 AC_SUBST(CFA_BACKEND_CC) 54 55 56 57 AC_ARG_ENABLE(target-release, AS_HELP_STRING([--enable-target-release], [Build and install the release target]))58 AC_ARG_ENABLE(target-debug, AS_HELP_STRING([--enable-target-debug], [Build and install the debug target]))59 60 case "$enable_target_release" in61 yes)62 case "$enable_target_debug" in63 yes)64 build_release="yes"65 build_debug="yes"66 ;;67 no)68 build_release="yes"69 build_debug="no"70 ;;71 *)72 build_release="yes"73 build_debug="no"74 ;;75 esac76 ;;77 no)78 case "$enable_target_debug" in79 yes)80 build_release="no"81 build_debug="yes"82 ;;83 no)84 AC_MSG_ERROR(Must build target debug or release)85 exit 1;86 ;;87 *)88 build_release="no"89 build_debug="yes"90 ;;91 esac92 ;;93 *)94 case "$enable_target_debug" in95 yes)96 build_release="no"97 build_debug="yes"98 ;;99 no)100 build_release="yes"101 build_debug="no"102 ;;103 *)104 build_release="yes"105 build_debug="yes"106 ;;107 esac108 ;;109 esac110 111 AM_CONDITIONAL([BUILD_RELEASE], [test "x$build_release" = "xyes"])112 AM_CONDITIONAL([BUILD_DEBUG], [test "x$build_debug" = "xyes"])113 54 114 55 if test "x$prefix" = "xNONE"; then … … 196 137 AC_OUTPUT 197 138 198 AM_COND_IF([BUILD_RELEASE],199 [AM_COND_IF([BUILD_DEBUG],200 [AC_MSG_NOTICE(Building libcfa for target: release & debug)],201 [AC_MSG_NOTICE(Building libcfa for target: release)])],202 [AC_MSG_NOTICE(Building libcfa for target: debug)])203 204 139 # Final text 205 140 AC_MSG_RESULT(Cforall configuraton completed. Type "make -j 8 install".) -
src/libcfa/concurrency/CtxSwitch-x86_64.S
r6a16806 r2d59d53 79 79 .text 80 80 .align 2 81 .globl CtxInvokeStub82 CtxInvokeStub:81 .globl coInvokeStub 82 coInvokeStub: 83 83 movq %rbx, %rdi 84 84 jmp *%r12 -
src/libcfa/concurrency/invoke.c
r6a16806 r2d59d53 15 15 extern void __suspend__F___1(void); 16 16 17 void CtxInvokeCoroutine(17 void invokeCoroutine( 18 18 void (*main)(void *), 19 19 struct coroutine *(*get_coroutine)(void *), … … 34 34 35 35 36 void CtxStart(36 void startCoroutine( 37 37 void (*main)(void *), 38 38 struct coroutine *(*get_coroutine)(void *), … … 73 73 74 74 ((struct FakeStack *)(((struct machine_context_t *)stack->context)->SP))->dummyReturn = NULL; 75 ((struct FakeStack *)(((struct machine_context_t *)stack->context)->SP))->rturn = CtxInvokeStub;75 ((struct FakeStack *)(((struct machine_context_t *)stack->context)->SP))->rturn = coInvokeStub; 76 76 ((struct FakeStack *)(((struct machine_context_t *)stack->context)->SP))->fixedRegisters[0] = this; 77 77 ((struct FakeStack *)(((struct machine_context_t *)stack->context)->SP))->fixedRegisters[1] = invoke; -
src/libcfa/concurrency/invoke.h
r6a16806 r2d59d53 45 45 46 46 // assembler routines that performs the context switch 47 extern void CtxInvokeStub( void );47 extern void coInvokeStub( void ); 48 48 void CtxSwitch( void *from, void *to ) asm ("CtxSwitch"); 49 49 -
src/libcfa/concurrency/threads.c
r6a16806 r2d59d53 44 44 } 45 45 46 void c orCxtSw(coroutine* src, coroutine* dst);46 void ctxSwitchDirect(coroutine* src, coroutine* dst); 47 47 void create_stack( coStack_t* this, unsigned int storageSize ); // used by all constructors 48 48 49 49 extern "C" { 50 50 forall(dtype T | is_coroutine(T)) 51 void CtxInvokeCoroutine(T* this);51 void invokeCoroutine(T* this); 52 52 53 53 forall(dtype T | is_coroutine(T)) 54 void CtxStart(T* this, void (*invoke)(T*));54 void startCoroutine(T* this, void (*invoke)(T*)); 55 55 } 56 56 … … 100 100 src->name, src, src->last->name, src->last ); 101 101 102 c orCxtSw( src, src->last );102 ctxSwitchDirect( src, src->last ); 103 103 } 104 104 … … 108 108 coroutine* dst = get_coroutine(cor); 109 109 110 if( dst->stack.base == NULL) {110 if( ((intptr_t)dst->stack.base) == 0 ) { 111 111 create_stack(&dst->stack, dst->stack.size); 112 CtxStart(cor, CtxInvokeCoroutine);112 startCoroutine(cor, invokeCoroutine); 113 113 } 114 114 … … 120 120 dst->last = src; // set last resumer 121 121 } // if 122 c orCxtSw( src, dst ); // always done for performance testing122 ctxSwitchDirect( src, dst ); // always done for performance testing 123 123 } 124 124 … … 132 132 } 133 133 134 void c orCxtSw(coroutine* src, coroutine* dst) {134 void ctxSwitchDirect(coroutine* src, coroutine* dst) { 135 135 // THREAD_GETMEM( This )->disableInterrupts(); 136 136
Note:
See TracChangeset
for help on using the changeset viewer.