Skip to content
This repository has been archived by the owner on May 13, 2018. It is now read-only.

Commit

Permalink
[Update]
Browse files Browse the repository at this point in the history
  • Loading branch information
viknash committed Apr 24, 2016
1 parent 5d87089 commit 40387aa
Show file tree
Hide file tree
Showing 23 changed files with 1,088 additions and 80 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -344,3 +344,4 @@ test-driver
/tmp/x86-Debug/src/examples/executor/post_1.nativecodeanalysis.xml
/tmp/x86-Debug/src/examples/executor/post_2.nativecodeanalysis.xml
/vc140.idb
VisualStudio
307 changes: 245 additions & 62 deletions fbuild.bff

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions include/experimental/bits/channel.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ class channel<_T, _Cont>::_PutOp

error_code __ec;
if (this->_M_result == __channel_op::_Result::__operation_canceled)
__ec = make_error_code(errc::operation_canceled);
__ec = make_error_code(/*errc::operation_canceled*/ (std::errc)ECANCELED);
else if (this->_M_result == __channel_op::_Result::__broken_pipe)
__ec = make_error_code(errc::broken_pipe);

Expand Down Expand Up @@ -118,7 +118,7 @@ class channel<_T, _Cont>::_GetOp

error_code __ec;
if (this->_M_result == __channel_op::_Result::__operation_canceled)
__ec = make_error_code(errc::operation_canceled);
__ec = make_error_code(/*errc::operation_canceled*/ (std::errc)ECANCELED);
else if (this->_M_result == __channel_op::_Result::__broken_pipe)
__ec = make_error_code(errc::broken_pipe);

Expand Down
2 changes: 1 addition & 1 deletion include/experimental/bits/channel_void.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class channel<void, _Cont>::_Op

error_code __ec;
if (this->_M_result == __channel_op::_Result::__operation_canceled)
__ec = make_error_code(errc::operation_canceled);
__ec = make_error_code(/*errc::operation_canceled*/ (std::errc)ECANCELED);
else if (this->_M_result == __channel_op::_Result::__broken_pipe)
__ec = make_error_code(errc::broken_pipe);

Expand Down
2 changes: 1 addition & 1 deletion include/experimental/bits/invoker.h
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ struct __invoke_with_execution_context

template <class yield_context, class... _CompletionTokens>
struct __invoke_with_yield_context
: conditional<__is_execution_context<_ExecutionContext>::value,
: conditional<__is_execution_context<yield_context>::value,
__invoke_result<_CompletionTokens...>, __invoke_no_result>::type
{
};
Expand Down
2 changes: 1 addition & 1 deletion include/experimental/bits/timer_queue.h
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ class __timer_queue
{
while (__wait_op_base* __op = (__num != __max) ? __timer._M_ops._Front() : nullptr)
{
__op->_M_ec = make_error_code(errc::operation_canceled);
__op->_M_ec = make_error_code((std::errc)ECANCELED/*errc::operation_canceled*/);
__timer._M_ops._Pop();
__ops._Push(__op);
++__num;
Expand Down
4 changes: 2 additions & 2 deletions include/experimental/bits/yield_context.h
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ template <class _T>
struct __is_yieldable<_T,
typename enable_if<is_convertible<__last_argument_t<__signature_t<_T>>,
yield_context>::value>::type> : true_type {};
/*

template <class _Func, class _R, class... _Args>
struct handler_type<_Func, _R(_Args...),
typename enable_if<__is_yieldable<typename decay<_Func>::type>::value
Expand All @@ -375,7 +375,7 @@ struct handler_type<_Func, _R(_Args...),
typedef associated_executor_t<_YieldContext> _Executor;
typedef __yield_context_launcher<_Executor, _DecayFunc> type;
};
*/

template <class _Executor, class _R, class... _Args>
struct handler_type<basic_yield_context<_Executor>, _R(_Args...)>
{
Expand Down
55 changes: 55 additions & 0 deletions src/examples/channel/fbuild.bff
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
ForEach ( .File in .Files)
{
^ProjectList_Examples_Channel + { '$File$-proj'}
^ProjectList_All + { '$File$-proj' }
^Projects_All + { '$File$'}
}

.ProjectName = "executor"
Expand Down Expand Up @@ -159,6 +161,59 @@ ForEach( .File in .Files)
}
}

// Windows (GCC)
//--------------------------------------------------------------------------
ForEach(.Config in.Configs_Windows_GCC)
{
Using(.Config)
.OutputBase + '\$Platform$-$Config$'
.OutputBinBase + '\$Platform$-$Config$'
.OutputLibBase + '\$Platform$-$Config$'

// Objects
ObjectList('$File$-Lib-$Platform$-$Config$')
{
// Input (Unity)
.CompilerInputUnity = '$File$-Unity-Windows'

// Output
.CompilerOutputPath = '$OutputBase$\$ProjectPath$\'
.LibrarianOutput = '$OutputBase$\$ProjectPath$\$File$.lib'
}

// Executable
Executable('$File$-Exe-$Platform$-$Config$')
{
.Libraries = {
'$File$-Lib-$Platform$-$Config$'
}

.LinkerOutput = '$OutputBase$\$ProjectPath$\$File$.exe'
}

Copy('$File$-CopyExe-$Platform$-$Config$')
{
.Source = { '$OutputBase$\$ProjectPath$\$File$.exe'
}
.Dest = '$OutputBinBase$\'
.PreBuildDependencies = '$File$-Exe-$Platform$-$Config$'
}

Copy('$File$-CopyLib-$Platform$-$Config$')
{
.Source = '$OutputBase$\$ProjectPath$\$File$.lib'
.Dest = '$OutputLibBase$\'
}

Alias('$File$-$Platform$-$Config$')
{
.Targets = { '$File$-Exe-$Platform$-$Config$',
'$File$-CopyExe-$Platform$-$Config$'
}
}
}


// Linux (GCC)
//--------------------------------------------------------------------------
// ForEach( .Config in .Configs_Linux_GCC )
Expand Down
73 changes: 64 additions & 9 deletions src/examples/executor/fbuild.bff
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@

ForEach ( .File in .Files)
{
^ProjectList_Examples_Executor + { '$File$-proj'}
^ProjectList_Examples_Executor + { '$File$-proj' }
^ProjectList_All + { '$File$-proj' }
^Projects_All + { '$File$'}
}

.ProjectName = "executor"
Expand Down Expand Up @@ -185,6 +187,58 @@ ForEach( .File in .Files)
}
}

// Windows (GCC)
//--------------------------------------------------------------------------
ForEach(.Config in.Configs_Windows_GCC)
{
Using(.Config)
.OutputBase + '\$Platform$-$Config$'
.OutputBinBase + '\$Platform$-$Config$'
.OutputLibBase + '\$Platform$-$Config$'

// Objects
ObjectList('$File$-Lib-$Platform$-$Config$')
{
// Input (Unity)
.CompilerInputUnity = '$File$-Unity-Windows'

// Output
.CompilerOutputPath = '$OutputBase$\$ProjectPath$\'
.LibrarianOutput = '$OutputBase$\$ProjectPath$\$File$.lib'
}

// Executable
Executable('$File$-Exe-$Platform$-$Config$')
{
.Libraries = {
'$File$-Lib-$Platform$-$Config$'
}

.LinkerOutput = '$OutputBase$\$ProjectPath$\$File$.exe'
}

Copy('$File$-CopyExe-$Platform$-$Config$')
{
.Source = { '$OutputBase$\$ProjectPath$\$File$.exe'
}
.Dest = '$OutputBinBase$\'
.PreBuildDependencies = '$File$-Exe-$Platform$-$Config$'
}

Copy('$File$-CopyLib-$Platform$-$Config$')
{
.Source = '$OutputBase$\$ProjectPath$\$File$.lib'
.Dest = '$OutputLibBase$\'
}

Alias('$File$-$Platform$-$Config$')
{
.Targets = { '$File$-Exe-$Platform$-$Config$',
'$File$-CopyExe-$Platform$-$Config$'
}
}
}

// Linux (GCC)
//--------------------------------------------------------------------------
// ForEach( .Config in .Configs_Linux_GCC )
Expand Down Expand Up @@ -250,16 +304,17 @@ ForEach( .File in .Files)
// Aliases
//--------------------------------------------------------------------------
// Per-Config
Alias( '$File$-Debug' ) { .Targets = { '$File$-X86-Debug', '$File$-X64-Debug', '$File$-X86Clang-Debug' } }
Alias( '$File$-Profile' ) { .Targets = { '$File$-X86-Profile', '$File$-X64-Profile' } }
Alias( '$File$-Release' ) { .Targets = { '$File$-X86-Release', '$File$-X64-Release', '$File$-X86Clang-Release' } }
Alias( '$File$-Debug' ) { .Targets = { '$File$-X86-Debug', '$File$-X64-Debug', '$File$-X86Clang-Debug', '$File$-X64GCC-Debug' } }
Alias( '$File$-Profile' ) { .Targets = { '$File$-X86-Profile', '$File$-X64-Profile', '$File$-X64GCC-Profile' } }
Alias( '$File$-Release' ) { .Targets = { '$File$-X86-Release', '$File$-X64-Release', '$File$-X86Clang-Release', '$File$-X64GCC-Release' } }

// Per-Platform
Alias( '$File$-X86' ) { .Targets = { '$File$-X86-Debug', '$File$-X86-Release', '$File$-X86-Profile' } }
Alias( '$File$-X64' ) { .Targets = { '$File$-X64-Debug', '$File$-X64-Release', '$File$-X64-Profile' } }
Alias( '$File$-X86Clang' ) { .Targets = { '$File$-X86Clang-Debug', '$File$-X86Clang-Release' } }
Alias( '$File$-x64Linux' ) { .Targets = { '$File$-X64Linux-Debug', '$File$-X64Linux-Release', '$File$-X64Linux-Profile' } }
Alias( '$File$-x64OSX' ) { .Targets = { '$File$-X64OSX-Debug', '$File$-X64OSX-Release', '$File$-X64OSX-Profile' } }
Alias( '$File$-X86' ) { .Targets = { '$File$-X86-Debug', '$File$-X86-Release', '$File$-X86-Profile' } }
Alias( '$File$-X64' ) { .Targets = { '$File$-X64-Debug', '$File$-X64-Release', '$File$-X64-Profile' } }
Alias( '$File$-X64GCC') { .Targets = { '$File$-X64GCC-Debug', '$File$-X64GCC-Release', '$File$-X64GCC-Profile' } }
Alias( '$File$-X86Clang' ) { .Targets = { '$File$-X86Clang-Debug', '$File$-X86Clang-Release' } }
Alias( '$File$-x64Linux' ) { .Targets = { '$File$-X64Linux-Debug', '$File$-X64Linux-Release', '$File$-X64Linux-Profile' } }
Alias( '$File$-x64OSX' ) { .Targets = { '$File$-X64OSX-Debug', '$File$-X64OSX-Release', '$File$-X64OSX-Profile' } }

// All
Alias( '$File$' )
Expand Down
2 changes: 1 addition & 1 deletion src/examples/timer/dispatch_after_1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ int main()
{
for (int i = 0; i < 10; ++i)
{
//dispatch_after(std::chrono::seconds(1), yield);
dispatch_after(std::chrono::seconds(1), yield);
std::cout << i << std::endl;
}
}, use_future).get();
Expand Down
55 changes: 55 additions & 0 deletions src/examples/timer/fbuild.bff
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
ForEach ( .File in .Files)
{
^ProjectList_Examples_Timer + { '$File$-proj'}
^ProjectList_All + { '$File$-proj' }
^Projects_All + { '$File$'}
}

.ProjectName = "executor"
Expand Down Expand Up @@ -160,6 +162,59 @@ ForEach( .File in .Files)
}
}

// Windows (GCC)
//--------------------------------------------------------------------------
ForEach(.Config in.Configs_Windows_GCC)
{
Using(.Config)
.OutputBase + '\$Platform$-$Config$'
.OutputBinBase + '\$Platform$-$Config$'
.OutputLibBase + '\$Platform$-$Config$'

// Objects
ObjectList('$File$-Lib-$Platform$-$Config$')
{
// Input (Unity)
.CompilerInputUnity = '$File$-Unity-Windows'

// Output
.CompilerOutputPath = '$OutputBase$\$ProjectPath$\'
.LibrarianOutput = '$OutputBase$\$ProjectPath$\$File$.lib'
}

// Executable
Executable('$File$-Exe-$Platform$-$Config$')
{
.Libraries = {
'$File$-Lib-$Platform$-$Config$'
}

.LinkerOutput = '$OutputBase$\$ProjectPath$\$File$.exe'
}

Copy('$File$-CopyExe-$Platform$-$Config$')
{
.Source = { '$OutputBase$\$ProjectPath$\$File$.exe'
}
.Dest = '$OutputBinBase$\'
.PreBuildDependencies = '$File$-Exe-$Platform$-$Config$'
}

Copy('$File$-CopyLib-$Platform$-$Config$')
{
.Source = '$OutputBase$\$ProjectPath$\$File$.lib'
.Dest = '$OutputLibBase$\'
}

Alias('$File$-$Platform$-$Config$')
{
.Targets = { '$File$-Exe-$Platform$-$Config$',
'$File$-CopyExe-$Platform$-$Config$'
}
}
}


// Linux (GCC)
//--------------------------------------------------------------------------
// ForEach( .Config in .Configs_Linux_GCC )
Expand Down
55 changes: 55 additions & 0 deletions src/examples/trading/client/fbuild.bff
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
ForEach ( .File in .Files)
{
^ProjectList_Examples_Timer + { '$File$-proj'}
^ProjectList_All + { '$File$-proj' }
^Projects_All + { '$File$'}
}

.ProjectName = "executor"
Expand Down Expand Up @@ -160,6 +162,59 @@ ForEach( .File in .Files)
}
}

// Windows (GCC)
//--------------------------------------------------------------------------
ForEach(.Config in.Configs_Windows_GCC)
{
Using(.Config)
.OutputBase + '\$Platform$-$Config$'
.OutputBinBase + '\$Platform$-$Config$'
.OutputLibBase + '\$Platform$-$Config$'

// Objects
ObjectList('$File$-Lib-$Platform$-$Config$')
{
// Input (Unity)
.CompilerInputUnity = '$File$-Unity-Windows'

// Output
.CompilerOutputPath = '$OutputBase$\$ProjectPath$\'
.LibrarianOutput = '$OutputBase$\$ProjectPath$\$File$.lib'
}

// Executable
Executable('$File$-Exe-$Platform$-$Config$')
{
.Libraries = {
'$File$-Lib-$Platform$-$Config$'
}

.LinkerOutput = '$OutputBase$\$ProjectPath$\$File$.exe'
}

Copy('$File$-CopyExe-$Platform$-$Config$')
{
.Source = { '$OutputBase$\$ProjectPath$\$File$.exe'
}
.Dest = '$OutputBinBase$\'
.PreBuildDependencies = '$File$-Exe-$Platform$-$Config$'
}

Copy('$File$-CopyLib-$Platform$-$Config$')
{
.Source = '$OutputBase$\$ProjectPath$\$File$.lib'
.Dest = '$OutputLibBase$\'
}

Alias('$File$-$Platform$-$Config$')
{
.Targets = { '$File$-Exe-$Platform$-$Config$',
'$File$-CopyExe-$Platform$-$Config$'
}
}
}


// Linux (GCC)
//--------------------------------------------------------------------------
// ForEach( .Config in .Configs_Linux_GCC )
Expand Down
Loading

0 comments on commit 40387aa

Please sign in to comment.