Linux, C: how can I get return value from thread which greate than 4G in a 32bits OS?
<p>I am running <code>32 bits</code> of OS.
Now the thread I created will return a int value which it could be larger than <code>4G</code>.
How can I receive this value from my <code>main()</code> function by <code>pthread_join()</code>?
Looks like in <code>32 bits</code> system, <code>(void *)</code> is 4 bytes.</p>

<pre><code>#include&lt;stdio.h&gt;
#include&lt;pthread.h&gt;
#include&lt;stdlib.h&gt;

void* thread_function(void)
{
    uint64_t nbytes  = 0;
    //assign values to nbytes, it could be larger than 4G.
    return (void *)nbytes;
}

int main()
{
    pthread_t thread_id;
    uint64_t nbytes;

    pthread_create (&amp;thread_id, NULL, &amp;thread_function, NULL);
    pthread_join(thread_id,(void**)&amp;nbytes); 
}
</code></pre>