schid.h 486 B

12345678910111213141516171819202122
  1. #ifndef ASM_SCHID_H
  2. #define ASM_SCHID_H
  3. #include <linux/string.h>
  4. #include <uapi/asm/schid.h>
  5. /* Helper function for sane state of pre-allocated subchannel_id. */
  6. static inline void
  7. init_subchannel_id(struct subchannel_id *schid)
  8. {
  9. memset(schid, 0, sizeof(struct subchannel_id));
  10. schid->one = 1;
  11. }
  12. static inline int
  13. schid_equal(struct subchannel_id *schid1, struct subchannel_id *schid2)
  14. {
  15. return !memcmp(schid1, schid2, sizeof(struct subchannel_id));
  16. }
  17. #endif /* ASM_SCHID_H */