You also need to care about the atomicity of operations indeed. Yet another possible pitfall. For this, you need to guard the read or write operation to make sure it can't get interrupted. Some processors have specific instructions for this. Most MCUs don't and you need to selectively disable and re-enable interrupts around the operation.
I personally don't like disabling interrupts because it increases interrupt latency. Usually I can figure a way to avoid disabling interrupts, such as reading the variable twice and making sure it's the same both times.
It helps if the architecture allows you to selectively disable only certain priority of interrupts (still with a single instruction), for example, on ARM with the BASEPRI. Having all the super timing critical, non-jittery interrupts on the highest priority class that won't get disabled solves the problem. This priority class, of course, cannot communicate using such shared non-atomic variables, but they often won't need to; you tend to need to perform some simple, quick operation first. Then, at the end of the timing critical ISR, if you need, you can trigger a software interrupt to effectively lower the interrupt priority to go on with the post-processing - if no other timing-critical interrupts are pending, it tail-chains with no extra penalty like it would be a longer interrupt to begin with, but it
can get disabled and postponed for atomic operations.
For example, in my current project, I use 16 interrupt priorities, out of which the two highest are never masked off. The highest level is safety shutdown locking in while(1) after doing the necessary shutdown stuff (power MOSFET gate driver disables, or correct power-down sequencing order while the caps still hold some charge) quickly, and the second-highest level may be used to quickly turn signals on or off in what's considered "normal operation".
Although, if you find out that you need to communicate between your threads using such big datatypes, I would recommend trying to rethink it if you could just live the 8-bit/16-bit/32-bit (depending on your CPU) naturally atomic variable.