This can help if you are shown as advertised Tparam.
However, if you want each stream to have its own space for storing some data, you can organize the transfer of this space to the stream as an argument to the function. For instance:
enum { NTHREADS = 10 };
struct TLS_Data
{
int id;
char buffer[2048];
size_t index;
} data[NTHREADS];
for (int c1 = 0; c < NTHREADS; c1++)
{
data[c1].index = c1;
data[c1].id = 0;
data[c1].buffer[0] = '\0';
int rc = pthread_create(&threads[c1], NULL, Thread_Pool, &data[c1]);
...handle errors, etc...
}
pthread_create(); void *, .
Thread_Pool , ; . , ; , :
uintptr_t value = c1 + 10;
rc = pthread_create(&threads[c1], NULL, Thread_Pool, (void *)value);
value uintptr_t, , , . , .
, , , , , (Thread_Pool() ), , . , , , :
uintptr_t value = c1 + 10;
rc = pthread_create(&threads[c1], NULL, Thread_Pool, &value);
( ), , . !