I do not know the library, but I would argue that the intention is to prevent automatic conversion between pte_tand integer types.
I mean, a typedefis just an alias for the type, so:
typedef unsigned long pte_t;
pte_t x = 3;
char y = x;
But structure is a new type, therefore:
typedef struct { unsigned long pte; } pte_t;
pte_t x = 3;
char y = x;
Then create some functions, macros or whatever, to get / set the inner field pte_tand do.
UPDATE: , . - ββLinux, :
#define pte_val(x) ((x).pte)
.
, , :
typedef struct { unsigned long pte_low, pte_high; } pte_t;
#define pte_val(x) ((x).pte_low | ((unsigned long long)(x).pte_high << 32))
? . . .