Why does start_routine for pthread_create return void* and take void*

后端 未结 2 1346
伪装坚强ぢ
伪装坚强ぢ 2020-12-29 20:31

The function header for pthread_create looks like this:

int pthread_create(pthread_t * thread, 
                   const pthread_attr_t * attr,
          


        
2条回答
  •  伪装坚强ぢ
    2020-12-29 21:13

    From the spec:

    If the start_routine returns, the effect is as if there was an implicit call to pthread_exit() using the return value of start_routine as the exit status.

提交回复
热议问题