Re: System calls parameter restrictions




Rafael Almeida wrote:

Obviously you can pass pretty much anything through a pointer, but what
I didn't understand was whether you could pass a struct by value or not.

I think it's an ABI restriction. As far as the ABI is concerned, a
structure doesn't have a value, it's an arbitrarily-formatted chunk of
memory. So the only way you could pass it by value would be to make a
copy of it and pass a pointer to the copy.

DS

.