Casting away noderef and address spaces?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,

  I need to use typeof(), but I want to change address spaces.  I can't see
how to do that: AFAICT it's not possible.  This doesn't work:

#define __percpu __attribute__((noderef, address_space(3)))

/* Turn v back into a normal var. */
#define convert(v) \
	(*(__attribute__((address_space(0), force)) typeof(&v))(v))

int main(int argc, char *argv)
{
	unsigned int __percpu x;

	convert(x) = 0;
	return 0;
}

Thanks,
Rusty.
--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux