Error

When compiling the code for arduino Due, does this library give error "<util / atomic.h>", any solution?

Thanks.

util/atomic.h is part of avr-libc. The Due is not an AVR architecture so it doesn't use avr-libc. It should be fairly easy to modify code that was written to use atomic.h to work with the Due. If you want to pursue that, you can use the documentation as a reference:
https://www.nongnu.org/avr-libc/user-manual/group__util__atomic.html

This might be an indication that other AVR-specific code is present in addition to the use of the atomic.h macros. In that case, the porting job could be larger and more complex. You might look around to see if there are any alternative libraries that will work without modification.