is char style shared argument operation atomic in QNX6.1.0?

I have a share memory among severial process.and the share memory struct
are all
char style.Such as

struct shmem_data
{
unsigned char a;
char b;
uint8_t c;
};

if severial processes want to read/write it at the same time without other
synchronization way (such as
Mutexes Semaphores Atomic operations ),it should be safe to every process.

I think that system operator are based on char unit.So the shared char data
operation among
processes should be atomic.

I don’t know whether above description is right in QNX6.1.0 system.

“zhz_zhang” <zhz_zhang26@sina.com> wrote in message
news:ag3n9m$crk$2@inn.qnx.com

I have a share memory among severial process.and the share memory
struct
are all
char style.Such as

struct shmem_data
{
unsigned char a;
char b;
uint8_t c;
};

if severial processes want to read/write it at the same time without other
synchronization way (such as
Mutexes Semaphores Atomic operations ),it should be safe to every
process.

I think that system operator are based on char unit.So the shared char
data
operation among processes should be atomic.

I don’t know whether above description is right in QNX6.1.0 system.

Yes in practice but there is no rules that I know of that will guaranty
this.
You definition is not part of any language or OS specification.

For if you do a = a +1 there is no way to guaranty this will be
an atomic operation. The compiler may issue the following instruction
(pseudo)

move value of a from memory into register ax
add ax,1
move value of ax into memory location a

This is NOT atomic, as an ISR could be invoked before or after add ax,1 and
modified the value of a in memory.