12

It's the parameter in pthread_create(). I think each part means:

  • void *: The return value is a void pointer.

  • (*): It's a pointer to a function.

  • (void *): It takes an untyped pointer as a parameter.

Is that correct?

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Marty
  • 5,926
  • 9
  • 53
  • 91

1 Answers1

13

Yes, it is the signature of a nameless function pointer that takes and returns void *.

If it had a name (as in a variable) it would be:

void *(*myFuncName)(void*)
Constantino Tsarouhas
  • 6,846
  • 6
  • 43
  • 54
Michael Chinen
  • 17,737
  • 5
  • 33
  • 45
  • For which compilers is this syntax legal? The R package igraph does not compile on the CRAN Solaris server due to a "syntax error" around the use of "void (*)(void)": https://www.r-project.org/nosvn/R.check/r-patched-solaris-x86/igraph-00install.html – landau Jul 20 '17 at 15:58