mirror of https://github.com/grpc/grpc.git
Merge pull request #11741 from kpayson64/tf_rollback
Switch Server back to lockfree stackpull/11743/head
commit
0c1f4be14c
27 changed files with 793 additions and 82 deletions
@ -0,0 +1,137 @@ |
||||
/*
|
||||
* |
||||
* Copyright 2015 gRPC authors. |
||||
* |
||||
* Licensed under the Apache License, Version 2.0 (the "License"); |
||||
* you may not use this file except in compliance with the License. |
||||
* You may obtain a copy of the License at |
||||
* |
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
* |
||||
*/ |
||||
|
||||
#include "src/core/lib/support/stack_lockfree.h" |
||||
|
||||
#include <stdlib.h> |
||||
#include <string.h> |
||||
|
||||
#include <grpc/support/alloc.h> |
||||
#include <grpc/support/atm.h> |
||||
#include <grpc/support/log.h> |
||||
#include <grpc/support/port_platform.h> |
||||
|
||||
/* The lockfree node structure is a single architecture-level
|
||||
word that allows for an atomic CAS to set it up. */ |
||||
struct lockfree_node_contents { |
||||
/* next thing to look at. Actual index for head, next index otherwise */ |
||||
uint16_t index; |
||||
#ifdef GPR_ARCH_64 |
||||
uint16_t pad; |
||||
uint32_t aba_ctr; |
||||
#else |
||||
#ifdef GPR_ARCH_32 |
||||
uint16_t aba_ctr; |
||||
#else |
||||
#error Unsupported bit width architecture |
||||
#endif |
||||
#endif |
||||
}; |
||||
|
||||
/* Use a union to make sure that these are in the same bits as an atm word */ |
||||
typedef union lockfree_node { |
||||
gpr_atm atm; |
||||
struct lockfree_node_contents contents; |
||||
} lockfree_node; |
||||
|
||||
/* make sure that entries aligned to 8-bytes */ |
||||
#define ENTRY_ALIGNMENT_BITS 3 |
||||
/* reserve this entry as invalid */ |
||||
#define INVALID_ENTRY_INDEX ((1 << 16) - 1) |
||||
|
||||
struct gpr_stack_lockfree { |
||||
lockfree_node *entries; |
||||
lockfree_node head; /* An atomic entry describing curr head */ |
||||
}; |
||||
|
||||
gpr_stack_lockfree *gpr_stack_lockfree_create(size_t entries) { |
||||
gpr_stack_lockfree *stack; |
||||
stack = (gpr_stack_lockfree *)gpr_malloc(sizeof(*stack)); |
||||
/* Since we only allocate 16 bits to represent an entry number,
|
||||
* make sure that we are within the desired range */ |
||||
/* Reserve the highest entry number as a dummy */ |
||||
GPR_ASSERT(entries < INVALID_ENTRY_INDEX); |
||||
stack->entries = (lockfree_node *)gpr_malloc_aligned( |
||||
entries * sizeof(stack->entries[0]), ENTRY_ALIGNMENT_BITS); |
||||
/* Clear out all entries */ |
||||
memset(stack->entries, 0, entries * sizeof(stack->entries[0])); |
||||
memset(&stack->head, 0, sizeof(stack->head)); |
||||
|
||||
GPR_ASSERT(sizeof(stack->entries->atm) == sizeof(stack->entries->contents)); |
||||
|
||||
/* Point the head at reserved dummy entry */ |
||||
stack->head.contents.index = INVALID_ENTRY_INDEX; |
||||
/* Fill in the pad and aba_ctr to avoid confusing memcheck tools */ |
||||
#ifdef GPR_ARCH_64 |
||||
stack->head.contents.pad = 0; |
||||
#endif |
||||
stack->head.contents.aba_ctr = 0; |
||||
return stack; |
||||
} |
||||
|
||||
void gpr_stack_lockfree_destroy(gpr_stack_lockfree *stack) { |
||||
gpr_free_aligned(stack->entries); |
||||
gpr_free(stack); |
||||
} |
||||
|
||||
int gpr_stack_lockfree_push(gpr_stack_lockfree *stack, int entry) { |
||||
lockfree_node head; |
||||
lockfree_node newhead; |
||||
lockfree_node curent; |
||||
lockfree_node newent; |
||||
|
||||
/* First fill in the entry's index and aba ctr for new head */ |
||||
newhead.contents.index = (uint16_t)entry; |
||||
#ifdef GPR_ARCH_64 |
||||
/* Fill in the pad to avoid confusing memcheck tools */ |
||||
newhead.contents.pad = 0; |
||||
#endif |
||||
|
||||
/* Also post-increment the aba_ctr */ |
||||
curent.atm = gpr_atm_no_barrier_load(&stack->entries[entry].atm); |
||||
newhead.contents.aba_ctr = ++curent.contents.aba_ctr; |
||||
gpr_atm_no_barrier_store(&stack->entries[entry].atm, curent.atm); |
||||
|
||||
do { |
||||
/* Atomically get the existing head value for use */ |
||||
head.atm = gpr_atm_no_barrier_load(&(stack->head.atm)); |
||||
/* Point to it */ |
||||
newent.atm = gpr_atm_no_barrier_load(&stack->entries[entry].atm); |
||||
newent.contents.index = head.contents.index; |
||||
gpr_atm_no_barrier_store(&stack->entries[entry].atm, newent.atm); |
||||
} while (!gpr_atm_rel_cas(&(stack->head.atm), head.atm, newhead.atm)); |
||||
/* Use rel_cas above to make sure that entry index is set properly */ |
||||
return head.contents.index == INVALID_ENTRY_INDEX; |
||||
} |
||||
|
||||
int gpr_stack_lockfree_pop(gpr_stack_lockfree *stack) { |
||||
lockfree_node head; |
||||
lockfree_node newhead; |
||||
|
||||
do { |
||||
head.atm = gpr_atm_acq_load(&(stack->head.atm)); |
||||
if (head.contents.index == INVALID_ENTRY_INDEX) { |
||||
return -1; |
||||
} |
||||
newhead.atm = |
||||
gpr_atm_no_barrier_load(&(stack->entries[head.contents.index].atm)); |
||||
|
||||
} while (!gpr_atm_no_barrier_cas(&(stack->head.atm), head.atm, newhead.atm)); |
||||
|
||||
return head.contents.index; |
||||
} |
@ -0,0 +1,38 @@ |
||||
/*
|
||||
* |
||||
* Copyright 2015 gRPC authors. |
||||
* |
||||
* Licensed under the Apache License, Version 2.0 (the "License"); |
||||
* you may not use this file except in compliance with the License. |
||||
* You may obtain a copy of the License at |
||||
* |
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
* |
||||
*/ |
||||
|
||||
#ifndef GRPC_CORE_LIB_SUPPORT_STACK_LOCKFREE_H |
||||
#define GRPC_CORE_LIB_SUPPORT_STACK_LOCKFREE_H |
||||
|
||||
#include <stddef.h> |
||||
|
||||
typedef struct gpr_stack_lockfree gpr_stack_lockfree; |
||||
|
||||
/* This stack must specify the maximum number of entries to track.
|
||||
The current implementation only allows up to 65534 entries */ |
||||
gpr_stack_lockfree *gpr_stack_lockfree_create(size_t entries); |
||||
void gpr_stack_lockfree_destroy(gpr_stack_lockfree *stack); |
||||
|
||||
/* Pass in a valid entry number for the next stack entry */ |
||||
/* Returns 1 if this is the first element on the stack, 0 otherwise */ |
||||
int gpr_stack_lockfree_push(gpr_stack_lockfree *, int entry); |
||||
|
||||
/* Returns -1 on empty or the actual entry number */ |
||||
int gpr_stack_lockfree_pop(gpr_stack_lockfree *stack); |
||||
|
||||
#endif /* GRPC_CORE_LIB_SUPPORT_STACK_LOCKFREE_H */ |
@ -0,0 +1,140 @@ |
||||
/*
|
||||
* |
||||
* Copyright 2015 gRPC authors. |
||||
* |
||||
* Licensed under the Apache License, Version 2.0 (the "License"); |
||||
* you may not use this file except in compliance with the License. |
||||
* You may obtain a copy of the License at |
||||
* |
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
* |
||||
*/ |
||||
|
||||
#include "src/core/lib/support/stack_lockfree.h" |
||||
|
||||
#include <stdlib.h> |
||||
|
||||
#include <grpc/support/alloc.h> |
||||
#include <grpc/support/log.h> |
||||
#include <grpc/support/sync.h> |
||||
#include <grpc/support/thd.h> |
||||
#include "test/core/util/test_config.h" |
||||
|
||||
/* max stack size supported */ |
||||
#define MAX_STACK_SIZE 65534 |
||||
|
||||
#define MAX_THREADS 32 |
||||
|
||||
static void test_serial_sized(size_t size) { |
||||
gpr_stack_lockfree *stack = gpr_stack_lockfree_create(size); |
||||
size_t i; |
||||
size_t j; |
||||
|
||||
/* First try popping empty */ |
||||
GPR_ASSERT(gpr_stack_lockfree_pop(stack) == -1); |
||||
|
||||
/* Now add one item and check it */ |
||||
gpr_stack_lockfree_push(stack, 3); |
||||
GPR_ASSERT(gpr_stack_lockfree_pop(stack) == 3); |
||||
GPR_ASSERT(gpr_stack_lockfree_pop(stack) == -1); |
||||
|
||||
/* Now add repeatedly more items and check them */ |
||||
for (i = 1; i < size; i *= 2) { |
||||
for (j = 0; j <= i; j++) { |
||||
GPR_ASSERT(gpr_stack_lockfree_push(stack, (int)j) == (j == 0)); |
||||
} |
||||
for (j = 0; j <= i; j++) { |
||||
GPR_ASSERT(gpr_stack_lockfree_pop(stack) == (int)(i - j)); |
||||
} |
||||
GPR_ASSERT(gpr_stack_lockfree_pop(stack) == -1); |
||||
} |
||||
|
||||
gpr_stack_lockfree_destroy(stack); |
||||
} |
||||
|
||||
static void test_serial() { |
||||
size_t i; |
||||
for (i = 128; i < MAX_STACK_SIZE; i *= 2) { |
||||
test_serial_sized(i); |
||||
} |
||||
test_serial_sized(MAX_STACK_SIZE); |
||||
} |
||||
|
||||
struct test_arg { |
||||
gpr_stack_lockfree *stack; |
||||
int stack_size; |
||||
int nthreads; |
||||
int rank; |
||||
int sum; |
||||
}; |
||||
|
||||
static void test_mt_body(void *v) { |
||||
struct test_arg *arg = (struct test_arg *)v; |
||||
int lo, hi; |
||||
int i; |
||||
int res; |
||||
lo = arg->rank * arg->stack_size / arg->nthreads; |
||||
hi = (arg->rank + 1) * arg->stack_size / arg->nthreads; |
||||
for (i = lo; i < hi; i++) { |
||||
gpr_stack_lockfree_push(arg->stack, i); |
||||
if ((res = gpr_stack_lockfree_pop(arg->stack)) != -1) { |
||||
arg->sum += res; |
||||
} |
||||
} |
||||
while ((res = gpr_stack_lockfree_pop(arg->stack)) != -1) { |
||||
arg->sum += res; |
||||
} |
||||
} |
||||
|
||||
static void test_mt_sized(size_t size, int nth) { |
||||
gpr_stack_lockfree *stack; |
||||
struct test_arg args[MAX_THREADS]; |
||||
gpr_thd_id thds[MAX_THREADS]; |
||||
int sum; |
||||
int i; |
||||
gpr_thd_options options = gpr_thd_options_default(); |
||||
|
||||
stack = gpr_stack_lockfree_create(size); |
||||
for (i = 0; i < nth; i++) { |
||||
args[i].stack = stack; |
||||
args[i].stack_size = (int)size; |
||||
args[i].nthreads = nth; |
||||
args[i].rank = i; |
||||
args[i].sum = 0; |
||||
} |
||||
gpr_thd_options_set_joinable(&options); |
||||
for (i = 0; i < nth; i++) { |
||||
GPR_ASSERT(gpr_thd_new(&thds[i], test_mt_body, &args[i], &options)); |
||||
} |
||||
sum = 0; |
||||
for (i = 0; i < nth; i++) { |
||||
gpr_thd_join(thds[i]); |
||||
sum = sum + args[i].sum; |
||||
} |
||||
GPR_ASSERT((unsigned)sum == ((unsigned)size * (size - 1)) / 2); |
||||
gpr_stack_lockfree_destroy(stack); |
||||
} |
||||
|
||||
static void test_mt() { |
||||
size_t size; |
||||
int nth; |
||||
for (nth = 1; nth < MAX_THREADS; nth++) { |
||||
for (size = 128; size < MAX_STACK_SIZE; size *= 2) { |
||||
test_mt_sized(size, nth); |
||||
} |
||||
test_mt_sized(MAX_STACK_SIZE, nth); |
||||
} |
||||
} |
||||
|
||||
int main(int argc, char **argv) { |
||||
grpc_test_init(argc, argv); |
||||
test_serial(); |
||||
test_mt(); |
||||
return 0; |
||||
} |
@ -0,0 +1,193 @@ |
||||
<?xml version="1.0" encoding="utf-8"?> |
||||
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
||||
<Import Project="$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies.openssl.props" Condition="Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\1.0.204.1.props')" /> |
||||
<ItemGroup Label="ProjectConfigurations"> |
||||
<ProjectConfiguration Include="Debug|Win32"> |
||||
<Configuration>Debug</Configuration> |
||||
<Platform>Win32</Platform> |
||||
</ProjectConfiguration> |
||||
<ProjectConfiguration Include="Debug|x64"> |
||||
<Configuration>Debug</Configuration> |
||||
<Platform>x64</Platform> |
||||
</ProjectConfiguration> |
||||
<ProjectConfiguration Include="Release|Win32"> |
||||
<Configuration>Release</Configuration> |
||||
<Platform>Win32</Platform> |
||||
</ProjectConfiguration> |
||||
<ProjectConfiguration Include="Release|x64"> |
||||
<Configuration>Release</Configuration> |
||||
<Platform>x64</Platform> |
||||
</ProjectConfiguration> |
||||
</ItemGroup> |
||||
<PropertyGroup Label="Globals"> |
||||
<ProjectGuid>{AD06B5CD-8D5C-A365-C46B-3CF32237A4F7}</ProjectGuid> |
||||
<IgnoreWarnIntDirInTempDetected>true</IgnoreWarnIntDirInTempDetected> |
||||
<IntDir>$(SolutionDir)IntDir\$(MSBuildProjectName)\</IntDir> |
||||
</PropertyGroup> |
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> |
||||
<PropertyGroup Condition="'$(VisualStudioVersion)' == '10.0'" Label="Configuration"> |
||||
<PlatformToolset>v100</PlatformToolset> |
||||
</PropertyGroup> |
||||
<PropertyGroup Condition="'$(VisualStudioVersion)' == '11.0'" Label="Configuration"> |
||||
<PlatformToolset>v110</PlatformToolset> |
||||
</PropertyGroup> |
||||
<PropertyGroup Condition="'$(VisualStudioVersion)' == '12.0'" Label="Configuration"> |
||||
<PlatformToolset>v120</PlatformToolset> |
||||
</PropertyGroup> |
||||
<PropertyGroup Condition="'$(VisualStudioVersion)' == '14.0'" Label="Configuration"> |
||||
<PlatformToolset>v140</PlatformToolset> |
||||
</PropertyGroup> |
||||
<PropertyGroup Condition="'$(Configuration)'=='Debug'" Label="Configuration"> |
||||
<ConfigurationType>Application</ConfigurationType> |
||||
<UseDebugLibraries>true</UseDebugLibraries> |
||||
<CharacterSet>Unicode</CharacterSet> |
||||
</PropertyGroup> |
||||
<PropertyGroup Condition="'$(Configuration)'=='Release'" Label="Configuration"> |
||||
<ConfigurationType>Application</ConfigurationType> |
||||
<UseDebugLibraries>false</UseDebugLibraries> |
||||
<WholeProgramOptimization>true</WholeProgramOptimization> |
||||
<CharacterSet>Unicode</CharacterSet> |
||||
</PropertyGroup> |
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> |
||||
<ImportGroup Label="ExtensionSettings"> |
||||
</ImportGroup> |
||||
<ImportGroup Label="PropertySheets"> |
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> |
||||
<Import Project="$(SolutionDir)\..\vsprojects\global.props" /> |
||||
<Import Project="$(SolutionDir)\..\vsprojects\openssl.props" /> |
||||
<Import Project="$(SolutionDir)\..\vsprojects\winsock.props" /> |
||||
<Import Project="$(SolutionDir)\..\vsprojects\zlib.props" /> |
||||
</ImportGroup> |
||||
<PropertyGroup Label="UserMacros" /> |
||||
<PropertyGroup Condition="'$(Configuration)'=='Debug'"> |
||||
<TargetName>gpr_stack_lockfree_test</TargetName> |
||||
<Linkage-grpc_dependencies_zlib>static</Linkage-grpc_dependencies_zlib> |
||||
<Configuration-grpc_dependencies_zlib>Debug</Configuration-grpc_dependencies_zlib> |
||||
<Linkage-grpc_dependencies_openssl>static</Linkage-grpc_dependencies_openssl> |
||||
<Configuration-grpc_dependencies_openssl>Debug</Configuration-grpc_dependencies_openssl> |
||||
</PropertyGroup> |
||||
<PropertyGroup Condition="'$(Configuration)'=='Release'"> |
||||
<TargetName>gpr_stack_lockfree_test</TargetName> |
||||
<Linkage-grpc_dependencies_zlib>static</Linkage-grpc_dependencies_zlib> |
||||
<Configuration-grpc_dependencies_zlib>Release</Configuration-grpc_dependencies_zlib> |
||||
<Linkage-grpc_dependencies_openssl>static</Linkage-grpc_dependencies_openssl> |
||||
<Configuration-grpc_dependencies_openssl>Release</Configuration-grpc_dependencies_openssl> |
||||
</PropertyGroup> |
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> |
||||
<ClCompile> |
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader> |
||||
<WarningLevel>Level3</WarningLevel> |
||||
<Optimization>Disabled</Optimization> |
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
||||
<SDLCheck>true</SDLCheck> |
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> |
||||
<TreatWarningAsError>true</TreatWarningAsError> |
||||
<DebugInformationFormat Condition="$(Jenkins)">None</DebugInformationFormat> |
||||
<MinimalRebuild Condition="$(Jenkins)">false</MinimalRebuild> |
||||
</ClCompile> |
||||
<Link> |
||||
<SubSystem>Console</SubSystem> |
||||
<GenerateDebugInformation Condition="!$(Jenkins)">true</GenerateDebugInformation> |
||||
<GenerateDebugInformation Condition="$(Jenkins)">false</GenerateDebugInformation> |
||||
</Link> |
||||
</ItemDefinitionGroup> |
||||
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> |
||||
<ClCompile> |
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader> |
||||
<WarningLevel>Level3</WarningLevel> |
||||
<Optimization>Disabled</Optimization> |
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
||||
<SDLCheck>true</SDLCheck> |
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> |
||||
<TreatWarningAsError>true</TreatWarningAsError> |
||||
<DebugInformationFormat Condition="$(Jenkins)">None</DebugInformationFormat> |
||||
<MinimalRebuild Condition="$(Jenkins)">false</MinimalRebuild> |
||||
</ClCompile> |
||||
<Link> |
||||
<SubSystem>Console</SubSystem> |
||||
<GenerateDebugInformation Condition="!$(Jenkins)">true</GenerateDebugInformation> |
||||
<GenerateDebugInformation Condition="$(Jenkins)">false</GenerateDebugInformation> |
||||
</Link> |
||||
</ItemDefinitionGroup> |
||||
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> |
||||
<ClCompile> |
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader> |
||||
<WarningLevel>Level3</WarningLevel> |
||||
<Optimization>MaxSpeed</Optimization> |
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
||||
<FunctionLevelLinking>true</FunctionLevelLinking> |
||||
<IntrinsicFunctions>true</IntrinsicFunctions> |
||||
<SDLCheck>true</SDLCheck> |
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary> |
||||
<TreatWarningAsError>true</TreatWarningAsError> |
||||
<DebugInformationFormat Condition="$(Jenkins)">None</DebugInformationFormat> |
||||
<MinimalRebuild Condition="$(Jenkins)">false</MinimalRebuild> |
||||
</ClCompile> |
||||
<Link> |
||||
<SubSystem>Console</SubSystem> |
||||
<GenerateDebugInformation Condition="!$(Jenkins)">true</GenerateDebugInformation> |
||||
<GenerateDebugInformation Condition="$(Jenkins)">false</GenerateDebugInformation> |
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding> |
||||
<OptimizeReferences>true</OptimizeReferences> |
||||
</Link> |
||||
</ItemDefinitionGroup> |
||||
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> |
||||
<ClCompile> |
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader> |
||||
<WarningLevel>Level3</WarningLevel> |
||||
<Optimization>MaxSpeed</Optimization> |
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
||||
<FunctionLevelLinking>true</FunctionLevelLinking> |
||||
<IntrinsicFunctions>true</IntrinsicFunctions> |
||||
<SDLCheck>true</SDLCheck> |
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary> |
||||
<TreatWarningAsError>true</TreatWarningAsError> |
||||
<DebugInformationFormat Condition="$(Jenkins)">None</DebugInformationFormat> |
||||
<MinimalRebuild Condition="$(Jenkins)">false</MinimalRebuild> |
||||
</ClCompile> |
||||
<Link> |
||||
<SubSystem>Console</SubSystem> |
||||
<GenerateDebugInformation Condition="!$(Jenkins)">true</GenerateDebugInformation> |
||||
<GenerateDebugInformation Condition="$(Jenkins)">false</GenerateDebugInformation> |
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding> |
||||
<OptimizeReferences>true</OptimizeReferences> |
||||
</Link> |
||||
</ItemDefinitionGroup> |
||||
|
||||
<ItemGroup> |
||||
<ClCompile Include="$(SolutionDir)\..\test\core\support\stack_lockfree_test.c"> |
||||
</ClCompile> |
||||
</ItemGroup> |
||||
<ItemGroup> |
||||
<ProjectReference Include="$(SolutionDir)\..\vsprojects\vcxproj\.\gpr_test_util\gpr_test_util.vcxproj"> |
||||
<Project>{EAB0A629-17A9-44DB-B5FF-E91A721FE037}</Project> |
||||
</ProjectReference> |
||||
<ProjectReference Include="$(SolutionDir)\..\vsprojects\vcxproj\.\gpr\gpr.vcxproj"> |
||||
<Project>{B23D3D1A-9438-4EDA-BEB6-9A0A03D17792}</Project> |
||||
</ProjectReference> |
||||
</ItemGroup> |
||||
<ItemGroup> |
||||
<None Include="packages.config" /> |
||||
</ItemGroup> |
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> |
||||
<ImportGroup Label="ExtensionTargets"> |
||||
<Import Project="$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.redist.1.2.8.10\build\native\grpc.dependencies.zlib.redist.targets" Condition="Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.redist.1.2.8.10\build\native\grpc.dependencies\grpc.dependencies.zlib.targets')" /> |
||||
<Import Project="$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.1.2.8.10\build\native\grpc.dependencies.zlib.targets" Condition="Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.1.2.8.10\build\native\grpc.dependencies\grpc.dependencies.zlib.targets')" /> |
||||
<Import Project="$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.redist.1.0.204.1\build\native\grpc.dependencies.openssl.redist.targets" Condition="Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.redist.1.0.204.1\build\native\grpc.dependencies\grpc.dependencies.openssl.targets')" /> |
||||
<Import Project="$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies.openssl.targets" Condition="Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies\grpc.dependencies.openssl.targets')" /> |
||||
</ImportGroup> |
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> |
||||
<PropertyGroup> |
||||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText> |
||||
</PropertyGroup> |
||||
<Error Condition="!Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.redist.1.2.8.10\build\native\grpc.dependencies.zlib.redist.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.redist.1.2.8.10\build\native\grpc.dependencies.zlib.redist.targets')" /> |
||||
<Error Condition="!Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.1.2.8.10\build\native\grpc.dependencies.zlib.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.1.2.8.10\build\native\grpc.dependencies.zlib.targets')" /> |
||||
<Error Condition="!Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.redist.1.0.204.1\build\native\grpc.dependencies.openssl.redist.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.redist.1.0.204.1\build\native\grpc.dependencies.openssl.redist.targets')" /> |
||||
<Error Condition="!Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies.openssl.props')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies.openssl.props')" /> |
||||
<Error Condition="!Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies.openssl.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies.openssl.targets')" /> |
||||
</Target> |
||||
</Project> |
||||
|
@ -0,0 +1,21 @@ |
||||
<?xml version="1.0" encoding="utf-8"?> |
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
||||
<ItemGroup> |
||||
<ClCompile Include="$(SolutionDir)\..\test\core\support\stack_lockfree_test.c"> |
||||
<Filter>test\core\support</Filter> |
||||
</ClCompile> |
||||
</ItemGroup> |
||||
|
||||
<ItemGroup> |
||||
<Filter Include="test"> |
||||
<UniqueIdentifier>{de41d2bf-c9ce-7f55-6da3-8d3798fd8fe2}</UniqueIdentifier> |
||||
</Filter> |
||||
<Filter Include="test\core"> |
||||
<UniqueIdentifier>{4867ad9b-2b88-de6a-a1df-7a733d389df9}</UniqueIdentifier> |
||||
</Filter> |
||||
<Filter Include="test\core\support"> |
||||
<UniqueIdentifier>{fca98aa0-f0c0-9254-ab22-a2792b4b94f0}</UniqueIdentifier> |
||||
</Filter> |
||||
</ItemGroup> |
||||
</Project> |
||||
|
Loading…
Reference in new issue