On Thu, 5 Nov 2009, Andrzej K. Haczewski wrote: > 2009/11/5 Nicolas Pitre <nico@xxxxxxxxxxx>: > > Why not? At least gcc is quite happy with such a construct. It > > probably makes a copy of the stack before passing it though. "a copy of the struct" I meant here. > Err... my mind is rotted with all that ugly java, c#, python and ruby, > even c++. I should start taking some medications I suppose... what was > I thinking is that C can't copy-construct a struct. Damn, too much sun > (of java fame)... > > That way I rediscovered simple struct construct...man I missed C so much :) Welcome back ! ;-) > Anyway, the solution with passing pthread_t as pointer saves some > stack, so it's probably not that bad. Yep, just what I said. Normally if you pass a structure to a function, it will be copied beforehand so modifications by the callee won't be seen by the caller. But in this case we don't care, hence passing the original structure address is more efficient. Nicolas