cpthreadspthread-key-create

In C, when using the name of the function in pthread_create is it the same as using a reference?


I'm not sure if I said it right.

   pthread_create(..., ..., &some, ...);
   ...is the same as:
   pthread_create(..., ..., some, ...);

I'm learning threads, if you could give a website or a video that makes it really simple, it would be great. Threads - locks, condition variables, etc. Thanks!


Solution

  • You can use both function name some or pointer to function &some to get the address of the function.

    Check also this answer.