From rummaging through the CUDA documentation: The callback function needs be of type cudaHostFn_t, i.e. conform to a particular callback function prototype. This requires a callback function with the following interface:
void CUDART_CB myHostCallback (void *data);
So all of the data passed to the callback function is a single data object of an opaque data type, accessed via a void pointer.
The callback function for cudaLaunchHostFunc is defined as typedef void (CUDART_CB *cudaHostFn_t)(void *userData);.
The callback function for cudaStreamAddCallback is defined as typedef void (CUDART_CB *cudaStreamCallback_t)(cudaStream_t stream, cudaError_t status, void *userData);
According to the CUDA documentation, the latter function should be considered deprecated and the former is preferred for future-proof code.