Simplified distributed block storage with strong consistency, like in Ceph
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

16 lines
356 B

  1. // Copyright (c) Vitaliy Filippov, 2019+
  2. // License: VNPL-1.0 or GNU GPL-2.0+ (see README.md for details)
  3. #pragma once
  4. #include <stdint.h>
  5. inline void memxor(const void *r1, const void *r2, void *res, unsigned int len)
  6. {
  7. unsigned int i;
  8. for (i = 0; i < len; ++i)
  9. {
  10. ((uint8_t*)res)[i] = ((uint8_t*)r1)[i] ^ ((uint8_t*)r2)[i];
  11. }
  12. }