Commit 7e366320 by Ben Clayton

Update Marl to 64d123947

A single change to fix windows breakage due to 'alloc' requiring an underscore prefix on some toolchains. Changes: 64d123947 thread.cpp: Replace use of alloca with vector. Commands: git subtree pull --prefix third_party/marl https://github.com/google/marl master --squash Bug: b/140546382 Bug: angleproject:4474 Change-Id: If15baa2531a5b49537bb0ba9f190454f2044ad9b
parents 5751f9e3 c76f1310
...@@ -124,8 +124,9 @@ Thread::Thread(unsigned int logicalCpu, const Func& func) { ...@@ -124,8 +124,9 @@ Thread::Thread(unsigned int logicalCpu, const Func& func) {
MARL_ASSERT(size > 0, MARL_ASSERT(size > 0,
"InitializeProcThreadAttributeList() did not give a size"); "InitializeProcThreadAttributeList() did not give a size");
std::vector<uint8_t> buffer(size);
LPPROC_THREAD_ATTRIBUTE_LIST attributes = LPPROC_THREAD_ATTRIBUTE_LIST attributes =
reinterpret_cast<LPPROC_THREAD_ATTRIBUTE_LIST>(alloca(size)); reinterpret_cast<LPPROC_THREAD_ATTRIBUTE_LIST>(buffer.data());
CHECK_WIN32(InitializeProcThreadAttributeList(attributes, 1, 0, &size)); CHECK_WIN32(InitializeProcThreadAttributeList(attributes, 1, 0, &size));
defer(DeleteProcThreadAttributeList(attributes)); defer(DeleteProcThreadAttributeList(attributes));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment