Fabian Mauchle <fabian.mauchle(a)switch.ch> wrote
Mon, 19 Sep 2016 13:34:15 +0200:
On 19/09/16 10:11, Linus Nordberg wrote:
Proposed
change: copy the variable to the heap and use this as
argument to the new thread; also new thread is responsible for the
memory if spawn is successful.
The argument is an integer. Is there anything wrong with just passing it
as is? (Yes, I'm asking for review of branch 'stompless'. ;))
I would
be concerned about portability here (thought issues might be
very rare or even non-existent in the real world). Casting between
pointer and int is implementation-defined and might not work on all
platforms. [1] gives some explanation and reference to C99 standard.
I agree that it's not wise. I will update my branch and merge it
shortly.
Thanks,
Linus