When using OpenMP you can obtain an equivalent behavior using the atomic
construct:
// during threads
#pragma omp atomic
array[element_id]+=10; // some operations
Just to give you an idea of its semantic, here is an excerpt from the OpenMP 3.1 standard:
The atomic construct ensures that a specific storage location is accessed atomically, rather than exposing it to the possibility of multiple, simultaneous reading and writing threads that may result in indeterminate values
On the other hand, if you decide to use Intel TBB, you can take a look at the atomic template class.