blob: 54328fec5adea77dab793ff8fbdbd636e0710714 [file] [log] [blame]
Cornelia Hucka8237fc2006-01-06 00:19:21 -08001#ifndef S390_SCHID_H
2#define S390_SCHID_H
3
4struct subchannel_id {
Cornelia Huckfb6958a2006-01-06 00:19:25 -08005 __u32 reserved:13;
6 __u32 ssid:2;
Cornelia Hucka8237fc2006-01-06 00:19:21 -08007 __u32 one:1;
8 __u32 sch_no:16;
9} __attribute__ ((packed,aligned(4)));
10
11
12/* Helper function for sane state of pre-allocated subchannel_id. */
13static inline void
14init_subchannel_id(struct subchannel_id *schid)
15{
16 memset(schid, 0, sizeof(struct subchannel_id));
17 schid->one = 1;
18}
19
20static inline int
21schid_equal(struct subchannel_id *schid1, struct subchannel_id *schid2)
22{
23 return !memcmp(schid1, schid2, sizeof(struct subchannel_id));
24}
25
26#endif /* S390_SCHID_H */