Commit a3a2e641 authored by Hua Meng's avatar Hua Meng Committed by Alexandre Julliard

msvcp90: Add implementation of _Concurrent_vector_Internal_push_back.

parent c784d172
...@@ -2216,10 +2216,24 @@ MSVCP_size_t __thiscall _Concurrent_vector_base_v4__Internal_grow_to_at_least_wi ...@@ -2216,10 +2216,24 @@ MSVCP_size_t __thiscall _Concurrent_vector_base_v4__Internal_grow_to_at_least_wi
/* ?_Internal_push_back@_Concurrent_vector_base_v4@details@Concurrency@@IEAAPEAX_KAEA_K@Z */ /* ?_Internal_push_back@_Concurrent_vector_base_v4@details@Concurrency@@IEAAPEAX_KAEA_K@Z */
DEFINE_THISCALL_WRAPPER(_Concurrent_vector_base_v4__Internal_push_back, 12) DEFINE_THISCALL_WRAPPER(_Concurrent_vector_base_v4__Internal_push_back, 12)
void * __thiscall _Concurrent_vector_base_v4__Internal_push_back( void * __thiscall _Concurrent_vector_base_v4__Internal_push_back(
_Concurrent_vector_base_v4 *this, MSVCP_size_t len1, MSVCP_size_t *len2) _Concurrent_vector_base_v4 *this, MSVCP_size_t element_size, MSVCP_size_t *idx)
{ {
FIXME("(%p %ld %p) stub\n", this, len1, len2); MSVCP_size_t index, seg, segment_base;
return NULL; void *data;
TRACE("(%p %ld %p)\n", this, element_size, idx);
do {
index = this->early_size;
_Concurrent_vector_base_v4__Internal_reserve(this, index + 1,
element_size, MSVCP_SIZE_T_MAX / element_size);
} while(InterlockedCompareExchangeSizeT(&this->early_size, index + 1, index) != index);
seg = _vector_base_v4__Segment_index_of(index);
segment_base = (seg == 0) ? 0 : (1 << seg);
data = (BYTE*)this->segment[seg] + element_size * (index - segment_base);
*idx = index;
return data;
} }
/* ?_Internal_resize@_Concurrent_vector_base_v4@details@Concurrency@@IAEXIIIP6AXPAXI@ZP6AX0PBXI@Z2@Z */ /* ?_Internal_resize@_Concurrent_vector_base_v4@details@Concurrency@@IAEXIIIP6AXPAXI@ZP6AX0PBXI@Z2@Z */
......
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