ARMmbed / core-util

DEPRECATED: Mbed 3 utilities library
Other
12 stars 17 forks source link

Re-entrant arrays, are not re-entrant. #86

Open ghost opened 8 years ago

ghost commented 8 years ago

Array.h describes itself as "A re-entrant array class". The implementation provides synchronization around array extension, but there is no mechanism to provide synchronization in access to individual array elements for element types that are not single copy atomic.

Consider two threads executing:

a[n] = b and x = a[n]

for some specific value of n in parallel, 'x' may observe a partial copy of 'b'.

ciarmcom commented 8 years ago

ARM Internal Ref: IOTSFW-2103